An invoice extraction agent reads supplier documents and turns them into structured data for your finance system. Before that data reaches your ERP, check each field's confidence, validate formats, match vendors and codes against master data, catch duplicates and send exceptions to a person. Posting should be the last step, never the default.
Why extraction errors are expensive
Modern models read invoices well. They handle different layouts, languages and scan quality far better than template-based OCR did. The risk is not that the agent fails loudly. It is that it returns a clean, confident record with one wrong field: a total read from the wrong line, a supplier matched to a similarly named company, or a tax code guessed from context.
Once that record is posted, it flows into payments, reporting and tax returns. Fixing it means reversing entries, chasing suppliers and explaining the gap to auditors. The cheapest place to catch the mistake is between extraction and posting, so that is where the controls belong.
Treat extracted data as a proposal
Design the agent so its output is a proposed record, not a transaction. The agent extracts fields, attaches a confidence score and the page region each value came from, and hands the record to a validation step. Only records that pass every check are posted automatically.
This is the same principle we describe for validating AI agent output in general: the model's answer is input to your system, and your system decides what is allowed through.
Score confidence field by field
A single confidence score for the whole document hides the field that matters. Score each field separately and set stricter thresholds for financial fields, such as totals, tax amounts and bank details, than for descriptive ones like line item text.
Start strict. Send more documents to review in the early weeks, measure how often reviewers change each field, then relax thresholds only where the agent has proved reliable on your own suppliers. Our guide to confidence scores and human review covers how to set and adjust those cut-offs.
Validate formats and arithmetic
Some checks need no model at all, and they should run on every record:
- Invoice numbers, tax IDs, bank account formats and currency codes match the expected patterns.
- Dates are normalised to one format and fall in a sensible range.
- Line items add up to the subtotal, and subtotal plus tax equals the total.
- The currency is one your ERP accepts for that supplier.
Deterministic rules like these catch a large share of misreads cheaply, and they never drift the way a model can.
Match against master data
The most damaging errors are often valid-looking values that point at the wrong thing. Before posting, look up the supplier, purchase order, cost centre, general ledger account and tax code in your ERP through its API. A supplier the agent cannot match exactly should go to review, not be created on the fly.
Where purchase orders and goods receipts exist, match the invoice against both. A mismatch in quantity or price is a business exception for a person to resolve, not something the agent should explain away.
Stop duplicates before they are paid
Duplicate invoices arrive by email, post and supplier portal, sometimes with small differences in the reference. Keep a register of processed invoices and check each new one against it using the supplier, invoice number, amount and date, with some tolerance for formatting differences. A suspected duplicate should be blocked and flagged, never posted with a warning.
Route exceptions to the right person
Not every exception is equal. A low-confidence description can go to an accounts payable clerk. A new supplier, a changed bank account or a high-value invoice should go to someone with authority to approve it, because those are also the patterns used in invoice fraud. Show the reviewer the original document beside the extracted fields so they can confirm values quickly.
Keep a record of every decision
For each invoice, store the source document, the extracted values, the confidence scores, every validation result, any reviewer changes and who approved the posting. That record lets you answer an auditor's question, find where errors come from and retrain or adjust the agent with evidence. See what an AI agent audit trail contains for the fields worth keeping, and keep supplier personal data out of general logs as described in keeping personal data out of AI agent logs.
Use the controls your ERP already has
Most ERPs can hold an entry as parked or blocked until someone releases it, and can enforce approval workflows by amount or supplier. Have the agent post into that state rather than straight to a final entry while you build confidence. That way the ERP's own controls stay in charge, and switching to straight-through posting for clean invoices is a configuration change you can reverse.
If you are planning an extraction agent for finance or operations documents, talk to us about designing the checks alongside the agent.
Frequently asked questions
Can an AI agent post invoices to the ERP without human review?
It can for invoices that pass every check: high confidence on financial fields, valid formats, correct arithmetic, an exact supplier and purchase order match and no duplicate. Everything else should go to review. Most teams start by sending all invoices through review or posting them in a parked state, then allow straight-through posting for specific suppliers once the error rate on their documents is measured and acceptable.
What confidence threshold should we use for invoice fields?
There is no universal number. Set stricter thresholds for totals, tax amounts and bank details than for descriptive text, start high so more documents reach review, and track how often reviewers correct each field. Lower a threshold only for fields and suppliers where corrections are rare. Thresholds that were never tested against your own documents are guesses, so review them regularly as suppliers and layouts change.
How do we stop an extraction agent creating duplicate payments?
Keep a register of every processed invoice and check each new one against it before posting, using the supplier, invoice number, amount and date with tolerance for small formatting differences. Block suspected duplicates and send them to a person rather than posting them with a warning. Check across every intake channel, because the same invoice often arrives by email, portal and post.
Does invoice extraction need a different model from other AI agents?
Not necessarily. General multimodal models read invoices well, and specialised document models can be cheaper at volume. The model matters less than the controls around it: field-level confidence, format and arithmetic checks, master data matching, duplicate detection and a clear review route. Choose the model by testing it on a sample of your own invoices, including poor scans and unusual layouts.



