The invoice agent that asks for help 4% of the time

How a finance team's invoice agent knows when it is unsure, and why that matters more than its accuracy score.

Owen Tran and Glen Whitaker

·

·

3 min read

On this page

When a 60-person finance team asked us to automate invoice entry, the first question from their controller was not “how accurate is it?”. It was “how will I know when it’s wrong?”. That turned out to be the right question, and it shaped the whole build.

The job

The team received around 1,100 supplier invoices a month, by email, as PDFs and the occasional photo of a paper invoice. Two people keyed each one into QuickBooks: vendor, invoice number, dates, line items, VAT, total and the general ledger code. Month-end close took six working days, and most of the delay was waiting for invoices to be entered and checked.

Accuracy is the wrong target

On our first evaluation set of 400 past invoices, the extraction step got 97% of fields right. That sounds good until you do the sum. At 1,100 invoices a month with a dozen fields each, 3% wrong is several hundred mistakes, scattered at random, with nothing to tell the team where they are. They would have had to check everything, which saves no time at all.

What the team needed was not a higher accuracy number. They needed the agent to know which of its answers it could stand behind.

Confidence, per field

We changed the agent’s output so that every field came back with a confidence score and a short reason. Then we spent most of the build calibrating those scores against the team’s own history, so that “95% sure” actually meant right about 95% of the time.

The calibration came from three signals, not just the model’s own estimate:

  • Agreement between two passes. We extract each invoice twice with different prompts. Fields where the passes disagree are flagged.

  • Checks against known data. Vendor names are matched against the supplier list, VAT numbers against the registry format, and totals against the sum of line items.

  • History. If a vendor’s invoices have always been coded to the same GL account and this one is different, that is worth a look.

A field passes only if all three agree. Anything else goes to a person.

What the team sees

Invoices where every field passes are posted to QuickBooks as drafts, ready for the usual approval. The rest land in a short review queue with the uncertain fields highlighted and the reason beside each one: “VAT number doesn’t match supplier record” or “GL code differs from the last 14 invoices from this vendor”.

The reviewer fixes the field, approves, and the correction is saved as an example for next month’s tuning.

The numbers

After three months in production:

  • 4% of invoices go to review, almost always for one or two fields rather than the whole document.

  • 99.6% of fields on auto-posted invoices are correct, measured by the team’s monthly sample audit.

  • Invoices keyed by hand fell from 1,100 a month to about 40.

  • Month-end close went from six days to two.

The review rate started at 11% and came down as we added each month’s corrections to the evaluation set. We expect it to settle around 3%. Some invoices are simply ambiguous, and those should go to a person.

What we would tell anyone building one

Measure calibration, not just accuracy. An agent that is right 97% of the time and can’t tell you which 3% is wrong is a liability. One that is right 94% of the time and flags every doubtful answer is something a team can trust from week one.

Build the review queue first. It is the part people use every day, and it is how the agent gets better.

And ask the controller’s question early. “How will I know when it’s wrong?” is the best design brief we have ever been given.

agents

finance

evals

Share

Copy link

Portrait of Nisha Kapoor

Owen Tran

AI Engineer

Builds the agents, writes the evals, and tunes prompts until the agent knows when to ask.

Portrait of Nisha Kapoor

Glen Whitaker

Senior Automation Engineer

Twenty years of integrations, from EDI to n8n. Writes the retries nobody else thinks of.

Keep reading

Keep reading

All posts

Buy template

Create a free website with Framer, the website builder loved by startups, designers and agencies.