CACHE-ED2: Compiling LLM Reasoning into Reusable Extraction Programs for Document Extraction at Scale

Sudhanshu Bhoi, Anurag Tripathi, Amir Raza, Mayank Jauhari


Abstract
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.
Anthology ID:
2026.emnlp-industry.93
Volume:
Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing: Industry Track
Month:
October
Year:
2026
Address:
Budapest, Hungary
Editors:
Pepa Atanasova, Gholamreza Haffari, Minghan Wang
Venue:
EMNLP
SIG:
SIGDAT
Publisher:
Association for Computational Linguistics
Note:
Pages:
1570–1587
Language:
URL:
https://aclanthology.org/2026.emnlp-industry.93/
DOI:
Bibkey:
Cite (ACL):
Sudhanshu Bhoi, Anurag Tripathi, Amir Raza, and Mayank Jauhari. 2026. CACHE-ED2: Compiling LLM Reasoning into Reusable Extraction Programs for Document Extraction at Scale. In Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing: Industry Track, pages 1570–1587, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
CACHE-ED2: Compiling LLM Reasoning into Reusable Extraction Programs for Document Extraction at Scale (Bhoi et al., EMNLP 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.emnlp-industry.93.pdf