Teams usually treat document extraction as a prompt problem: find the right instruction and the invoices read themselves. In practice it is a pipeline problem. Accuracy is not one number but a spread across field types. Dates and totals are easy, payment terms are not. The economics are decided by which documents go to a person, not by chasing the last few points with a bigger model.
The five-stage pipeline
The systems we have built and reviewed run the same five stages. Where one stage ends and the next begins varies; what each stage is responsible for does not. The model call sits in stage three, and the other four are what make it shippable.
- Stage 01IngestEmail, upload forms, storage buckets, partner SFTP.
Broken whenFiles arrive in formats nobody planned for, or signature blocks end up in the text.
- Stage 02ClassifyWhat kind of document is this?
Broken whenContracts get processed as invoices, or low-confidence labels move on anyway.
- Stage 03ExtractTyped fields against a declared schema.
Broken whenOutput fails to parse, or required fields come back empty.
- Stage 04ValidateSchema checks plus a faithfulness grader per field.
Broken whenValues pass the schema but cannot be traced back to the source text.
- Stage 05RouteThe typed record goes to the next system.
Broken whenSomeone still opens every source document to check the record by hand.
Stage 01Ingest
Pulls documents in from email forwards, upload forms, storage buckets and partner SFTPs, normalises the format, strips noise such as quoted replies, and emits one stable representation for everything downstream.
Stage 02Classify
Decides what the document is: invoice, contract, intake form, compliance attachment. The output is a label and a confidence. Below the threshold the document stops and goes to a person.
Stage 03Extract
Turns the text into a typed object that matches a schema declared up front: required fields, optional fields, types, rules. The model writes under structured-output constraints, and the result is parsed before it may continue.
Stage 04Validate
Two checks. A deterministic one (does it parse, are the required fields there, do the types match) and a graded one: can each value be traced back to the source text? Both must pass before the record leaves without a person.
Stage 05Route
Hands the record to the next system: accounting, the CRM, the contract repository, an inbox. Routing rules are typed and every decision is written to the trace.
Who reviews what
The pipeline earns its keep at the line between “automate” and “send to a person”. We start from three confidence tiers and then set the line per field type, tighter for a payment recipient than for a free-text note. These are our starting thresholds, tuned against a labelled sample for each document class.
- 0.97 and above. Routed automatically, no review.
- 0.85 to 0.97. Routed automatically, with a sample checked by a person.
- Below 0.85. Held in the review queue and never processed automatically.
Three scales, one table
The five stages stay the same from one document type to a regulated pipeline. What grows is the number of classes, and the evidence an auditor will ask for.
| Layer | One team, one document typeScale 01 | Several teams and typesScale 02 | Regulated pipelineScale 03 |
|---|---|---|---|
| Ingest | One channel: an email forward or an upload form | Shared intake, normalised per class | Encrypted channels plus personal data redaction |
| Classify | A shortcut: one type only | Several classes, a threshold per class | Several classes plus jurisdiction tags |
| Extract | One schema, one extraction prompt | An extractor and schema per class | Per class and per jurisdiction |
| Validate | Schema check plus a faithfulness grader | Shared validator, rubric per class | Deterministic, graded and sampled human review |
| Route | One downstream system | Rules per class, an audit trail per record | Signed audit trail per record |
| Cost band | CHF 12,000 to 18,000 | CHF 15,000 to 25,000 | Scoped per case |
| Build time | A focused MVP can be ready in two weeks. A scoped product can launch in around two months. We agree the timeline after reviewing your requirements. | A focused MVP can be ready in two weeks. A scoped product can launch in around two months. We agree the timeline after reviewing your requirements. | Scoped per case, plus the audit cycle |
| Live example | No named engagement yet | No named engagement yet | Not built yet |
Document pipeline at three scales
Scale 01One team, one document type
- Ingest
- One channel: an email forward or an upload form
- Classify
- A shortcut: one type only
- Extract
- One schema, one extraction prompt
- Validate
- Schema check plus a faithfulness grader
- Route
- One downstream system
- Cost band
- CHF 12,000 to 18,000
- Build time
- A focused MVP can be ready in two weeks. A scoped product can launch in around two months. We agree the timeline after reviewing your requirements.
- Live example
- No named engagement yet
Scale 02Several teams and types
- Ingest
- Shared intake, normalised per class
- Classify
- Several classes, a threshold per class
- Extract
- An extractor and schema per class
- Validate
- Shared validator, rubric per class
- Route
- Rules per class, an audit trail per record
- Cost band
- CHF 15,000 to 25,000
- Build time
- A focused MVP can be ready in two weeks. A scoped product can launch in around two months. We agree the timeline after reviewing your requirements.
- Live example
- No named engagement yet
Scale 03Regulated pipeline
- Ingest
- Encrypted channels plus personal data redaction
- Classify
- Several classes plus jurisdiction tags
- Extract
- Per class and per jurisdiction
- Validate
- Deterministic, graded and sampled human review
- Route
- Signed audit trail per record
- Cost band
- Scoped per case
- Build time
- Scoped per case, plus the audit cycle
- Live example
- Not built yet
What not to build
Each of these saves a few weeks at the start and costs months once the pipeline carries real volume.
- OCR and hope. Text from OCR is not extracted data. It is stage one of five.
- One prompt for every document type. It drifts with every model update, cannot be tested per class, and loses to a dedicated extractor on each one.
- No review queue. Sending uncertain extractions straight through saves money for a quarter and produces incidents nobody sees until month end.
- Accuracy claims without fixtures. “The model is 95% accurate” with no labelled set, no rubric and no baseline is a sales line.
- A schema that lives in the vendor's portal. Keep it in your own version control, or the day you switch vendors the pipeline is a rewrite.
Where we stand
We have no named, live document intelligence engagement to show on this page. The five stages are the shape we build to, and the eval method behind them is public in the Eval Spec.
Picture a finance team that keys supplier invoices by hand and finds its errors at month-end reconciliation. With the pipeline in place, most invoices go straight to accounting, the uncertain ones wait in a review queue, and mistakes surface the day the invoice arrives. The team's time moves from typing to checking the queue.
The place to start is a two-week Discovery Sprint: we map the manual flow, pick the document class that costs the most time, and fix the schema and the accuracy targets before anything is built.
Self-audit
Twelve questions for the way documents are processed today. The score updates as you tick; what the bands mean is explained once on the stacks index.
Method and pricing
The layer model, how to read the cost bands, the notes on data residency, multilingual documents and the EU AI Act, and how these reports are versioned are shared across all five stack reports: how we write the stack reports.