Mayank Jauhari
Author directory2026
CACHE-ED2: Compiling LLM Reasoning into Reusable Extraction Programs for Document Extraction at Scale
Sudhanshu Bhoi | Anurag Tripathi | Amir Raza | Mayank Jauhari
Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing: Industry Track
Sudhanshu Bhoi | Anurag Tripathi | Amir Raza | Mayank Jauhari
Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing: Industry Track
Extracting structured information from visually rich documents at enterprise scale demands both the reasoning capability of large language models and the efficiency of deterministic execution. Current approaches either deploy LLMs as instance-level analysts, incurring per-document inference costs that are prohibitive for repetitive templates, or rely on manually authored vendor-specific prompts that do not scale beyond a handful of high-volume vendors. We present CACHE-ED2, a framework that repositions the LLM as a system-level developer: given a novel document format, a multimodal ReAct-based agent synthesizes a reusable Document Extraction DSL (DocExDSL) program encoding the complete extraction logic (strategies, disambiguation, transforms, and automated reasoning validation), then caches it for deterministic, LLM-free execution on all subsequent documents of the same format. A contrastive Document Format Encoder routes incoming documents to cached programs with perfect hit rates, and a HITL Feedback Analysis Agent incorporates analyst corrections to refine programs over time. On public benchmarks (CORD v2, FATURA) and production streams spanning seven business verticals (580,000+ documents, 11,500+ vendors), CACHE-ED2 achieves near-perfect extraction accuracy (∼0.99) with a 1.0 extraction rate on document-present fields and perfect format matching across 50+ benchmark templates, matching or exceeding manually authored vendor-specific prompts, while reducing cumulative token consumption by ∼2.6× over first 1,000 documents.