ModelRefs / DocVQA — AI Glossary

DocVQA — AI Glossary

A visual question answering benchmark testing information extraction and reasoning over scanned documents and forms.

Overview

DocVQA (Mathew et al. 2021) contains 12,767 Q&A pairs over 5,188 document images: invoices, letters, forms, and reports. Tests text localization, reading, and understanding of structured and semi-structured documents. Frontier VLMs score 90–95% ANLS; challenging for models that must localize text in complex layouts.

Reference details

Topicevaluation
Last reviewed2026-06-24

How it works

  1. Questions are posed over document images — invoices, forms, letters, reports — so the model must locate text within a layout before it can read or reason over it.
  2. The answer is a short string extracted from the document, which makes grading tractable and ties the task to information extraction rather than to open-ended description.
  3. Scoring uses a normalised string-similarity measure rather than exact match, which is the metric choice that makes the benchmark usable at all: a one-character reading error on a long field should not score the same as a wrong answer.
  4. That similarity is thresholded. Above a stated similarity the score is the similarity itself, and below it the score is zero, so the metric gives partial credit for near-misses and none for genuine errors.
  5. Layout is the difficulty rather than the language: multi-column text, tables, handwritten entries and rotated scans all affect whether the target text is representable at the resolution used.
  6. So performance depends on the visual encoder's effective resolution per character as much as on the model's reasoning, which is why results move with image preprocessing.

Example: How a thresholded similarity metric behaves

Take a 10-character answer. A prediction with 2 wrong characters has a normalised edit distance of 2 / 10 = 0.2, so its similarity is 1 - 0.2 = 0.8 — above a 0.5 threshold, and it scores 0.8. A prediction with 6 wrong characters has distance 6 / 10 = 0.6 and similarity 1 - 0.6 = 0.4, which falls below the threshold and scores 0 rather than 0.4. The metric is therefore piecewise: linear partial credit in the near-miss region and a cliff below it. That shape matters when reading results, because two systems with the same mean can have very different error profiles — one making many 1-character slips and scoring around 0.9 on each, another making occasional complete misreads and scoring 0. Per-field it also sets what is tolerable: on a 10-character account number, a 0.8 score means two wrong digits, which for a downstream system is simply a wrong account number. The benchmark's partial credit is a measurement convenience, not a statement that the extraction is usable.

Commonly confused with

This measures extraction from document images, not document understanding in the sense a downstream pipeline needs. The answers are short strings graded by similarity, so a high score means the model usually reads the right field approximately — while an extraction pipeline typically needs the field exactly, as a typed value, with its location. The related distinction is from text-layer extraction: a document with a reliable embedded text layer does not need visual question answering at all, and parsing that layer is cheaper and exact. The benchmark's relevance is specifically to scanned or image-only documents.

When to use it

Reach for it when:

  • Selecting a model for extraction from scanned documents and forms, which is the task it measures.
  • Comparing visual encoders' handling of layout, where the difficulty is localisation rather than language.
  • Alongside an exact-match measurement, since similarity-based partial credit overstates usability for typed fields.
  • With image preprocessing held constant, since resolution and layout handling move results materially.

Reach for something else when:

  • For documents with a reliable embedded text layer, where parsing it is cheaper and exact.
  • As a proxy for structured extraction quality, which needs exact values and locations rather than approximate strings.
  • Reading the mean without the error profile, since a thresholded metric hides very different failure distributions.
  • Comparing results obtained at different resolutions or with different preprocessing, which is a confound rather than a detail.

Primary source

Continue your research

Use these connected ModelRefs sections to compare alternatives, inspect implementation paths, and review the evidence and governance boundaries relevant to DocVQA — AI Glossary.

Frequently asked questions

What is DocVQA?

A visual question answering benchmark testing information extraction and reasoning over scanned documents and forms.

What concepts are related to DocVQA?

Closely related concepts include vqa, ocr, chartqa.