Accurate at What? Evaluating Structured GenAI vs Standard ML
Your GenAI form extractor evaluation produced 94% accuracy, but how can you ensure this is a meaningful metric for your application? Learn what that number hides and how to think about evaluating structured GenAI extraction.

What does 94% actually tell you?
Imagine your data science team tells you their new extraction system is 94% accurate. It reads scanned forms, pulls out the completed fields, and returns clean JSON. Would you trust this system without any further checks?
If this were a fraud model, you would know what to ask next. How much of the fraud does it catch? How many of its alerts turn out to be real? Because if only 1% of transaction data is fraudulent, a model that never flags anything is 99% accurate and completely useless, so aggregate accuracy tells us very little.
With a structured GenAI extraction system, the follow-up questions may seem less obvious. That 94% could mean several quite different things, depending on what counted as a match, whether blank fields were scored, and which step (or steps) of the pipeline was being measured.
I’ve spent much of the past year on this problem, working on a GenAI pipeline that reads long scanned forms. While evaluating a GenAI solution doesn’t map 100% to standard ML principles, it is still critical to evaluate it against your use-case requirements.
This post covers the high-level shifts in evaluation when you move from standard ML to structured GenAI extraction, and which evaluation principles translate across different AI systems. I’ll focus on fixed extraction pipelines. A document goes in, and a defined set of fields comes out. This gives us a concrete starting point for evaluation. For each field, we can check whether the system returned the right value, missed it, or filled in something that wasn’t there. Agents are a completely different kettle of fish and a topic for another day.

The topic of this blog is fixed GenAI extraction pipeline evaluation, and not anything related to agents (sorry).
Same same but different
Structured output is the friendliest kind of GenAI to evaluate. Every field has an expected value, so you can go back to accuracy, precision, and recall. You still need ground truth for an eval and test set, and you still need to look at where the errors are.
The trouble is that the familiar metrics now sit on top of a very different system. Here’s how I’d compare the two:
| Standard ML classifier | Structured GenAI extraction | |
|---|---|---|
| What does the system include? | Data and feature pipeline, model, thresholds, and business rules | OCR, LLM, business rules and mappings |
| Can you score the model on its own? | Usually, using a frozen set of features and known labels | Harder, as you may need manual transcription to separate OCR, LLM, and rule errors |
| What gets marked right or wrong? | One prediction per record | Hundreds of fields per form, many of them blank |
| How do you decide if a result is correct? | Usually clear: the label either matches or it doesn't | A decision you make per field type, depending on your use case |
| Does the same input always give the same output? | Generally yes, as inference is usually deterministic | Not always, as outputs are non-deterministic even at temperature 0 |
| How does the system show how sure it is? | Usually the model's predicted probability | Often a proxy, such as how often repeated runs agree, or an LLM as judge |
| What can change its answers, and by extension its accuracy? | Your data and your retraining | Your data, plus prompts, rules and provider model updates |
I’ve compared against a fraud classifier because it’s the ML model most people know, but it isn’t the closest match. If you’ve worked on non-generative document extraction, such as OCR followed by rules and templates, or named entity recognition (NER), the questions about scoring and what counts as correct will feel familiar. The newer problems that arise from including an LLM within the structured output extractions are outputs that change between runs, confidence without a natural probability, values that may be in the output which may be hallucinated/were copied over from previous sections of the form, and a model your provider can update.
Below are the lessons I’ve learnt about what matters most, shown through a form-extraction example. The numbers are made up to illustrate each idea.
Decide what “correct” means for your application
A fraud label in the classical ML example is either right or wrong. An extracted field, however, tends to have various degrees of being right, which are field- and application-specific. Is “15/03/1985” the same as “1985-03-15”? Not always. However, a field capturing an identification or passport number that is one digit off will always be wrong across all applications.
That’s why when you are evaluating your system against a ground truth, having one matching rule across every field may not work. Strict matching could count harmless formatting differences as errors in a use case that does not need to preserve formatting. Fuzzy matching everywhere could start letting through differences that matter. A better approach is to choose a rule by field type:
| Field type | Extracted vs expected | Rule |
|---|---|---|
| Date | 15/03/1985 vs 1985-03-15 | Convert to one format, then compare |
| Amount | R 1,500.00 vs 1500 | Compare the numeric value |
| Name | Thandi Mokoena vs Thandi Mokoena | Fuzzy match for formatting |
| ID number | 1234567890123 vs 1234567890124 | Exact match |
It’s also worth reporting your accuracy under strict and field-specific rules side by side. If the number jumps a lot, the person reviewing the system should know how much of it comes from the matching choice.
Blank fields may be flattering you
Most long forms are largely empty for any one applicant, and that can inflate your score. Say a form has 500 fields, and 300 of them are correctly blank. Of the 200 that should be filled, the system gets 150 right.
Let us say you count every field and you report 90% accuracy (450 out of 500). Yet if you only count the fields with a value, you would report 75% (150 out of 200). It’s the same run, and both numbers reflect an aspect of your system’s performance, yet depending on your use case, one may be closer to the truth of the expected system behaviour.

