跪拜 Guibai
← All articles
Artificial Intelligence

Route Pages Before OCR: Citi, EY, and Nvidia's Four-Phase Ingestion System Cuts Vision-Model Calls by 92%

By lucas_AI ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

Most enterprise RAG teams pay for OCR on pages that never need it; page-level routing cuts vision-model calls by over 90% on typical corpora. The pipeline also gives data teams a concrete audit trail and evaluation discipline, so offline metrics actually describe the production system.

Summary

Enterprise RAG pipelines usually treat OCR as the default first move. A four-phase ingestion system from Citi, EY, and Nvidia engineers argues the opposite: route every page before deciding. The system computes an image-area ratio per page; pages above 0.8 get rasterized and sent to a vision model, everything else goes through PyMuPDF's native structure extraction. On a 10,507-page corpus, 92% of pages take the zero-model-cost path and only 8.1% need OCR. Scan-page detection uses two signals, a text layer under 40 characters plus a high image share, so a full page of text with one large photo is not misclassified.

Extraction is only phase one. The curation stage samples scarce modalities first, with a six-table audit workbook for reproducibility. A reference scorer combines CER, WER, BLEU, length ratio, and TEDS for tables, then multiplies the composite by coverage, so a model that skips hard documents cannot score high. Chunking keeps tables and figures atomic, uses 320-token child cards with parent paragraphs in a KV table, and prepends a structural breadcrumb to each embedding, all without an LLM. Retrieval evaluation is read-only: Mistral-Medium generates page-answerable questions, and the same embedding fingerprint as production judges hits.

Measured results: Gemini 3.1 Pro scores 97.37 on the coverage-penalized composite, Mistral OCR v3 95.98, and two compact Docling versions trail by 4-7 points. On 25,050 synthetic questions, hit@1 is 68.6%, hit@10 92.8%, MRR 0.77. Every claim carries an evidence-level tag, and the numbers are self-tested on an internal corpus with no public code. The practical claim still stands: most enterprise corpora can cut visual-model calls by over 90% with page-level routing.

Takeaways
— Page-level routing sends only pages with an image-area ratio above 0.8 to OCR/vision models; the rest use PyMuPDF native structure extraction.
— On the 10,507-page Orion corpus, 92% of pages take native extraction and 8.1% need OCR.
— Scan-page detection requires two signals: a text layer under 40 characters and a high image share, avoiding false positives from text pages with one large photo.
— The system follows three rules: structure before semantics, don't change what you measure, and budget annotation with small modality-balanced traceable samples.
— The extraction score combines CER, WER, BLEU, length ratio, and TEDS for tables, then multiplies by coverage so models cannot cherry-pick easy pages.
— Chunking uses 320-token child cards (max 512) in the vector index, parent paragraphs up to 3,500 tokens in a KV table, atomic tables/figures, a 48-token overlap, and a structural breadcrumb prefix.
— Retrieval evaluation is read-only: Mistral-Medium generates 25,050 page-answerable questions, and hits require similarity plus page distance within ±1.
— Gemini 3.1 Pro scores 97.37 on the coverage-penalized composite; Mistral OCR v3 scores 95.98; two compact Docling versions trail by 4-7 points.
— Full extraction of 180 documents takes 45-57 minutes, with about 34 minutes of fixed preprocessing; model inference is no longer the bottleneck.
— All reported numbers are self-tested on an internal corpus with no public code or datasets; 'auditable' is an architectural property, not external validation.
Conclusions

The coverage multiplier on the composite score is a cheap anti-gaming mechanism; any leaderboard that averages per-item scores rewards models that skip hard inputs.

The 34-minute fixed preprocessing cost dominating extraction time shows where enterprise ingestion actually spends money once OCR is routed away; optimization attention should move to parsing and layout work, not model inference.

Tagging every claim with evidence levels ([E], [D], [P], [H]) makes the boundary between measured fact and proposal explicit; more systems papers would benefit from the same discipline.

Because the retrieval evaluation stops at hit@k and MRR, the pipeline's effect on final answer quality remains unknown; a strong retrieval layer does not guarantee good generation.

The caveat that all numbers are self-tested on an internal corpus means the architecture is auditable but not externally validated; teams should treat the specific scores as indicative, not as benchmarks to quote.

Concepts & terms
Page-level routing
Deciding per page whether to run OCR or native PDF structure extraction, based on signals like image-area ratio and text-layer size, instead of OCR-ing the whole corpus.
Coverage-penalized composite score
An extraction quality score that multiplies combined metrics (CER, WER, BLEU, TEDS) by the fraction of pages attempted, so a model cannot score high by skipping hard documents.
Scarcity-first sampling
A curation strategy that prioritizes rare page types (scan pages, chart pages) using modality quotas and greedy coverage, so evaluation samples do not starve uncommon but important cases.
Parent-child chunking
Storing small fixed-size child chunks in the vector index while keeping larger parent paragraphs in a key-value table; retrieval hits a child and fetches the parent for the LLM.
Structural breadcrumb
A deterministic prefix added to embedding text, such as 'document > title > section > subsection (p.12)', that gives the model context without calling an LLM.
Read-only evaluator
An evaluation component that only queries the production index and never writes to it, preventing evaluation from polluting online data.
From the discussion
Featured comments
智测星球

0.8 — for this image area ratio, is the denominator the whole page or the content area after removing headers and footers? And scanned pages use fewer than 40 characters as a second signal — if both thresholds are loosened a bit, would the 8.1% figure change drastically?

See top comments, translated →
Source: juejin.cn ↗ Google Translate ↗ Backup ↗