Why 95% OCR Accuracy Fails RAG: Measuring Extraction & Retrieval
By Sygnet Research, checked before publication
Key takeaways
- Character-level accuracy and retrieval quality are different measurements: on OHRBench, MinerU achieves a lower edit distance than Marker yet performs worse on RAG retrieval, so a 95% OCR score tells you almost nothing about whether your answers are right.
- Even the best solution tested, Qwen2.5-VL-72B, ends up 5 F1 points below ground-truth structured data end to end (31.1 vs 36.1), a ~14% relative loss attributable to parsing alone.
- The fix is a stage-wise diagnostic: measure extraction fidelity, retrieval recall, and answer groundedness separately, on the same question set, against the same human-verified ground truth.
- Separate semantic noise (wrong characters, wrong numbers) from formatting noise (broken reading order, mangled tables); the first requires better OCR accuracy, the second calls for standardized output formats or noise-robust retrievers.
Why does 95% OCR accuracy still produce wrong RAG answers?
Because 95% character accuracy is an average over characters, while a RAG answer depends on a handful of specific tokens: an amount, a clause number, a date, a row-column intersection. Lose those 5% in the wrong places and the chunk becomes unretrievable or, worse, retrievable and wrong.
The benchmark evidence is blunt. OHRBench, built from 8,561 document images across seven real-world RAG domains and 8,498 Q&A pairs, found that no current OCR solution is competent for constructing high-quality knowledge bases for RAG systems, and that all OCR solutions suffer degradation, with even the best showing a 14% F1 drop in overall evaluation and greater losses in the retrieval and generation stages. A more recent industrial benchmark reaches the same conclusion from another angle: high OCR accuracy does not necessarily translate into strong downstream RAG performance, because structural and semantic errors cause substantial retrieval failures even when WER/CER stays low.
Character error rate is a typography metric. Retrieval is a semantics problem, and the two only correlate when documents are simple.
Note also what the aggregate hides: OHRBench defines a noise rate as the proportion of QA pairs affected by OCR noise, where LCS below 0.95 counts as affected. Question-level, not page-level. That is the unit your users actually experience.
What should you measure at each stage of the pipeline?
Measure three things on the same corpus and the same question set: extraction fidelity against human-verified ground truth, retrieval recall of the evidence chunk, and generation groundedness. Anything less and you cannot attribute a failure.
OHRBench's own protocol is a reasonable template: OCR quality via edit distance, retrieval performance via LCS, generation via F1, with BGE-M3 (dense) plus BM25 (sparse) retrievers and Qwen2-7B, Qwen2-72B and Llama-3.1-8B as generators. The key design choice is the control arm. You run the identical pipeline on ground-truth structured data and on your parser's output, then read the delta. That delta is your extraction tax, expressed in answer quality rather than characters.
On the RAG side, the standard decomposition is well-established: context precision and context recall measure retrieval, faithfulness measures generation, and answer relevance measures whether the response addresses the question. Contextual recall specifically assesses whether the retrieval context contains everything needed to produce the ideal output, which matters because perfect contextual relevancy is trivially achievable by retrieving almost nothing. Build the question set so evidence is traceable to a page and an element type (paragraph, table cell, formula, chart), which is how OHRBench reports results: generalized LCS or F1 across plain text, table, formula, chart and reading order.
Which metrics map to which failure, and what do they miss?
| Stage | Metric | Catches | Blind spot |
|---|---|---|---|
| Extraction | CER / WER, edit distance | Character-level recognition errors | Fails to measure preservation of structural and semantic information essential for downstream retrieval |
| Extraction (structure) | TEDS, GriTS | Table structure fidelity | Says nothing about whether the table was chunked usefully |
| Retrieval | Context recall | Missing evidence in top-k | Requires ground-truth references |
| Retrieval | Context precision | Irrelevant or badly ranked chunks | Can look fine while the answer span is absent |
| Generation | Faithfulness | Hallucination against context | A system can score 0.95 on faithfulness and still return wrong answers if the retrieved content is stale or misaligned with the canonical source |
| End to end | Answer correctness / F1 | Real user impact | No attribution: you know it broke, not where |
Faithfulness is computed as the number of claims in the response supported by the retrieved context divided by the total number of claims, which is an internal-consistency measure only. If your parser dropped a minus sign and the retriever faithfully served the corrupted chunk, faithfulness scores 1.0 on a wrong answer. For table fidelity specifically, our note on table extraction metrics such as GriTS and TEDS covers why structural scores need a semantic layer on top.
How do you build the ground-truth set that makes all this measurable?
Start with 50 to 200 documents sampled by difficulty class, not at random, then have humans produce verified structured output and question-answer pairs tagged by evidence location. OHRBench did exactly this: documents were first parsed with Mathpix, then expert annotators revised the results to ensure fidelity to the original structure and content while removing style deviations. Pre-parse then correct is far cheaper than annotating from scratch, and it gives you the structural ground truth you need for the control arm.
Sample for the failure modes you actually have. InduOCRBench classifies 570 documents into 11 types across three clusters: visual perception, layout complexity and semantic style, covering extreme layouts, high-resolution pages, complex or watermarked backgrounds, historical documents with non-standard reading orders, visually decorated text, and documents with tables and formulas. Your eval set should mirror your intake distribution, including the ugly 5%.
Avoid the classic construction errors: an evaluation set of 200 paraphrases of the same question is no better than one example, so use embedding-based clustering to verify topic coverage, and never trust the aggregate, because it hides systematic failures; always inspect the worst-scoring examples. The practical sequencing is in our RAG document ingestion checklist and the companion guide on evaluating extraction accuracy.
How do you isolate formatting noise from semantic noise?
Run controlled perturbation. OHRBench generates perturbed structured data with varying degrees of two noise types, semantic and formatting, and ships them as reusable artifacts: retrieval_base/formatting_noise_[mild/moderate/severe] and semantic_noise_[GOT/MinerU/Qwen2.5-VL-72B]_[mild/moderate/severe]. Inject each independently into a clean index and watch which metric moves.
The results split cleanly. Semantic noise exerts a consistently significant impact, while formatting noise affects specific retrievers and LLMs differently, and semantic noise deviates retrievers and LLMs from integrating the correct information related to user queries. Format choice is not neutral either: BGE-M3 understands Markdown better, while LLMs handle merged cells more effectively in HTML or LaTeX. Which means the same table, parsed correctly, can still cost you points depending on serialization.
Reading order deserves its own column in your report. VLM and end-to-end OCR both struggle to merge paragraphs correctly, reflected in an F1 of just 8.8 overall, while pipeline-based OCR, despite lacking semantic understanding, gets close to ground truth using rule-based strategies. That inversion is the clearest argument against choosing a parser on a single headline number. The architectural trade-offs behind it are laid out in our OCR vs VLM comparison.
What does a workable measurement loop look like in production?
Split your metrics by cost and by whether they need references. Run reference-free metrics continuously on live traffic and reference-based metrics on a curated dataset during CI, with thresholds on every pull request that block regressions in faithfulness and context recall.
Two operational cautions. First, treat the judge as part of the metric: small changes to the prompts RAGAS's judge models use internally can shift scores meaningfully even when the pipeline has not changed. Pin the judge model and version it alongside the eval set. Second, do not compare across systems: a faithfulness of 0.85 in your system is not directly comparable to 0.85 in another, so compare runs of the same suite rather than raw numbers. There is also a known robustness issue worth wrapping: RAGAS can produce NaN scores when the LLM judge returns invalid JSON, with no graceful fallback by default. Schema enforcement at generation time helps here, which is the point of constrained decoding.
Sygnet builds document extraction pipelines and publishes evaluation methodology for teams running this kind of loop in-house.
FAQ
Is CER or WER useless for choosing a document parser?
Not useless, just insufficient as a sole criterion. Evaluation remains dominated by character- and word-level metrics like WER and CER, and benchmarks such as OCRBench and OmniDocBench assess transcription accuracy in isolation while failing to measure preservation of structural and semantic information. Use CER as a sanity floor, then rank candidates on downstream retrieval and answer metrics computed on your own documents.
Does skipping OCR and feeding page images to a VLM solve this?
Partially, and best in combination. OHRBench found that inputting image only cannot reach the performance of using OCR text, but simply combining the two inputs improves VLM performance by up to 24.5%. In their broader comparison, VLMs for OCR achieved the best overall performance, with Qwen2.5-VL-72B best across all solutions, though still short of ground truth.
How many documents do I need before the numbers mean anything?
Enough to cover your failure classes, which usually means dozens per difficulty bucket rather than thousands overall. A reasonable starting point is faithfulness and context recall on a 50-example dataset, with thresholds wired into CI, expanded as new failure modes surface. Stratify by document type and evidence source so a regression in table parsing cannot hide behind strong plain-text scores.
One email when we publish something worth your time.