Everyone has seen the demo. Someone pastes a clean PDF into a chat window, types “extract the key requirements,” and the model produces an impressive answer in eight seconds. The room nods. A pilot is approved.
Almost nobody has seen that demo survive contact with a real document set. Here is what we learned building one that does, and why the difference between demo and production is architecture, not prompting.
What enterprise documents actually look like
The pipeline we operate reads regulated-industry procurement documents in several languages. A “document” in this world is not a document. It is eleven files: a base document in one language, a scanned annex with a stamp across the text, a spreadsheet of lots with merged headers, an amendment that silently overrides section 4.2, and an eligibility clause that says “as defined in Annex III” where Annex III defines it differently than the base text does.
None of this is unusual. It is what contracts, tenders, regulatory filings, and supplier questionnaires look like everywhere. Clean PDFs are the exception. The demo was run on the exception.
The five ways one prompt fails
- Silent truncation. The document set exceeds what the model reads attentively, and what gets dropped is invisible. The model does not say “I skipped Annex III.” It answers confidently from what it saw.
- Attention dilution. Even within limits, extraction quality degrades as input grows. The requirement on page 61 is real; the model's grip on it is not.
- No provenance. A single prompt returns claims without addresses. When a reviewer asks where it says the delivery penalty is 2%, there is no answer, which means a human must re-read everything, which means the AI saved nothing.
- Error compounding. One misread table poisons every downstream conclusion in the same response. There is no bulkhead between a formatting accident and a business decision.
- No partial recovery. When the answer is wrong, your only tool is to run it again, and non-determinism means the next run is wrong somewhere else. You cannot fix stage three of a system that has no stages.
What a production pipeline looks like
The system that works is unglamorous. It separates the problem into stages, each with typed inputs, typed outputs, and its own failure handling.
- Ingest and normalize. OCR, layout reconstruction, language handling. Boring, and decisive: most “AI errors” are actually ingestion errors wearing a disguise.
- Classify. What is each file: base document, amendment, annex, price sheet? Later stages behave differently depending on the answer.
- Extract, section by section. Focused prompts over bounded inputs, returning structured, typed objects such as deadlines, eligibility conditions, and lot definitions, each carrying a citation back to the exact source passage.
- Reconcile. Cross-document logic in code, not in the model's head. Amendments override base text; contradictions become flagged issues, not silent choices.
- Validate. Schema checks and business rules. Does this catalog code exist, do the lot quantities sum, is the deadline before the award date? Known-bad patterns get repaired deterministically.
- Route to humans. Reviewers see structured findings with citations and a queue of flagged issues, not an 80-page PDF and a prayer.
The governance dividend
Here is the part that matters beyond engineering. A staged pipeline is testable: every stage runs against golden fixtures, real historical documents with known-correct answers, so a prompt change that breaks extraction fails a regression eval before it ships, not after a customer finds it. It is auditable: every extracted value has a citation, every issue has a disposition, every human override is logged.
In regulated industries, that is not a nice-to-have. It is the difference between a tool Quality signs off on and a tool that dies in validation review. A single prompt cannot pass an audit, because there is nothing to audit. A pipeline can.
For the teams using ours, the practical result is that a bid decision no longer waits on weeks of reading, and every claim traces back to its source. Not because the model got smarter, but because the system around it got honest.
If your AI initiative is a prompt library, it will demo brilliantly and die in production. The teams getting value from document AI in 2026 treat it as an engineering discipline: stages, types, citations, evals. The prompt is the easy part.