Imagine a classifier assigns 80% confidence to 100 ticket categories. If about 80 labels are correct, that group is consistent with calibration at that level. One group is not enough: check across confidence ranges on representative held-out examples, with enough cases to distinguish real patterns from sampling noise.
Calibration differs from accuracy. A model can classify many cases correctly and still overstate its probabilities. The Guo and colleagues paper studies this mismatch in neural classifiers and examines methods for adjusting confidence estimates.
The distinction matters if a product sends uncertain cases to a person or acts on a probability threshold. A language model saying “I am confident” has not supplied a validated correctness probability. Define a measurable confidence signal and an outcome label for the particular task, test their relationship, and recheck it when the workload changes. Calibration does not guarantee that any individual answer is right.
An overall probability score does not isolate calibration either. The scikit-learn calibration guide notes that Brier loss and log loss combine calibration with discriminative power and the uncertainty in the data, so a lower Brier loss does not necessarily mean a better-calibrated model.
Same predictions, different routing
Consider two invented ways to score the same 100 ticket-label predictions. Each score is a claimed probability that the chosen label is correct. The labels, correct answers and ordering of the two groups stay fixed. Only the reported probabilities change.
| Group | Right / total | A (%) | B (%) |
|---|---|---|---|
| Group 1 | 35 / 50 | 70% | 90% |
| Group 2 | 45 / 50 | 90% | 95% |
Both scoring rules have the same 80% classification accuracy: 80 correct labels out of 100. Score A matches the assigned group frequencies; Score B overstates both. Higher confidence has not made the underlying predictions more accurate.
Suppose a routing rule accepts labels automatically at at least 90% confidence and sends the rest to review. Score A accepts 50 labels, with five wrong. Score B accepts all 100, with twenty wrong. The chosen threshold is only an illustration, not a recommended policy. In a real workflow, measure errors among accepted cases alongside how many cases bypass review, and choose the trade-off for the cost of mistakes.
Do these two matching groups prove Score A is calibrated?
No. These are assigned numbers, not observed validation results. Even in real data, matching a few finite groups does not prove population calibration, reliable scores within every subgroup or future performance. Report how many labeled cases support each confidence range, inspect relevant slices and allow for sampling noise.
Check the score on cases it has not learned from
Keep the data used to fit a confidence mapping separate from the cases used to assess it. The scikit-learn calibration guide explains why fitting the calibrator on the classifier’s own training predictions can bias its probabilities. An untouched evaluation set checks the resulting score rather than repeating its fitting exercise.
Recheck the score when the workload changes. Ovadia and colleagues found that calibration on the original distribution did not guarantee calibration under dataset shift in their classifier benchmarks. Their image, text and categorical experiments do not validate confidence for arbitrary generated answers. For an LLM workflow, define the specific outcome and collect relevant labeled evidence before treating a score or confident phrase as a correctness probability.
Work through expected calibration error
Guo and colleagues summarize calibration with expected calibration error (ECE): group predictions into confidence bins, take each bin’s gap between average confidence and accuracy, and weight it by the bin’s share of predictions. Take ten predictions in two occupied bins:
| Confidence | Predictions | Correct |
|---|---|---|
| 0.60 | 5 | 4 (80%) |
| 0.90 | 5 | 4 (80%) |
The first bin understates its accuracy by 20 points and the second overstates it by 10. ECE is 5/10 × 0.20 + 5/10 × 0.10 = 0.15. Put all ten in one bin and the summary becomes |0.80 − 0.75| = 0.05, because the two errors point in opposite directions and cancel in the average. The predictions did not change, only the binning, so report the bin edges and the count in each bin with any ECE.
Sources
- Guo et al.: On Calibration of Modern Neural Networks — Defines calibration in terms of correctness likelihood and studies probability calibration methods.
- Ovadia et al.: Can You Trust Your Model's Uncertainty? — Evaluates classifier uncertainty under dataset shift across image, text and categorical benchmarks. Calibration on one distribution need not carry to another.
Go deeper
- scikit-learn: Probability calibration docs
Read reliability diagrams and compare calibration methods and their evaluation requirements.
- scikit-learn: Probability calibration curves docs
Run the classifier example and compare reliability curves, Brier score, log loss and classification metrics. Inspect how probability estimates and label decisions differ.