Skip to content

Why can a PDF become harder to answer after conversion to text?

OUR VIEW

Document data is valuable not only for the text it recognizes, but for the relationships it preserves: which row a value belongs to, its unit, the location of its evidence and the applicable document version.

On this page

A scanned order has been converted to text. The product, quantity and amounts are all present, yet the system gives the wrong total. The missing ingredient may be a column heading, a unit or a shipping charge on another page rather than an unread digit. For a team buying document data, page count and OCR accuracy do not fully answer the practical question: can the resulting material support correct answers in the intended workflow?

The missing piece may be a relationship, not a word

OCR generally means recognizing text in images. Document parsing also represents structures such as paragraphs, tables, formulas and reading order. Imagine a report with an old proposal in its left column and a new proposal in its right column. Every word can be recognized correctly, yet an interleaved text export may attach an old constraint to the new proposal. The failure is relational rather than character-level.

OmniDocBench separately evaluates text, tables, formulas and reading order, with location and structural annotations.[1] This decomposition is useful for diagnosis; one aggregate score should not stand in for every capability. The procurement and diagnostic procedures below are task-specific editorial suggestions, not industry acceptance rules prescribed by that benchmark.

Intended taskWhat plain text can loseEvidence worth retaining
Read a specified table valueHeaders, merged cells and row/column membershipTable structure and original page location
Interpret a multicolumn explanationColumn boundaries and reading sequenceBlock boundaries, order and page image
Answer across pagesContinued tables, footnotes and evidence locationsDocument ID, page numbers and relationships

Use a two-page order to separate failure modes

This is a constructed teaching example, not a real transaction. A product table on page one lists ten units of Product A at CNY120 each. A note says that merchandise excludes shipping, which appears on page two. Page two states shipping of CNY30 and no other charges. Asked for the total including shipping, the answer is 10 × 120 + 30 = CNY1,230.

Input available to the systemPossible outputWhat to inspect
Only page-one numbers and product textCNY1,200Whether the second page reached the model
Both pages, but 120 interpreted as the whole line totalCNY150The link between unit-price header and quantity
Complete and correctly represented evidenceAnother amountReasoning or calculation

These numbers illustrate possible mechanisms; they are not measured model results. Giving the same system the original pages, a machine parse and a manually checked structured representation can help narrow the investigation. If only the manually organized input yields the right answer, the representation deserves attention. One such comparison does not prove that replacing the parser will solve the problem: the changed input format can itself affect the model.

Annotations can retain the question, answer, evidence pages, evidence regions and necessary headers or notes. An answer label of “1230” alone cannot show whether both pages were used or the result was guessed. Conversely, a task that needs no calculation does not require an invented reasoning field. Collect the minimum evidence that supports the distinction you need to evaluate.

Which capability does a document QA score actually test?

In the original single-page DocVQA dataset, the answer is a span of text extracted from the supplied document image.[2] It supports research on finding answers on a page. Our CNY1,230 example requires combining two pages and calculating, so it is not the same task. A request for “DocVQA-style data” should specify whether that means question format, source domain or the same definition of an answer.

MP-DocVQA places questions over multipage documents and studies both answering and identifying the answer page.[3] Finding one answer-bearing page among many is different from combining evidence from several pages. More input pages do not automatically create cross-page reasoning tasks; those need explicitly designed questions and complete supporting evidence.

A trial can therefore ask separate questions: were characters recognized, structural relationships recovered, relevant pages retrieved, and the answer supported by those pages? Passing one stage does not validate the others. Keep business evaluation questions out of training and repeatedly tuned development sets if they are to provide meaningful held-out evidence.

Specify the annotations that avoid another round of rework

Start with a small set of shareable examples representing the document types and questions you need. Ask which layouts, languages, scan conditions and answer types the supplier already covers, and which require new annotation. The following is a scope discussion, not a requirement to buy every field for every project.

  • Source and version: original files or deliverable page images, stable document IDs, versions and page numbers, with missing pages and duplicate versions identified.
  • Structure: whether table rows, columns and merged cells survive; how block reading order, headers and footers are represented.
  • Task evidence: how questions and answers were produced, whether answers can be located in the source, and whether cross-page questions retain all necessary evidence.
  • Quality records: separate reporting by layout, language and difficult cases; do not silently remove illegible content, unanswerable questions or annotation disagreements.

Distinguish native PDFs from scanned ones. The former may contain extractable text while the latter rely mainly on page images; a text layer still does not guarantee correct reading order. Record rendering resolution, parser version and processing configuration to support comparison. For a processed delivery, preserve a route back to source pages that can be inspected under the agreed access conditions. Otherwise, it is difficult to determine whether an error arose in the original, the parse or later processing.

Inspect consequential errors before trusting an average

A character error and a unit error can have very different consequences. Report important amounts, units, dates and entity relationships separately, alongside overall results and the failures of tasks that depend on them. Choose acceptance thresholds for the intended use and consequences. An improved average should not conceal deterioration on critical questions.

OmniDocBench’s official change history shows that both dataset and evaluation methods evolve.[1] Fix the data version, evaluation code and input settings when comparing quotations or experiment reports. Scores obtained under different conditions should not be presented as directly comparable. This evidence is more useful for a purchase decision than a claim to lead a leaderboard.

Clean text may be enough for searching straightforward single-column material. Complex tables, layouts or cross-page questions call for retaining the visual and structural relationships they depend on. The useful deliverable lets a buyer answer specific questions and trace errors, while allowing a seller to demonstrate what its curation and annotation work actually contributes.

References

  1. OmniDocBench official repository · structure annotations and component evaluation
  2. DocVQA official dataset description · single-page extractive QA
  3. MP-DocVQA · arXiv v2, section 3 and answer-page identification

Read next

All articles

Sign in to Padda

A code in your inbox. No password to remember.

Connecting to sign-in…