LlamaIndex Publishes Two-Pass OCR Workflow for Small Document Data Rooms
The proposed workflow scans every uploaded file cheaply, then reserves more expensive visual parsing for pages an agent identifies as relevant.
Listen to this story
The audio brief
Story brief
3 key pointsLlamaIndex’s new just-in-time OCR pattern is designed for small, one-off document collections: run inexpensive text extraction across everything, retrieve candidate pages, then use LlamaParse’s visual processing only on the evidence that matters. In its example, LiteParse scanned 12,013 pages from 84 SEC filings in 32 seconds, while VLM OCR handled two pages for one question. The tradeoff is recall: missed tables,...
- 01
LiteParse flagged 2,605 pages for OCR, including 253 with embedded images and 75 lacking a text layer.
- 02
LlamaIndex recommends the two-pass workflow for roughly 10–100 documents, not repeatedly queried or audit-critical datasets.
- 03
For offline indexing of about 1,000 to more than 1 million documents, LlamaIndex recommends VLM OCR on every page.
LlamaIndex has published a two-pass document workflow that performs low-cost extraction across an uploaded collection, retrieves likely source pages, then applies VLM-based OCR only where a closer visual read is needed. Its just-in-time agentic OCR approach is aimed at small, ad-hoc data rooms, where parsing every page with a vision-language model can add cost and delay.
The first pass produces text that is useful for keyword or semantic search, even when it is not a perfect rendering of the original document. After retrieval narrows the search, LlamaParse can take page numbers as input and return table structure, bounding boxes, and confidence scores for the pages selected for deeper processing.
LlamaIndex’s example used 84 SEC filings.
LiteParse processed the collection in text mode in 32 seconds, according to LlamaIndex.
For one FinanceBench question, the workflow applied VLM OCR to two pages out of the full collection.
The cheap scan is not the final answer
In LlamaIndex’s demonstration, a grep search for “Organic sales” landed on page 25 of 3M’s 2022 10-K. The workflow then ran its visual parsing step on pages 24 and 25, identifying Consumer as the segment with a 0.9% organic decline. It is a company-reported result from one worked example, not a broad measure of workflow accuracy or savings.
Where the two-pass approach stops fitting
The method relies on the first pass surfacing the right material. LlamaIndex notes that a low-cost scan can mishandle tables or miss scanned pages, which can prevent retrieval from finding relevant evidence. In its filing set, LiteParse marked 2,605 pages as needing OCR, including 253 with embedded images and 75 without a text layer.
LlamaIndex’s workload split
- For ad-hoc collections of roughly 10 to 100 documents, it recommends cheap extraction, retrieval, then targeted VLM parsing.
- For offline pipelines indexing roughly 1,000 to more than 1 million documents, it recommends VLM-based OCR on every page before indexing.
- For accuracy-critical extraction into a system of record, it also favors full-document processing so fields can be audited.
That makes the new workflow a workload-specific shortcut, not a replacement for comprehensive document processing. When a collection will be queried repeatedly, or every extracted field needs verification, LlamaIndex’s guidance is to pay for a visual read before building the index.
Sources
- llamaindex.aiJust-in-Time Agentic OCR
Loading discussion...
Reader comments
Newest comments first. Replies stay oldest first.