Blog

Don’t Chunk the Document — Compile It

Diagram: a tagged document's structure tree compiled into an evidence graph with typed edges

EGR-S, pronounced “egress,” is Evidence Graph Retrieval with deterministic Structure expansion. The name is fitting: instead of letting isolated text fragments egress from a document, it lets evidence come out with its structural context attached.

More than two years ago, I wrote a white paper arguing that tagged PDFs, intended for the accessibility world with built-in structure, should be powering AI retrieval, not being flattened into chunks. Since then the PDF world has come to the same realization — the PDF Association now publishes an FAQ on AI and PDF explaining why structure matters in the AI age. What it does not address is the key question: how should tags become retrieval units? None of the topics EGR investigates is touched by that FAQ. Now I’ve measured it.

The result is Evidence Graph Retrieval (EGR): don’t chunk a structured document — compile it. The tag tree already tells you what’s a heading, which header qualifies which table cell, what a figure shows. EGR turns that into an evidence graph with typed edges. Three findings stand out:

  • On held-out questions, EGR achieved 100% perfect evidence recall at 4× less context than hybrid chunking.
  • At realistic corpus scale, chunking couldn’t reach 90% recall at any context budget we tested, plateauing at 83% while consuming 11,600 words per question. EGR crossed 90% with 1,207 words.
  • Asking AI to rediscover structure with a layout parser would lose 25–30 points of recall versus simply reading the tag structure.
Line chart of EvidenceRecall versus retrieved words per question (log scale) for six retrieval systems. EGR-S crosses the 0.90 recall line at about 1,200 words; chunk-hybrid plateaus at 0.83 even past 11,000 words.
EvidenceRecall vs. retrieved context on the 87-document corpus (Figure 3 of the paper). Chunking plateaus at 0.83 regardless of budget; EGR-S crosses 0.90 with 1,207 words.

But here’s the finding that matters most to my industry: quality gates everything. Badly tagged documents (validation below ~70) actually performed worse than chunking. Compliance-grade tags merely matched it. The full advantage appeared only in professionally remediated documents — real heading hierarchies, table headers with scope, genuine list structure, etc. — where professional companies like Grackle Docs excel.

Accessibility remediation and AI-readiness are the same investment. It is more than just compliance; it is the foundation for a future of structured evidence retrieval.

The full paper — model, compiler, retrieval machinery, and all three experiments — is here: Evidence Graph Retrieval — Li (2026).

Read the full paper