Overview & Result
Jerry Liu (CEO of LlamaIndex) open-sourced DocJev, demonstrating how Jev's ultra-low latency decision layer solves document processing bottlenecks. Instead of feeding 50-page complex PDF loan packets or medical records into an expensive frontier model, DocJev uses Jev to rapidly classify boundary pages and route sections (tables to OCR, structured forms to vision models, narrative text to fast extractors) in tens of milliseconds.
How Jev fits in the loop
- Ingests multi-page documents (PDFs, TIFFs) and extracts lightweight text layouts per page.
- Passes candidate page boundary snippets into Jev Choice classifier to determine if a page represents a new section type (invoice, tax form, contract clause, appendix).
- Dispatches isolated document packets in parallel to specialized extraction models based on Jev's high-confidence typed routing.
- Aggregates parsed structured JSON schemas back into LlamaIndex query engines with verifiable lineage.
How to reproduce
- Clone the official docjev repository from run-llama/docjev.
- Install requirements via poetry install including llama-index-core and typesafe-jev.
- Provide sample 50-page heterogeneous PDF loan or medical packets and run the benchmark CLI.
- Verify that boundary detection splits distinct sections accurately into child extraction pipelines.
Why this build matters
Document packet splitting is historically one of the most expensive and slowest steps in enterprise RAG pipelines. Using Jev reduces processing latency by 80% and slashes extraction costs by 92% compared to monolithic Claude/GPT-4o document processing.
Reported performance
Reported by authorCost: $0.0004 / page
Latency: 85ms / packet
Limitations
- Requires cleanly rendered PDF text layers; heavily distorted hand-written scans may require an upstream OCR pass before boundary classification.
- Custom classification rubrics must be tuned for niche domain documents (e.g., specialized insurance riders).