The same run scored two ways
Blank fields still need testing, though, because this is where a generative model can invent something plausible. If “Spouse’s name” is empty on the form, an LLM could fill in a realistic-looking name, perhaps taken from elsewhere on the form. If you only score fields that should have a value, you’d never see that error.
It also helps to split mismatches into types, because “the extracted value doesn’t match” can mean four different things, and each points to a different fix:
| Type of mismatch | On the form | Extracted | Likely place to start |
|---|---|---|---|
| Missing value | 1500 | blank | Check whether the OCR captured it, and whether the prompt asks for that field clearly |
| Invented value | blank | 1500 | Tell the prompt to leave a field blank if it can't find the value, or check that the value appears in the OCR text |
| Wrong value | 1500 | 1900 | Find which step first got it wrong: OCR, LLM, or a later rule |
| Format-only difference | 15/03/1985 | 1985-03-15 | Change the matching rule, as the value itself is right |
The last one may not be a real error at all, so counting it with the others would make the system look worse than it is. The types also carry different risks, as an invented value can look perfectly believable, so it’s less likely to be caught than a straight blank.
Averages hide the fields that matter
An overall accuracy score treats every field as equal. However, not every error in a field carries the same risk. A misspelt middle name and a wrong payment amount each count as one error. The former may have no downstream consequences while the latter could mean a client is debited the wrong amount every month. LlamaIndex makes the same point about OCR scores: “A page can post 99% character accuracy and still be worthless, because the 1% was the total."
Averages also hide where the errors cluster. Say the system gets 190 out of 200 filled fields right, a respectable 95%. If all 10 errors sit in the banking details section, the overall number looks healthy while the part of the form that moves money is the least reliable. Easy, high-volume fields such as title or gender lift the average and drown out the hard ones.
Therefore, it is better to report accuracy per field, or per group of related fields, alongside the overall figure. Laid out in this manner allows the weak spots to be immediately obvious in a way the single 95% never showed.
It is also beneficial to sit down with the business and agree which fields carry the highest weight and need to have higher requirements for accuracy. A simple set of tiers usually works:
- Critical: financial values, identity numbers, banking details and consent fields
- Important: fields that are needed downstream but are easy to spot and correct
- Cosmetic: fields where a small error has little practical effect
Each tier can then have its own accuracy target, and the critical fields can be reported on their own. This helps set up a later decision around which fields are safe to auto-accept, and which should always go to a person.
Separating model errors from pipeline errors is harder
The approach I’m advocating evaluates the whole pipeline, not just the model. That isn’t unique to GenAI. Sculley et al. describe mature ML systems as mostly glue code, with perhaps 5% or less actual ML code, so even a fraud classifier arguably deserves testing at the system level. The difference is that with a classifier you can also test the model on its own, using a frozen set of features and known labels. When an extraction system gets a field wrong, it’s much harder to isolate which stage caused the error. The OCR might have misread the page, the LLM might have picked the wrong value, or a post-processing rule might have removed a correct one.
One overall score can’t tell these errors apart, and each has a different fix. For instance, if the LLM got the value right but it broke at the mapping step, changing the prompt won’t help.
The solution here is to store the output of every step, and compare each one with the ground truth. The first step that disagrees is where the error came from.

Tracing one field through the pipeline
This also means one ground truth often isn’t enough. Two kinds of accuracy definitions may help here:
- Inclusive accuracy compares the final output, after all transformations, with an existing record of the answer, such as the values in a downstream system. It tells you whether the data the business receives is right.
- Exclusive accuracy compares the extraction, before transformations, with a manual transcription of what’s written on the form. It tells you how well the extraction itself performed.
The second kind costs more, because someone has to transcribe forms by hand, so it usually makes sense to do it on a smaller sample. While it might seem like high upfront manual cost, it’s the only direct way to separate the AI’s errors from those in your own rules.
Confidence isn’t a probability until you’ve tested it
A classifier usually gives you a predicted probability, and even that deserves some suspicion. Guo et al. showed in 2017 that modern neural networks are poorly calibrated, meaning their stated confidence doesn’t reliably match how often they’re right. The difference is that you have an established way to check it by binning the predictions and comparing the confidence with accuracy.
An extraction pipeline often has nothing quite so direct. One popular substitute is self-consistency, whereby you run the extraction several times, and treat agreement between runs as a proxy for confidence. SelfCheckGPT works on the idea that made-up details tend to vary across samples, while things a model knows tend to repeat. The authors of Mirror-Consistency likewise argue that minority answers can show where a model is uncertain.
For structured extraction, though, there’s a catch. Every run usually reads the same OCR output. If the OCR misreads a value, all five runs can agree on the wrong answer, and the score comes out at 100%.

Why self-consistency can't catch an OCR error
One test to run to check these self-consistency scores would be a confusion matrix, which shows how often it’s confident and wrong.

