Before an AI agent answers from a PDF, check that its extracted representation preserves the document's reading order and the relationships between labels, values and qualifications. A page can look correct to a person while its extracted text joins two columns, drops a footnote or assigns a number to the wrong table heading. A fluent summary can hide each of those failures.
The useful acceptance test compares the source page, the extracted structure and the final answer. It asks whether the information supporting a decision survives every step. This guide sets out a practical review method for document agents, with hypothetical examples and explicit stop conditions. It does not claim that any one OCR model or extraction service is accurate across all PDFs.
- 01Inspect the actual inputThe model may receive a different order from the visible page.
- 02Preserve relationshipsValues need headers, units and applicable notes.
- 03Reconcile coverageMissing text, blank pages and extraction failures are different states.
- 04Grade the pipelineA guessed answer cannot prove that extraction preserved the evidence.
01 — StructureInspect more than words
Start by identifying what the document contains: ordinary paragraphs, multiple columns, scanned pages, tables, diagrams or a mixture. Text extraction and optical character recognition are different operations. OCR recognizes text from images; a text extractor may read an existing text layer. Neither operation automatically establishes the intended relationship between everything on the page.
The W3C's PDF reading-order guidance explains how visual order can differ from the structure exposed to assistive technology, especially in complex layouts. That is useful evidence about the document format, not a guarantee that every AI ingestion path follows the same tags. Inspect the representation your actual pipeline supplies to the model.
For example, an exported report may contain both a scanned page and an existing text layer. If the workflow combines them without checking, it can duplicate a paragraph or prefer an outdated recognition result. A page count and a successful parse are useful checks, but they do not establish that each page was read once, in the right order, with the right content.
- Identify the extraction path used for each type of page.
- Compare the actual model input with the visible source.
02 — ColumnsPreserve the sequence of meaning
A two-column article should usually be read down one column before moving to the next. A naive extraction can instead alternate lines across the page, creating sentences that never existed. The result may still contain all the original words, which is why a simple text-presence check can pass while the meaning is broken.
Select passages that cross a column boundary, continue around a figure or sit beside a sidebar. Compare their order in the extracted representation with the source page. If your pipeline returns bounding boxes or layout blocks, retain them long enough to diagnose the problem. A flattened text string makes it harder to recover which passage belonged to which region.
Do not ask the language model to repair every broken sequence from context. It may create a plausible sentence that no longer reflects the source. When a consequential passage has ambiguous order, re-extract the relevant page, use a better supported representation or route that passage for review. This is a document-reading problem to resolve before the agent starts drawing conclusions.
Complete word coverage is not complete meaning. A parser can retain every word and still combine them in an unsupported order.
03 — TablesKeep headers attached to values
A table cell needs more context than its text. Preserve its row label, column label, units and any group heading that applies to it. Merged headers and repeated headings are particularly important because they can express a hierarchy that disappears when the table is converted into plain rows of text.
Amazon Textract's table documentation illustrates a structured approach with table, cell, merged-cell, title and footer relationships. This is one provider's representation, not a required universal schema. The underlying acceptance question is whether your pipeline can reconnect a value with the labels and qualifications that make it meaningful.
Imagine a table with separate columns for planned and actual delivery dates, grouped under two regions. An extracted date without both headers can be attributed to the wrong region or treated as an actual result when it was only a plan. Ask the agent to return the label path with any consequential value, then verify that path against the page before accepting the answer.
| Source feature | Meaning that can disappear | Acceptance check |
|---|---|---|
| Merged heading | Which columns belong to a group | Retain the group and leaf header |
| Repeated heading | Whether a new page continues the same table | Match headers and row continuity |
| Unit note | Whether values mean dollars, thousands or percentages | Carry the unit with the extracted value |
| Blank cell | Missing, not applicable or visually merged | Preserve uncertainty until the source resolves it |
04 — QualificationsRead the small print with the claim
A footnote can limit the population, time period or conditions behind a number. Keep it attached to the claim it qualifies. A report that says a service is available may exclude a region or account type in a note; extracting only the headline creates a broader claim than the source supports.
Review superscripts, asterisks and notes below tables. Check whether the extraction keeps the marker, the note text and their relationship. If the same marker appears on several pages, preserve page context rather than joining every matching symbol to the first footnote found. This is especially important in compilations where individual sections restart their numbering.
The same discipline applies to captions and legends. A chart's title may describe the subject while the legend distinguishes observed values from forecasts. An agent should not remove that distinction when turning the figure into prose. Our research-claim verification guide covers the later citation decision; document extraction must preserve the qualifiers for that check to be possible.
- Carry notes and their markers with the values they qualify.
- Keep forecasts, estimates and measured results distinct.
05 — CoverageReconcile the pages and sections
Create a coverage record before treating an extracted document as complete. It should show which source pages were processed, which had errors, which were intentionally excluded and which produced little or no usable text. A blank output can represent a blank page, an image-only page or a failed extraction; those states need different treatment.
A long report can also include foldouts, appendices and attachments that are essential to the requested answer. Define the requested scope before extraction. If the task concerns a methodology described in an appendix, processing only the executive summary is insufficient even if that summary is perfectly readable. The expected document structure provides a useful cross-check on the page-level result.
Keep page identifiers stable across transformations. PDF page position, printed page number and a viewer's label may differ. Record enough information for a reviewer to locate the exact source quickly. The related problem of choosing the approved document version is covered in our document-version guide; coverage checks apply after that source has been selected.
Readable and accounted for
The page was extracted and its important structure was compared with the source. Its evidence can be used within the reviewed scope.
Missing or ambiguous content
A failed page or detached qualification remains visible in the coverage record. The agent should not silently treat it as absent from the source.
06 — AnswersKeep the evidence location
Ask the agent to preserve a source location for each consequential answer. A page number is a useful start, but a table label, section name or short supporting passage can make the reference much easier to review. The purpose is to let someone compare the answer with the relevant source without repeating the entire extraction process.
For a hypothetical contract summary, the agent might identify a renewal date but overlook the notice period on the next page. A useful evidence record includes both passages and explains their different roles. If the source is unclear or internally inconsistent, the answer should preserve that uncertainty. A well-formed citation does not resolve a contradiction merely by pointing to one side of it.
Avoid copying large sections into every answer as a substitute for selection. Give the reviewer the minimum evidence needed to understand and verify the claim, while retaining the original document separately. Our citation-checking reference explains why locating a source and establishing that it supports the answer are separate tasks.
A correct page reference can still support the wrong claim. Review the relationship between the cited passage and the answer, not just whether the link opens.
07 — AcceptanceTest representative layouts
Build a small evaluation set from document layouts your workflow will encounter. Include a simple digital PDF, a scan, a multi-column page, a table with merged headings and a page where a footnote changes the interpretation. Use synthetic or approved material that preserves these structural difficulties without exposing unnecessary information.
For each case, specify what must survive: reading sequence, a header hierarchy, a unit, a qualifier or a page reference. Grade extraction separately from the final answer. If extraction is wrong but the model guesses the expected answer, the pipeline should not receive an unconditional pass. That apparent success may disappear on the next document whose content is less familiar.
Keep a failure example when improving the pipeline. A change that fixes one table may disturb ordinary paragraph ordering elsewhere. Re-run the relevant cases after changing OCR settings, layout parsing or the prompt that transforms the extracted material. The goal is evidence about the actual pipeline, rather than confidence based on a vendor's broad document-understanding claim.
- Grade structure before grading the final prose.
- Retain the failed input and extracted representation for regression checks.
08 — HandoffMake uncertainty actionable
Give unresolved passages a clear destination. An exception should identify the source page, the affected answer and the reason review is needed. “Low confidence” alone is vague; “the value may belong to either of two merged column groups” tells a reviewer what to inspect. This makes human review a bounded part of the process instead of a request to reread everything.
Choose stop conditions around the consequence of error. A decorative caption can tolerate a different review path from a date or amount that drives an action. The application should avoid committing a consequential interpretation while its supporting structure is unresolved. It can still complete independent work and return a partial result whose limits are explicit.
For AI transformation projects, document automation becomes useful when the handoff is as clear as the answer. Preserve the source, inspect the representation and connect each important claim to evidence. That gives the team a way to improve extraction without relying on the model to conceal every defect with fluent prose.
- Name the ambiguity and the claim it affects.
- Let the workflow continue only where the unresolved passage cannot change the action.
Accept the evidence before accepting the answer
Check reading sequence, table relationships, qualifications and coverage before a PDF drives an agent's decision. Keep unresolved passages tied to the claims they affect so review can be precise and useful.