Short answer: an accuracy score a platform computes against evaluation criteria it wrote itself is not accuracy; accuracy is measured against a held-out labelled set sampled from your real work and frozen before the build.
Here is a pattern worth knowing about before you buy any AI automation.
Several agent platforms let you attach evaluation criteria to a step, then report an accuracy percentage against those criteria. Convenient. Some of them also offer a button that generates the evaluation criteria from the step's own prompt.
Follow that through. The system writes the instruction. The system writes the test for the instruction. The system grades itself against its own test. Then a number appears on a dashboard, and that number ends up in a slide.
It isn't fraud, and the feature has a legitimate use — it is a fast smoke test during development. The problem is what happens when the output is presented as a measurement of real-world performance. A model that misunderstands your document in a consistent way will write criteria that encode the same misunderstanding, and then score itself 98%.
What a real evaluation looks like
The engineering answer has been standard for decades and does not require anything clever: a held-out labelled set.
- Sample from reality. Pull real items from the client's actual operation — not synthetic examples, not the tidy ones. Include the awkward cases, because those are where money is lost.
- Label them with a human who knows the domain. This is the part that costs real hours, and the part everyone wants to skip. The client's own AP clerk is usually the best labeller in the room.
- Freeze it before you build. The set is written down, its size is agreed, and the pass threshold is agreed — in the contract, before development starts.
- Never train or tune on it. The moment the set influences the build, it stops measuring generalisation and starts measuring memorisation.
- Report the failures, not just the score. "94% on 200 invoices, and here are the 12 it got wrong" is a useful sentence. "98% accurate" is not.
How big does the set need to be?
Bigger than people expect, but smaller than people fear. The intuition that matters is the width of the confidence interval, not the raw count.
| Set size | Observed 95% | Roughly what you can claim |
|---|---|---|
| 20 items | 19/20 | Almost nothing — the interval spans ~75–100% |
| 100 items | 95/100 | "Around 95%, ±4 points" |
| 400 items | 380/400 | "95%, ±2 points" — defensible |
Indicative figures using a standard binomial interval; the point is the shape of the curve, not the third decimal.
For most mid-market document workloads, 150–400 labelled items is the honest zone. Below about 100, you cannot distinguish 90% from 97% — and as the cost arithmetic shows, that difference is worth over a thousand dollars a month in review labour.
Stratify, or you will fool yourself
A random sample from a real inbox is dominated by the easy majority. If 85% of your invoices come from twelve regular suppliers on the same template, a random 200 will be mostly those twelve, and your score will describe a problem you did not need to solve.
Stratify deliberately: sample across suppliers, formats, languages, quality (including the scanned-crooked ones), and edge cases like credit notes and multi-page attachments. Then report accuracy per stratum. It is entirely normal to see 99% on the twelve regulars and 70% on the long tail — and that split tells you exactly where the human queue should sit.
Why this is commercially useful, not just correct
Three reasons we make it a contract term rather than a nice-to-have:
- It survives procurement. "We measured 94% on 200 of your own invoices" is checkable. A vendor's marketing number is not.
- It makes acceptance objective. The engagement passes or fails against a threshold agreed before anyone wrote code. That protects the client from a vendor declaring victory, and protects the vendor from a moving target.
- It gives you a real decision. At your measured accuracy and your volume, does the exception queue cost less than the manual process? Sometimes the answer is no. You should learn that before you spend, not after.
The set stays yours. It gets re-run monthly under a care retainer, because model providers update models, your document mix drifts, and a number from six months ago is a historical artifact rather than a measurement.
What AI accuracy is, and how to calculate it
Accuracy is the share of items the system got right, measured against answers a person wrote down before seeing the system's output. Correct divided by total, on a labelled set the system has never seen. The arithmetic is trivial. The decisions around it are not.
The first decision is what counts as one item. Take 200 invoices with eight fields each. Scored per field, that is 1,600 answers, and a system that gets one field wrong on 40 invoices is at 97.5%. Scored per document, where an invoice counts only if every field is right, the same system is at 80%. Both numbers are honest. They answer different questions: per field tells you how good the reading is; per document tells you how many invoices will go through without anyone touching them, which is the one your review cost depends on. Say which one you are quoting.
The second decision is what counts as right. Is “2026-03-04” the same as “4 March 2026”? Is $1,250.00 the same as $1250? Write the comparison rules down before the first run, or the score will drift towards whichever reading flatters the result.
Accuracy vs precision vs recall vs F1
Accuracy on its own hides the difference between two kinds of mistake. The other three measures pull them apart. They are easiest to see on a yes-or-no question, such as “is this invoice a duplicate?”
| The question it answers | How it is calculated | |
|---|---|---|
| Accuracy | Of everything it judged, how much did it get right? | Correct ÷ all items |
| Precision | When it says “duplicate”, how often is it right? | True flags ÷ all flags it raised |
| Recall | Of the real duplicates, how many did it catch? | True flags ÷ all real duplicates |
| F1 | One number balancing the two | 2 × precision × recall ÷ (precision + recall) |
Low precision costs review time: people clearing false alarms. Low recall costs money: the duplicate that was paid. Which one matters more is a business decision, not a statistical one, and F1 deliberately hides that trade-off. Use it to compare two versions of the same system, not to decide whether to go live.
For field extraction the same idea applies with a twist. A field left blank and a field filled in wrongly are different failures. A blank goes to a person; a confident wrong value goes into the ledger. Count them separately, and treat the second as the expensive one.
Measuring accuracy on imbalanced data
Most of the things worth catching are rare. Suppose, for illustration, one invoice in a hundred is a duplicate. A system that never flags anything scores 99% accuracy, and catches nothing. Its recall is zero. That is not an edge case; it is what happens by default when the thing you care about is uncommon and the score is a single blended number.
- Report the rare class on its own. Precision and recall for duplicates, credit notes or fraud flags, not just overall accuracy.
- Put enough rare cases in the set to measure. If a random sample would contain three duplicates, deliberately add more, so the recall figure rests on more than a handful.
- Then report per stratum, not blended. Over-sampling the rare cases distorts the overall average. That is fine as long as each stratum is reported on its own and nobody quotes the blended number as if it were your real mix.
What it costs to evaluate AI accuracy properly
Most of the cost is labelling time. Work it out as items × minutes per item × hourly rate. As an illustration: 300 items at four minutes each is 20 hours, which at the $36–40 an hour loaded clerk rate we publish is roughly $720–800 of staff time. Add a second pass where two labellers disagree, and some engineering time to build the comparison and the report. Your own minutes per item will differ; time a few before you estimate.
Once the set exists, re-running it is cheap: the system processes a few hundred items, and someone reads the new failures. Set that against the difference between 90% and 97% on a real workload, which the cost arithmetic puts at over a thousand dollars a month in review labour, and the set pays for itself quickly.
An example accuracy evaluation pipeline
- Sample. Pull real items from last quarter, stratified by supplier, format, quality and the rare cases you care about.
- Label. A domain expert writes the correct answer for every field. A second person labels a subset, and every disagreement is settled and the rule written down.
- Freeze. Version the set and record its size and the pass threshold. From here on nobody tunes against it.
- Run. Process every item and compare each field to the label, using the comparison rules agreed in advance.
- Score. Per field, per document and per stratum, with precision and recall for the rare classes, and the interval around each figure.
- Read the failures. Every one. A wrong date format and a wrong total are both “one error” in the score and very different problems in production.
- Repeat. On every change to the prompt, the model or the rules, and on a schedule in production.
The risks of relying on accuracy alone
- Not all errors cost the same. A wrong memo field and a wrong total count equally in an accuracy score. Weight your review by consequence, or at least report the expensive fields separately.
- Confidence can be wrong too. Routing depends on the system's confidence. Check that its high-confidence answers really are more accurate than its low-confidence ones, on the same held-out set.
- The number ages. A score is true of the model, prompt and document mix on the day it was measured. Change any of the three and it is a historical figure.
Next steps after measuring accuracy
A measured number is the start of a decision, not the end of one. Use it to set the confidence threshold below which items go to a person. Multiply the expected exception rate by your volume and your minutes per exception to size the review queue, and compare that cost to the manual process. If it does not clear the bar, that is a result too; when not to automate covers what to do instead. If it does, write the threshold into the contract, and treat every correction in the live review queue as a candidate label for the next version of the set.
The uncomfortable part
Building a held-out set costs hours the client can see and does not obviously want to pay for. It is the easiest line to cut from a proposal, and cutting it makes the proposal cheaper and the project riskier.
We would rather lose on price than deliver an automation whose accuracy nobody actually measured — because the failure mode is not the demo looking bad. It is a system quietly making a few hundred wrong decisions a month while a dashboard reports 98%.