A confusion matrix for a confidence score. The cell to watch is confident and wrong.
Break it down by agreement level too. You want error rates to climb as agreement falls; otherwise the score isn’t telling you much. Then look closely at the errors at full agreement, because more LLM runs can’t fix errors that come from the shared input.
Vendor scores may need some checking too
Some OCR and extraction services return confidence scores of their own, and they don’t all mean the same thing. Microsoft’s documentation separates field confidence from OCR confidence, and says to check both. AWS suggests testing on your own data to find a review threshold.
I’d treat all of these as signals to test on your own documents. They become more useful when combined, because a signal that fails in a different way can catch what another misses. A second OCR read or a cross-field check, such as comparing a date of birth with an ID number, doesn’t depend on the runs agreeing.
Pick the threshold with a stated error limit
To get financial benefit from an automated form extraction system, you need to auto-accept certain fields to save the time of data capturers. This auto-acceptance requires having a set threshold for your proxy confidence score.
This starts with getting a defined error rate that the business is comfortable with. That limit only means something when it’s weighed against the business risk each field carries: a 2% error rate on a marketing-preference field is very different from 2% on a bank account number or an ID number. So ask the business what a wrong value would cost, not just how often it can happen, and set limits per field category accordingly. For instance, they may state that “Auto-accepted financial fields will be wrong no more than 3% of the time, with 95% confidence.”
Learn then Test is a method designed for this kind of claim. You take labelled data that wasn’t used to build the system, test a range of possible thresholds, and keep only those where the data gives strong evidence that errors stay within your limit. The guarantee holds for the amount of data you actually have, rather than relying on large-sample approximations, and the method works with any underlying model. It does, however, assume that new forms resemble your held-out data, so recheck it when the forms or the system change.
The catch is that this process of threshold-finding needs data. Even if the system makes no errors at all, you need about 100 auto-accepted fields in a category to support a 3% limit, and about 300 to support 1%, since a clean result on fewer examples could still be down to chance. You can treat those as minimums, as you’ll need more if there are any errors, or if fields on the same form tend to fail together. Until you have enough examples, those fields should stay with human review.
Your system can change without you touching it
While a standard ML model has drift, you generally own the model. If a retrained version behaves differently, you can usually trace that back to something you changed.
With an LLM behind an API, there’s less of that control. Chen, Zaharia, and Zou compared versions of GPT-4 from March and June 2023. On identifying prime and composite numbers, accuracy fell from 84% to 51%, and code generation showed more formatting mistakes. That second finding is the one that should worry anyone relying on a precise output format.
Additionally, even a single run needs care. Setting temperature to 0 doesn’t guarantee the same answer every time. As this explanation of Thinking Machines’ work sets out, tiny rounding differences and changing inference batches can still alter the output. A single run gives you one possible answer, so rerun some forms and report how much each field varies to get a stability metric as well.
In practice, there are three different layers we can use to help with monitoring and catching drift early:
| Level | What you watch | Needs ground truth? | What it tells you |
|---|---|---|---|
| 1. What's coming in | Page counts, confidence distributions, form mix | No | The input may have changed |
| 2. How the system behaves | Agreement between runs, blank rates per field | No | The system is acting differently |
| 3. Whether answers are right | Fixed test forms, fresh labelled forms, human corrections | Yes | Accuracy has actually moved |
The first two give you an early warning across every live form. The third is slower and only covers a sample and is contingent on actually having a ground truth, but it’s the one that proves something is wrong. Treat every prompt, rule, or model change as a new release, and rerun your test set before it goes live.
Where I’d start
So now that I have given you (possibly too many) things to think about when evaluating an LLM-assisted structured output capturing system, the main thing to note is that you don’t need all of this evaluation consideration on day one. In fact, it is probably better to build out your evaluation iteratively so that you can use your results to better guide what is most important to test next.
In terms of priority in eval test set evaluation, I’d start here:
- Log every step from the first run. Save the OCR output, every LLM run, each transformation, and the versions used. You can’t recover these later without reprocessing, and the rerun may not match.
- Write down your matching rules. Agree on them per field type before anyone sees the results.
- Report accuracy per field. State how blanks were treated, and show the fields that matter to the business on their own.
- Test your confidence score. Build the confusion matrix, then read every confidently wrong field.
- Keep a test set you don’t tune on. Otherwise, your results will look better than reality.
- Plan for change. Rerun your tests whenever anything changes, and keep monitoring after go-live.
The statistics matter, but so does reading the failures. Some will turn out to be errors in your ground truth, and some will be formatting differences you should have allowed. Those that remain are where the useful work starts.
ML taught us to measure carefully against a known answer, and that habit still holds. With structured GenAI, you also have to decide what the answer is, where in the pipeline it went wrong, and whether your system knows when it might be wrong confidently.
Good luck on your evaluation journey!
Evaluating a GenAI system and want to compare notes? Email us at poke@melio.ai.
. . .