Parse the Folder, Not Just the PDFs: The Relational Tables RAG Needs on a Case File
Simply stuffing all documents into a long context window fails for case files because the unit of work is the bundle, not individual documents, and models read the middle of long inputs less reliably A case file is a heterogeneous bundle of unlike documents (forms, reports, photos, tables, letters) about one entity, requiring completeness checks and cross-document comparisons rather than retrieval/search Missing documents are a first-class answer in case file processing; "nothing found" can be t
Analysis
TL;DR
- Simply stuffing all documents into a long context window fails for case files because the unit of work is the bundle, not individual documents, and models read the middle of long inputs less reliably
- A case file is a heterogeneous bundle of unlike documents (forms, reports, photos, tables, letters) about one entity, requiring completeness checks and cross-document comparisons rather than retrieval/search
- Missing documents are a first-class answer in case file processing; "nothing found" can be the correct and expected result, unlike in other corpus architectures
- The correct architecture indexes expected pieces per case type (what should be there) rather than what exists, with the answer shape being the state of the case rather than a retrieved passage
- This represents the least-covered area in prior art among the three corpus shapes, demanding a dedicated engineering approach beyond standard RAG patterns
Why It Matters
This article identifies a critical gap in enterprise RAG systems: the assumption that longer context windows solve document-heavy workflows ignores the structural reality of case files, where heterogeneous documents require completeness validation and cross-document comparison rather than simple retrieval. For AI practitioners building enterprise document intelligence systems, treating a case file as a "small corpus" to be dumped into a prompt leads to missed documents and unreliable value extraction from the middle of long inputs.
Technical Details
- Case file architecture: The input is a folder treated as a single object, not a collection. A completeness check runs first—comparing expected document pieces (by case type) against what is actually present—producing three lists: pieces present, pieces missing, and misfiled documents from other cases.
- Three corpus shapes contrasted: (1) Single document type with many copies indexed by named business fields, (2) Heterogeneous folder with one summary line per document routed via nested outline, (3) Case file bundles where the row is the case and the index is what the case should hold. Standard RAG patterns fit shapes 1 and 2 but fail shape 3.
- Cross-document comparison: Answers require extracting typed values from multiple documents and comparing them (e.g., date of loss on claim form vs. adjuster's report), not retrieving a single passage. Models' documented middle-input reliability degradation makes naive long-context approaches unreliable.
- Missing document as first-class answer: Unlike retrieval systems where "no results" indicates a failure, case file processing treats absence of an expected document as a valid, often primary, answer that must be explicitly surfaced.
- Companion implementation: A public notebook at
doc-intel/notebooks-vol1demonstrates the completeness check workflow on a fictional fire claim case with eleven heterogeneous PDFs.
Industry Insight
- Enterprises building document-intensive workflows (insurance claims, credit applications, medical records, hiring files) should audit whether their RAG architecture handles the "bundle" shape before scaling—longer context windows are not a substitute for case-aware indexing and completeness validation.
- The "missing document" paradigm shift means evaluation metrics for enterprise document AI must account for correct negative answers, not just retrieval accuracy; a system that silently drops missing documents is producing systematically wrong outputs.
- As context windows continue to grow, the temptation to bypass retrieval entirely will increase, but this article provides empirical reasoning—middle-input degradation and the need for cross-document typed-value comparison—that should temper that approach for structured case file workflows.
Disclaimer: The above content is generated by AI and is for reference only.