Working with PDFs and long documents: Accurate summary with citations
From uploading a PDF to generating summaries, bulleted tables, and document Q&A; with ready-to-use prompts and methods to find text extraction errors.
Specify the Output Before Uploading
The prompt "Summarize this PDF" usually yields a generic text. First, write down who you are reading it for and what decision you are making: reviewing a report, finding changes in a guideline, or preparing for a meeting. An executive summary, a glossary of terms, and extracting numbers are three different tasks and are best done separately.
Create a working version of the document and set aside information not needed for the question. Note the version number and file date so that summaries of two different documents do not get mixed up later.
First, Make Sure the Text Is Read Correctly
A PDF might contain actual text or just page images. In the latter case, the tool must have image-reading or OCR capabilities. Before analyzing the entire file, ask it to extract the title of a section, a table row, and a sentence from a specific page. Compare those samples with the file itself.
Multi-column tables, footnotes, Persian numbers, and line breaks are common sources of errors. If the printed page number differs from the viewer's page number, state from the beginning which one applies. A fabricated reference is worse than having no reference; an unclear section must be marked with the label "Not found".
Prompt for Document Summary
Work only based on the attached file. The audience is my non-specialist colleague. First, explain the subject and structure of the document in five lines. Then, write five main points and, for each point, mention the section title and page number, if truly identifiable. Finally, list three ambiguities or missing pieces of information. Do not add outside data from the document and do not fabricate references.
After this output, instead of requesting a fresh summary, focus on the problematic part: "Match the third point with the source sentence and show which part is your interpretation." This makes the review traceable.
Check Numbers Separately
For a numerical document, request a table: indicator name, value, unit, time period, and its location in the document. For example, the number "12" without specifying whether it is months, a percentage, or a count is not sufficient for decision-making. Request unit conversion or growth calculation as a separate step so that source data is not mixed with the calculation result.
Short Exercise
Choose a five- to ten-page file. Ask three questions where the answer to two is in the file and the answer to one is not. The appropriate tool should detect the absence of information for the third question. Then, open three output references yourself and check their accuracy.
To search across multiple documents, read the RAG guide. For the difference between an uploaded file and information the model already knows, Model vs. Assistant Difference will help.