The chain behind one document
Processing an invoice, contract or intake form has five links. Extraction is the first and by far the shortest.
- Extraction — retrieving fields from the document.
- Validation — is the result correct, internally and against your own data?
- Matching — where does this document belong: which supplier, order or case file?
- Exceptions — what happens when one of the three above fails?
- Archiving — where does the document stay, for how long, and who can access it?
Setting up only link 1 shifts the work: errors now arrive together with one person instead of being spread across everyone.
Validation belongs with rules, not the model
A model can read a total amount. Whether that amount equals the sum of line items, whether the VAT rate exists, whether the date is in the future — those are comparisons. Write them as rules. That is cheaper, faster and fully testable, and catches precisely the reading errors that would otherwise flow through unnoticed.
Also have the model provide an uncertainty level for each field and use it: low uncertainty passes through the rules, high uncertainty goes straight to a person, even if the rules happen to pass.
Matching is where things really get stuck
A supplier name on an invoice rarely matches the name in your system. "Jansen Techniek B.V.", "Jansen Techniek", "J. Techniek BV" — and the bank account has changed. Matching is a data-quality problem, not an AI problem, and almost always the link determining turnaround time.
Arrange two things before building: a way to confirm and remember a match once, and an explicit route for an unknown party. Without the first, the same supplier remains an exception every month.
Exceptions are the real design
Expect some documents not to pass through the entire chain automatically — new suppliers, unusual layouts, poor-quality scans. The question is not how to bring that to zero, but what the exception path looks like:
- Does the exception reach a person or a queue nobody checks?
- Does that person see the document and proposed fields side by side, or have to start again?
- Is the correction used to improve next time, or does it disappear?
A chain with a good exception path and seventy percent automatic throughput is worth more than one achieving ninety percent whose remainder gets stuck in a folder.
Archiving is a decision, not a by-product
Determine beforehand where the document ends up, how long it is retained, who may view it and whether extracted data is kept too. Financial documents have retention periods; personal data in intake forms poses the opposite issue — keeping it too long is the risk.
When not to start this
At low volumes with high variation — twenty documents monthly from fifteen different senders — setup costs more than the work. And if documents arise from a process you design yourself, a structured form is cheaper than any subsequent extraction. That sounds obvious, but is often the right answer.