The Curated Demo Problem Why Document AI APIs Fail When Real Customer Files Arrive
Demo accuracy hides field-level errors that only real files expose.

Document AI APIs fail on real customer files because demo accuracy measures a different problem from production correctness. Clean layouts and character-level scores do not establish whether an extractor returns the right field from a messy document. Closing that gap requires field-level evaluation on representative files and infrastructure that detects uncertainty before downstream systems act.
Why document AI APIs look accurate in demos but fail in production
The vendor demo returns the expected fields from a clean invoice. The first customer batch has mixed formats, handwriting, stamps, and scans that make it hard to tell which values go with which labels. The API still returns output, but its apparent accuracy no longer predicts whether that output is usable. The documents change even when the software stays the same.
This gap follows from evaluating an API under curated conditions that differ sharply from those in a production pipeline. RealDocBench documents the stakes in regulated workflows, where an autonomous agent may depend on a cash-to-close figure on a Closing Disclosure, a premium on an ACORD form, or a dosage on a clinical record. A wrong value can have financial and legal consequences far beyond the cost of parsing the page. An externally reported accuracy figure is therefore a starting hypothesis to test in production.
How character-level metrics produce field-level failures
A ten-digit invoice number with one transposed character can score nearly perfectly by character error rate while being completely wrong as a matched field. The downstream agent may reject it or silently process the incorrect value. Character accuracy is an inadequate proxy for extraction correctness when a workflow depends on exact values.
RealDocBench identifies the same mismatch in string- and markdown-level similarity scores. These scores can reward a parser that misreads the one field an agent needs while penalizing harmless formatting differences. Its 2026 QA track instead uses 1,356 questions that target structurally difficult extractions, including values bound to rows and columns, checkbox states, figure captions, and fields that must remain empty. The unit of evaluation becomes the required answer.
Even field-level results lose detail when they are rolled into one leaderboard score. Strong results in one area can hide poor results for a domain or structural feature in that overall score. Low precision means the system asserts wrong values, which are especially dangerous when accepted without a flag, while low recall means it omits required fields.
Silent structural corruption and how layout misreading poisons extraction without raising errors
Correctly recognized characters can still be assigned to the wrong fields. A multi-column invoice read left-to-right as a single stream may pair line-item descriptions with the wrong quantities. If a table header shifts one column right, the cells beneath it can take on the wrong meaning even though their text stays the same. The output may still look structurally plausible. Extraction completes without an error, leaving the consuming system with no signal that the associations are wrong.
RealDocBench tests for these failures in a separate layout track with 1,500 human-verified page images grouped under a nine-class taxonomy. Its scoring uses a Hungarian matcher with adjacency-aware split and merge recovery to check for structural errors that string similarity misses. Layout F1 tests structural alignment, while field-level QA accuracy tests whether the parsed content supports correct downstream reasoning. Neither measure substitutes for the other. Together, they distinguish a readable transcription from a usable representation of the page.
Dense fillable forms, checkbox grids, handwriting, stamps, redactions, and scanner artifacts make this distinction especially important in regulated documents. Long repeating arrays introduce a related problem when an extractor silently drops a row. Without an independent count of expected rows, the shortened output can appear complete. Silent corruption gives no clear reason to stop processing, as a flagged failure would. Its danger lies in passing as success.
Template brittleness and the maintenance burden that scales with document variety
Template-based extraction can perform accurately when the demo document matches the template. That result establishes the quality of the match. When a vendor updates an invoice or a lender revises a form, coordinate-based rules can assign values to the wrong fields. Documents may instead route to manual review.
Each new version of a layout needs another template, so there is more to maintain as the range of documents grows. In a high-volume pipeline that gets files from many sources, engineers may have to keep doing manual configuration long after the initial setup. Stable document sets are a different case. Templates can work well when formats remain narrow and predictable, but that condition does not describe mixed, evolving enterprise portfolios.
Layout-agnostic extraction offers an alternative by seeking to generalize across unseen formats. However, a claim of generalization needs a different test from a demonstration on familiar layouts. The evaluation documents must include formats the system has not seen. Otherwise, apparent flexibility can reproduce the same selection problem that made the template demo persuasive in the first place.
How benchmark construction choices determine what failures get measured — and what gets hidden
A benchmark’s document sources, tasks, and scoring rules determine which errors it can reveal. Clean academic papers and born-digital web content test different capabilities from degraded forms and handwritten clinical records. Clean documents have value, but success on them cannot establish performance on conditions the test excludes. RealDocBench identifies unrealistic document selection, surface-level similarity metrics, and aggregate reporting as gaps between public evaluation and production requirements.
OmniDocBench, presented at CVPR 2025 and maintained through 2026, spans nine document sources, including academic papers, textbooks, handwritten notes, and newspapers. It supports end-to-end, task-specific, and attribute-based evaluation, with version 1.6 covering more than a thousand PDF pages. Real5-OmniDocBench takes a different approach in 2026 by physically reconstructing version 1.5 across Scanning, Warping, Skew, Illumination, and Screen-Photography while retaining the shared ground truth. Acquisition conditions become the variable under test. Its authors conclude that the reality gap in document parsing remains far from closed.
OCRBench v2 tests layout perception, complex element parsing, and logical reasoning, among other areas, in 2026. ParseBench, also released in 2026, evaluates parsing quality in the context of AI agent workflows rather than treating transcription quality as the whole task. RealDocBench focuses on regulated documents from mortgage, finance, supply chain, and medical/healthcare workflows through its QA and layout tracks. It evaluates eighteen systems under a uniform protocol and reports accuracy with per-page cost and cache-busted latency. These designs answer different questions.
Benchmark ownership adds another interpretive constraint. When a team builds a benchmark variant and also evaluates its own model on it, the score can reflect benchmark familiarity as well as model capability. Independent methodology must guard against that structural conflict without assuming misconduct. More fundamentally, every scoring rule defines correctness. Character similarity rewards getting the text right, while field-level questions test whether a downstream agent can find the value its workflow needs.
Domain-specific documents expose the limits of general-purpose training
RealDocBench finds medical documents persistently hardest across its evaluation of eighteen systems. Clinical records combine handwritten annotations, dense tables, specialized terminology, and multi-column layouts, placing several extraction demands on the same page. A model may recognize the words yet fail to preserve the relationships that make a clinical field meaningful.
Pharmaceutical document classification also depends on the conditions of the task. One model does well at binary classification of well-structured labels but is much less accurate on a hard multi-class task with international labels. The model remains the same. The classification problem changes. This example concerns classification rather than field extraction, but it shows why evidence from one document task cannot establish performance on a more demanding domain variant.
Other industries expose different structural weaknesses. Reading order matters in financial tables because a value read correctly but placed in the wrong column becomes the wrong answer. Bills of lading and packing lists depend on long repeating arrays, where scoring must count omitted rows as failures even when aggregate accuracy is high. Acquisition quality compounds these differences through degraded scans, decorative fonts, watermarks, partial images, and poor lighting. RealDocBench’s spread across its four domains shows why training coverage alone cannot establish that an evaluation represents the documents a pipeline will receive.
Why specialization beats model size for field-level extraction accuracy
The constructive response is not simply a larger general-purpose model. A smaller model purpose-built for structured extraction can outperform a larger one on the accuracy and throughput a business-document pipeline needs. Broad models distribute capability across many tasks, while specialized models encode form layouts, table conventions, and field-label relationships that can generalize to unseen variants within those document types.
That advantage depends on the surrounding system as well as the model. A system depends on routing, confidence scoring, schema versioning, and evaluation to keep doing as well as it did in testing when its production inputs change. Bare-model comparisons underweight these controls. Even a good parser leaves downstream systems at risk of the same silent failures if it has no way to flag uncertain fields or detect regressions.
Clean, predictable, high-volume files can follow a fast deterministic path, while variable, complex, or high-stakes files use a more capable path. The routing decision allocates effort according to document difficulty and risk. It also changes the economics of extraction. When a specialized model runs faster and uses less context, it can be more accurate without a higher per-document cost, though the whole system still needs to be tested on the workload it will handle.
What production-grade document extraction infrastructure requires beyond a bare API
For a team choosing infrastructure, the first test is field-level accuracy on real pipeline documents, including the messy cases. Ground truth must be established per field, with critical values scored separately from routine ones. This prevents strong results on easy fields from masking failures on consequential ones. Dense forms, handwriting, nested tables, and long repeating arrays belong in that evaluation because they expose field misattribution and row dropping. Public benchmark results provide context for this test.
Confidence scoring and source citations then make individual outputs inspectable before agents act on them. Per-field confidence indicates uncertainty at the level where a decision is made, while a citation connects the extracted value to its source document. Built-in evaluations against versioned schemas serve a different purpose. They let teams detect regressions as document formats change, rather than assume that accuracy will stay at the level first measured.
The operational measure is straight-through processing at the required accuracy threshold. It records the fraction of documents that clear without human review, connecting extraction quality to labor cost. Healthcare and financial services face data-handling obligations, as can logistics workflows involving protected health information or EU personal data, so infrastructure selection must address applicable SOC 2, HIPAA, and GDPR requirements and self-hosted deployment needs before launch.
RealDocBench makes its datasets and parser adapters available on Hugging Face and its evaluation harness available on GitHub. That gives teams a reproducible framework for relating public comparisons to their own document types. A production extractor earns trust by returning the required fields correctly on the files it will actually receive, with controls that make uncertainty visible before an incorrect value becomes an action.


