Design principle
The goal is not 100% automation. It is confident automation of the easy majority, with uncertain cases routed to a person. A system that knows what it does not know is far more valuable than one that always produces an answer.
Document processing is one of the most reliable AI use cases — high volume, structured output, and machine-verifiable results. It also has specific failure modes worth understanding before you commission anything.
What the pipeline actually contains
- Ingestion — email attachments, scans, uploads, API deliveries.
- Preprocessing — deskewing, rotation, quality assessment, page splitting.
- Classification — what kind of document is this? Invoice, PO, delivery note, contract.
- Extraction — pulling the specific fields that document type requires.
- Validation — do the numbers add up? Does the supplier exist? Is the date plausible?
- Confidence scoring — how sure are we, per field?
- Routing — high confidence proceeds, low confidence goes to review.
- Posting — writing to your ERP, accounting system or database.
Steps 5 and 6 are what separate a production system from a demo. Extraction alone gives you values with no indication of reliability. Validation catches errors the model cannot see — a total that does not match the line items is wrong regardless of how confident the extraction was.
Validation is your best accuracy tool
Deterministic checks catch errors more reliably than any model confidence score:
- Arithmetic — do line items sum to the stated total? Does tax match the rate?
- Reference matching — does this supplier exist in your master data? Does the PO number resolve?
- Format checks — dates plausible, currency codes valid, tax numbers well-formed.
- Range checks — is this amount within an expected band for this supplier?
- Duplicate detection — has this invoice number already been processed?
A model that is 97% accurate plus arithmetic validation is more trustworthy than a model claiming 99% with no checks — because you know which 3% to look at.
Confidence routing in practice
| Situation | Route |
|---|---|
| All fields high confidence, validation passes | Automatic processing |
| One field low confidence, rest fine | Review that field only |
| Validation failure (totals mismatch) | Full human review |
| Unknown document type | Classification queue |
| Unreadable scan quality | Request a better copy |
| Unknown supplier | Review plus master data update |
Design the review interface as carefully as the extraction. Show the document alongside the extracted values, with uncertain fields highlighted and the relevant region of the page indicated. A reviewer who can confirm a document in ten seconds makes the whole system viable; one who must hunt across pages does not.
Where accuracy actually degrades
- Poor scan quality — the single largest factor. Skewed, low-resolution or photographed documents.
- Layout variation — hundreds of supplier formats, each different.
- Multi-page documents where a table continues across pages.
- Tables generally — line item extraction is materially harder than header fields.
- Handwriting — variable and often unreliable.
- Multiple languages or mixed-language documents.
- Stamps and annotations overlapping printed text.
Piloting properly
- Collect 100–200 real documents, deliberately including the awkward ones — not a curated clean set.
- Have a person extract them manually to establish ground truth.
- Run the system and measure field-level accuracy, not document-level.
- Categorise the failures — quality, layout, field type. This tells you what to fix.
- Tune confidence thresholds against your tolerance for review volume versus error rate.
Field-level measurement matters. A document with nine correct fields and one wrong is not 90% useful if the wrong one is the total.
Modelling the return
| Input | Notes |
|---|---|
| Documents per month | From your current volume |
| Minutes to process manually | Time a sample honestly |
| Expected straight-through rate | Start conservative — 60–75% |
| Review time for flagged documents | Faster than full manual entry |
| Current error rate and its cost | Often the larger saving |
Error reduction is frequently worth more than time saved, particularly where a mis-keyed invoice causes payment problems or a supplier dispute.
Where this fits with your systems
Extraction is only useful if the output lands somewhere. Plan the write path early — into your ERP, accounting system or database — including how a corrected review is written back and how duplicates are prevented. Projects that treat integration as a later phase frequently stall there.
Processing documents manually at volume? Send us a sample of what you receive — the document quality determines what is realistic. See our AI agent service, back-office automation, and human-in-the-loop design.