Reading Per-Class Evaluation Results
An eval set measures a model's performance, so its composition and labels shape the score you see.
A Team Blames the Model
Imagine a delivery team reporting that their model passes some kinds of cases and fails others. The natural first reaction is to suspect the model itself. Maybe it needs more training, a different architecture, or more tuning. That reaction is understandable, but it skips a question that matters just as much. The scores come from an evaluation set, and the evaluation set was built by people choosing which cases to include and how each case was labeled. If that set is flawed, the scores can point in the wrong direction.
What do you think happens?
A model scores well on two case classes and poorly on the other two. Before blaming the model, what should you check first?
Reveal answer
Check the eval set first: its composition and the labels on its cases.
The source states that uneven results can be a labeling problem or an eval set problem rather than a model problem, and that checking the eval set comes first. The scores come from a set that people built by choosing cases and labeling them, so an honest reading starts by asking whether that set is a fair measuring instrument for the work the model is supposed to do.
This article is about that second question. Before deciding what is wrong with a model, you need to ask whether the eval set is an honest measuring instrument. The sections below follow one line of reasoning: first what an eval set does, then how to tell a labeling problem from a model problem, then how to calibrate the eval set, and finally how to read the report's criteria and judge readiness.
What the Eval Set Measures
An eval set stands in for the real workload. The model is run on its cases, and the scores it produces describe how the model behaves on those cases. That makes the score only as meaningful as the set's contents. A high score on a set that does not resemble real traffic says little about production behavior. A low score on a set that over-represents hard, rare, or mislabeled cases can say even less.
Two things in the eval set shape the number you see. The first is composition: how many cases come from each case class. The second is labels: the correct answer recorded for each case. If composition under-represents a class, the score says little about that class. If labels are wrong for a class, the model can be graded incorrectly on exactly the cases where it is trying to be right.
The source gives a concrete picture of how this goes wrong. The eval set in that project was built from early data, and that early data under-represented two of the four case classes. Those under-represented classes were the ones where the model later struggled. The team's reading was that the eval set and the model's performance were tangled together, and the eval set was not a neutral ruler.
Labeling Problem or Model Problem
When performance is uneven across case classes, there are two broad diagnoses, and they lead to different actions. A model problem suggests changing the model. A labeling problem suggests fixing the eval data first. Because the actions differ, the diagnosis has to come before the fix. The flow below shows the order in which the checks are worth running.
The first check is the eval set itself: does its mix of cases and its labels represent the work the model is supposed to do? Only when the set passes that check does it make sense to ask whether the model is at fault. In the source case, the failing classes shared language patterns that the eval set had underweighted. The team re-labeled forty cases with the customer's lead reviewer, and the model's pass rate on those re-labeled cases reached seventy-eight percent. That result is the evidence the team used to argue the problem lay in the labeling rather than in the model.
Calibrating the Eval Set
Eval set calibration means making the eval set represent the distribution of case classes accurately. A stratified eval set is built against the case-class distribution from the start, rather than from whatever early data happens to be available. The source admits that the team in its project should have done exactly this: stratified the eval set against the customer's case-class distribution from the beginning. Their proposed fix is to run validation against a corrected, stratified eval set rather than the original one.
How an underweighted class hides inside a headline number
An eval set has 100 cases: 90 from a common class and 10 from a rare class. The real workload sends the two classes in equal numbers. The reported overall pass rate is 95 percent. Does that number describe production behavior?
- 1Count the classes in the eval set
There are 90 common-class cases and 10 rare-class cases, so the rare class is only 10 percent of the set.
- 2Compare with real traffic
In the real workload the two classes arrive in equal numbers, so the rare class is half of production traffic. The eval set gives it one-tenth of the weight.
- 3Ask what the 95 percent mostly measures
Because 90 of the 100 cases are common-class cases, the headline number is dominated by performance on the common class.
- 4Consider the rare class
The rare class could be failing badly while the headline number barely moves, because it contributes only 10 of the 100 cases.
The 95 percent figure is not a trustworthy estimate of production behavior. The aggregate score is only meaningful when the eval set's composition matches the workload it is meant to represent.
The before and after panels show the mechanism. In the original mix, the common class fills most of the set and so most of the headline number. A calibrated set gives each class its real share of the workload, and the aggregate is then recomputed from a mix that reflects production. The point of calibration is not to make the number higher or lower; it is to make the number answer the question you actually care about.
Counts Versus Averages
An evaluation report often mixes two kinds of measurement. Some criteria are reported as a count of cases that cleared the criterion, out of the total number of cases. Other criteria are reported as an average percentage across the cases. The source report uses both forms in the same run, so reading the report correctly means first noticing which form each criterion uses.
Reading the baseline run
In a baseline run on 42 test cases, C1 cleared on 36 cases, C4 cleared on 28 cases, C2 averaged 73 percent, and C3 averaged 91 percent. What does each number tell you?
- 1Identify the form of each criterion
C1 and C4 are counts of cases out of 42. C2 and C3 are averages across the cases.
- 2Read the counts as totals
C1 cleared on 36 of 42 cases and C4 on 28 of 42. A count tells you how many cases passed.
- 3Read the averages as typical levels
C2 averages 73 percent and C3 averages 91 percent. An average tells you the typical level across cases.
- 4Avoid direct comparison
The two forms cannot be compared directly without converting them to a common scale. A high average also does not mean every case cleared.
Counts and averages answer different questions. The report is only read correctly when each number is interpreted in its own form.
Misses and Hard Fails
A missed case and a hard fail are different outcomes. In the source run, six cases missed a clause under C1. Those six misses are not all equally serious. Two of the missed cases involved material clauses, and those two were classed as hard fails. The other four are recorded as misses without the hard-fail label. The distinction matters because hard fails must be fixed before production rollout.
| Outcome | What it means in the source run | How it affects the report | What must happen before rollout |
|---|---|---|---|
| Miss | A case missed a clause under C1, without the hard-fail label | Counts against the criterion's count | Recorded and tracked |
| Hard fail | A miss involving a material clause | Carries the hard-fail label in addition to being a miss | Must be fixed before production rollout |
Misses and hard fails as they appear in the baseline run
Judging Production Readiness
The question an evaluation has to answer is not whether the report contains good numbers, but whether the model as a whole is ready to be used. The aggregate pass rate is compared against the validation threshold, which is a whole-model check. Individual criteria cannot replace it. Each criterion can look acceptable while the aggregate still falls short. The reverse is also worth noticing: the aggregate is a single number, so the criteria beneath it are where you find out why it is low.
Mistakes When Reading Eval Reports
Common mistake Blaming the model before checking the eval set
What it looks likeA team sees low pass rates on two classes and immediately plans more training.
Why it failsUneven results can come from a labeling problem or an eval set problem. The eval set is checked first.
Do this insteadCheck composition and labels, then decide whether the model needs to change.
Common mistake Trusting the headline number without looking at the class mix
What it looks likeA 95 percent pass rate on a set that is 90 percent common-class cases is reported as production quality.
Why it failsThe aggregate mostly describes the common class when the set underweights a rare class that real traffic sends in equal numbers.
Do this insteadCompare the eval set's composition with the real workload before trusting the aggregate.
Common mistake Comparing a count directly with an average
What it looks likeReading C1 at 36 of 42 cases as if it were the same kind of number as C2 at 73 percent.
Why it failsA count says how many cases passed; an average says the typical level. They need a common scale before comparison.
Do this insteadIdentify each criterion's form first, then interpret it in its own terms.
Common mistake Treating every miss as equally serious
Why it failsSome misses involve material clauses and are classed as hard fails, which must be fixed before rollout.
Do this insteadRead the hard-fail labels alongside the totals.
Practicing the Reading
A report on 42 cases shows C1 cleared on 36 cases, C4 cleared on 28 cases, C2 averaged 73 percent, and C3 averaged 91 percent. Six cases missed a clause under C1, and two of those misses were classed as hard fails. Explain which numbers are counts and which are averages, and state whether the hard fails must be resolved before rollout.
Hints
- Look at whether each criterion is expressed as cases out of 42 or as a percentage across cases.
- Think about what a hard fail means relative to a plain miss.
Key Takeaways from Eval Reports
- 1An eval set measures a model's performance, so its composition and labels shape the score you see.
- 2When results are uneven across classes, check the eval set and its labels before concluding the model is at fault.
- 3Eval set calibration means making the set's class mix represent the real case-class distribution; an underweighted set can make a headline number misleading.
- 4Counts and averages answer different questions, and a miss and a hard fail carry different weight; hard fails must be fixed before production rollout.
- 5Judge readiness by comparing the aggregate pass rate with the validation threshold, and use the individual criteria to explain any shortfall.
At a glance
- An eval set measures a model's performance, so its composition and labels shape the score you see.
- When results are uneven across classes, check the eval set and its labels before concluding the model is at fault.
- Calibration makes the eval set's class mix represent the real case-class distribution; an underweighted set produces misleading aggregates.
- Counts and averages answer different questions, and hard fails carry more weight than ordinary misses and must be fixed before rollout.
- Judge readiness by comparing the aggregate pass rate against the validation threshold, and use individual criteria to explain shortfalls.