OFFICIAL🤖 Jev Agent

DocJev - Intelligent Document Splitting & Routing

Fast, cost-effective document packet splitting and multi-model routing using Jev's typed classification.

DocJev - Intelligent Document Splitting & Routing

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

  1. Ingests multi-page documents (PDFs, TIFFs) and extracts lightweight text layouts per page.
  2. 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).
  3. Dispatches isolated document packets in parallel to specialized extraction models based on Jev's high-confidence typed routing.
  4. Aggregates parsed structured JSON schemas back into LlamaIndex query engines with verifiable lineage.

How to reproduce

  1. Clone the official docjev repository from run-llama/docjev.
  2. Install requirements via poetry install including llama-index-core and typesafe-jev.
  3. Provide sample 50-page heterogeneous PDF loan or medical packets and run the benchmark CLI.
  4. 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 author

Cost: $0.0004 / page

Latency: 85ms / packet

Jerry Liu reported sub-100ms classification per page boundary, reducing document processing costs by over 90% compared to monolithic frontier model calls.

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).

Patterns