Why the same percentage hides different results

The same 80% accuracy can conceal different mistakes. For example, a classifier may improve at identifying kit changes while sending more rescheduling requests to the cancellation queue. The overall percentage hides that change. Google's course links metric selection to the task and the consequences of mistakes; the proportion of correct answers alone is insufficient for acceptance.

The following teaching example concerns a radio rental desk. All messages, counts, and versions are fictional; no model was run. The practical output is a table showing where requests were sent, an arithmetic check, and a predeclared acceptance rule for an update. You can do this manually using previously saved results.

Freeze the categories and original answers

First define three categories: rescheduling collection, changing the kit, and cancelling a booking. Each request in this example has one confirmed intent. “Keep the two radios; I'll collect them on Friday instead of Thursday” is a rescheduling request: the quantity stays unchanged, and the date changes. The classifier suggests an operator queue; a person separately confirms changes to the booking itself.

Record the request identifier, original text, reference category, and answers from versions A and B. Use 30 records, ten per category, comparing identical records against identical references. Put empty answers, failures, or unexpected categories in a separate outcome column; never silently remove them from the denominator. All answers in our example contain valid categories.

Fill the matrix by error direction

Create a three-by-three grid. Rows hold reference categories and columns hold classifier answers, following the Hugging Face documentation. Keep the same order on both axes: rescheduling, kit change, cancellation. Each record adds one to exactly one cell. Matches occupy the diagonal; other cells show specific directions of confusion.

For fictional version A, the rescheduling row is 8, 1, 1; the kit row is 1, 9, 0; the cancellation row is 2, 1, 7. The first row means eight rescheduling requests were correct, one became a kit change, and one became a cancellation. The reverse error, cancellation classified as rescheduling, occurred twice.

The diagonal totals 24, giving overall accuracy of 24 out of 30, or 80%. For diagnosis, inspect an individual cell: one rescheduling request became a cancellation. Dividing that cell by its row total gives 1 out of 10, or 10% of actual rescheduling requests. Always name the denominator to distinguish this from the proportion among predicted cancellations.

Assign consequences before comparing versions

Before inspecting the new version, record which errors deserve special attention. For this example, assign five points whenever a rescheduling or kit change request is misclassified as cancellation, one point for any other error, and zero for a correct answer. This chosen review priority scale represents neither money nor measured damage, and is no universal standard. Save its rationale alongside it.

Version B's illustrative rows are 7, 0, 3; 0, 10, 0; and 1, 2, 7, in the same order. It still has 24 correct answers and six errors. However, three rescheduling requests now become cancellations. Version A scores 5 for its single such error plus 5 for the others: 10 points. Version B scores 15 plus 3: 18 points. Accuracy remains 80%, but the chosen consequence measure worsens.

Check the table and acceptance rule

Check that all cells total 30, each row totals ten, and cells outside the diagonal total six. Then open every record classified as cancellation instead of rescheduling, plus several correctly classified records. Compare the text, reference, and saved answer: swapped columns or different category orders can reverse the conclusion.

For this example, predeclare that total errors on this dataset must not increase, rescheduling and kit change requests misclassified as cancellations must not increase, and the point total must not worsen. Version B fails this rule. Also compare answers by identifier to see which requests improved and which deteriorated. Aggregate counts alone cannot show that different individual cases now account for the same number of errors.

Investigate causes and preserve the limits of the conclusion

After checking the arithmetic, read the misclassified requests and group observations, such as short messages or mentions of an earlier date. Microsoft describes subgroup analysis because overall scores can hide subsets with more frequent failures. In our procedure, such grouping suggests the next test; the matrix itself does not establish why the classifier failed.

Thirty fictional records cannot establish reliability on real traffic. Equal category counts do not reflect their operational proportions, and the chosen weights depend on the process. Save the dataset version, scoring scale, and settings; after a change, repeat the check on new independent requests. Messages containing several intents need another evaluation method. Even zero errors in a particular direction in a small sample cannot guarantee none in future; permission to change bookings remains a separate decision.

Sources