An AI model reads supplier invoices well, but it will sometimes mistype a date or mix gross and net amounts, and it will not notice that a supplier's bank account has changed. The safe setup checks every extracted value in code and sends anything doubtful to a person. In our public test on 36 synthetic documents, a fully local pipeline got 32 of 33 bills fully correct and sent all 11 documents that needed a person to review.
This guide explains which checks catch extraction mistakes and invoice fraud, how a review queue fits in, and what a fully local pipeline scored on a public test set. It is based on our open source invoice-intake-agent.
Why extraction alone is not enough
- Small misreads. Models mistype dates, read UK dates the American way, or mix VAT-inclusive and net amounts on a till receipt. Each looks plausible on its own.
- Fraud arrives as a normal-looking PDF. A supplier's bank details change on an otherwise ordinary invoice. A model has no reason to object.
- Documents can carry instructions. Hidden text in a PDF can tell the model what to do. If the model can act, that is a risk; if it can only return data, it is not.
The checks that catch them
Every extracted value is checked in code, and any failed check sends the document to a person with the reason shown.
| Check | What it catches |
|---|---|
| Grounding | A value the model returned that is not printed on the page |
| Arithmetic | Net plus VAT not equal to the total; lines not adding up; VAT not matching the rate |
| Dates | Unparseable dates, dates in the future, a due date before the issue date |
| VAT number and VAT invoice fields | A VAT number not in HMRC format; a VAT invoice missing details HMRC requires |
| Duplicate | Same supplier and number, or same supplier, total and date, seen before |
| Bank details changed | Bank details that differ from the supplier record: possible invoice fraud |
| Instructions found | Text that reads like instructions to the processor |
| Low OCR confidence | A scan too poor to trust |
The model never has tools. It only returns data, and routing is decided in code. A bank-detail change is always flagged with "confirm by phone using a number you already have", and approving the bill does not update the supplier record.
What it scored
36 synthetic documents (text PDFs, scans, phone-photo receipts, credit notes and statements), run on 10 November 2026 on one 12 GB graphics card, with local OCR and an 8-billion-parameter local model.
| Measure | Result |
|---|---|
| Documents that needed a person, sent to review | 11 of 11 |
| Bills with every field correct | 32 of 33 |
| Bills that needed no human edit | 31 of 33 |
| Document type identified | 36 of 36 |
| Duplicate, bank-detail changes, missing invoices found | 1 of 1, 2 of 2, 2 of 2 |
| Prompt-injection documents resisted | 3 of 3 |
| Time per document | About 5 seconds |
The test set was generated by the project's own script and is tidier than real client post. Treat these numbers as a sanity check, not a benchmark. A pilot on your own documents is the real test.
Nothing has to leave the office
Client documents are financial records, so the pipeline runs locally by default: the OCR engine and the model run on one machine, and there is no cloud OCR. A hosted model can be used instead if you prefer, and we name the provider before any pilot.
What you get out of it
- Approved bills as a file in the layout of Xero's bill import template, with account codes. A supplier rule learned from a human-approved bill always wins over the model's suggestion.
- An exceptions report: what went to review and why, duplicates, bank-detail changes.
- Supplier statements matched against the bills received, with a draft email to the client asking for the missing ones. It is a draft; nothing is sent automatically.
- A review queue where staff see the page next to the extracted fields, with values not found on the page highlighted.
It never sends email, never pays anything, never writes to the accounting system and never changes bank details. The VAT checks follow UK HMRC rules; other countries need their own rules added.