Guide · Human in the loop

Confidence calibration: when a model says 0.9, it should be right nine times in ten.

A confidence score is only useful for routing work if it means what it says. Calibration measures the gap between stated confidence and observed accuracy — and closes it.

This guide defines calibration precisely, shows how to read a reliability diagram and compute expected calibration error, gives the published evidence that modern networks and chat-tuned language models are overconfident, compares Platt scaling, isotonic regression, histogram binning and temperature scaling, and shows how calibrated scores set human review thresholds.

Updated · 9 sources

A reliability diagramobserved accuracy plotted against stated confidence
Confidence binsscores grouped along the horizontal axis: 0.5–0.6, 0.6–0.7…
Observed accuracythe share right in each bin, on the vertical axis
The diagonalperfect calibration: accuracy equals confidence
Bars below the lineoverconfident — scores promise more than they deliver
Bars above the lineunderconfident — right more often than claimed
Counts per binshown alongside, because the diagram alone hides them

What is confidence calibration?

Confidence calibration is the agreement between a model’s stated confidence and how often it is actually right. A model is calibrated if, of all the predictions it scores 0.8, about 80% are correct. Calibration is measured with reliability diagrams and expected calibration error (ECE), and corrected after training by fitting a map from raw scores to observed accuracy — Platt scaling, isotonic regression, histogram binning or temperature scaling.

Calibration and accuracy

Confidence calibration is separate from accuracy.

Two models with the same accuracy can differ completely in how trustworthy their scores are. Accuracy asks “how often is it right?”; calibration asks “does its confidence tell you when?”.

ranking

Discrimination

Whether higher scores go to correct predictions more often than lower ones. Measured by accuracy at a cut-off, or by the area under the ROC curve.

  • Orders cases well
  • Says nothing about the numbers themselves
  • Unchanged by monotonic rescaling
  • Can be excellent while miscalibrated
meaning of the score

Calibration

Whether a score of p means a probability p of being right. Measured by reliability diagrams, ECE and the Brier score.

  • Makes thresholds meaningful
  • Lets scores be compared and combined
  • Fixed after training by remapping
  • Drifts when the data changes
Does it rank right answers higher?Question answeredDoes 0.9 mean 90%?
Accuracy, ROC AUCTypical measureECE, Brier score, reliability diagram
Better model or featuresFixed byA calibration map fitted on held-out outcomes
Fewer errors overallWhy it matters for reviewThe threshold sends the right items to people
Reliability diagrams and ECE

How to measure confidence calibration: reliability diagrams, ECE and Brier score.

Group predictions into confidence bins, compare each bin’s average confidence with its accuracy, and summarise the gaps. Guo et al. used 15 equal-width bins.

ECE, with a worked example
Expected calibration error (ECE), M bins over n values:

  ECE = Σ  |B_m| / n  ×  | accuracy(B_m) − confidence(B_m) |

Illustrative: 1,000 extracted values, three bins

  bin        values  mean score  accuracy  gap   weight  term
  0.5–0.7      200      0.62       0.55    0.07  × 0.20 = 0.014
  0.7–0.9      300      0.81       0.74    0.07  × 0.30 = 0.021
  0.9–1.0      500      0.96       0.90    0.06  × 0.50 = 0.030
                                                   ECE  = 0.065

Overconfident in every bin: scores promise
about 6.5 points more accuracy than delivered.

Four measures and what each misses

  • ECEWeighted average gap across bins. Sensitive to the number and kind of bins.
  • MCEThe largest gap in any bin — the worst case, often a thin bin.
  • Brier scoreMean squared difference between score and outcome. Mixes calibration with discrimination.
  • Log lossPunishes confident mistakes hardest; unbounded for a confident miss.

Read diagrams with the counts. Guo et al. note a reliability diagram does not show how many samples fall in each bin. A wild bar over ten values matters less than a small gap over ten thousand.

Published findings

Deep networks are often overconfident, and post-training can break an LLM’s calibration.

Guo et al. found calibration got worse as networks grew deeper and wider, even as accuracy rose, and that a one-parameter fix closed most of the gap. OpenAI’s GPT-4 report shows the same drift for a language model after post-training.

16.53%
ECE of a 110-layer ResNet on CIFAR-100 before calibration — falling to 1.26% after temperature scaling.
Guo et al., ICML 2017
0.007 → 0.074
ECE of GPT-4 on an MMLU subset before and after post-training: “post-training hurts calibration significantly.”
OpenAI GPT-4 Technical Report
200–1,000
calibration cases below which Platt scaling outperformed isotonic regression across nine learning methods.
Niculescu-Mizil & Caruana, 2005
  1. 1950Brier scoreA scoring rule for probability forecasts, first for weather.
  2. 1999Platt scalingA sigmoid fitted to a classifier’s outputs turns scores into probabilities.
  3. 2001–02Binning and isotonicZadrozny and Elkan calibrate with histogram binning, then isotonic regression.
  4. 2005Which method whenNiculescu-Mizil and Caruana: isotonic needs more data; Platt wins when it is scarce.
  5. 2017Modern networksGuo et al.: deep networks are poorly calibrated; temperature scaling fixes most of it.
  6. 2023Language modelsGPT-4’s report shows post-training raising calibration error.
Post-hoc calibration

Platt scaling vs isotonic regression vs temperature scaling: choosing a method.

All four methods fit a map from raw score to probability on data the model was not trained on. They differ in how flexible that map is — and so in how much data they need.

2 parameters

Platt scaling

A logistic curve fitted to the scores. Corrects S-shaped distortion; stable with little data.

1 parameter

Temperature scaling

Divides a network’s logits by one learned temperature. Keeps the ranking; in Guo et al.’s tests “surprisingly” often the most effective method.

per-bin

Histogram binning

Each score bin is replaced by its observed accuracy. Simple, but coarse and sensitive to bin edges.

non-parametric

Isotonic regression

A stepwise, never-decreasing map. Fixes any monotonic distortion; overfits when data is scarce.

How many labelled outcomes do you have for this score?

Few — hundredsPlatt scaling, or temperature scaling for a neural network’s logits. Few parameters, little overfitting.
Many — thousands or moreIsotonic regression, which can correct any monotonic distortion. Check it on held-out folds.
It grows over timeStart parametric, switch to isotonic once evidence is rich, and promote a new map only when held-out calibration improves.
Doing it right

Confidence calibration in practice, from held-out data to review thresholds.

Calibration is a small amount of code and a large amount of discipline about data. Most failures come from calibrating on the wrong outcomes or never refitting.

  1. Collect outcomes

    Pair each score with whether the value turned out right — from labelled sets or reviewer decisions.

    ground truth
  2. Hold data out

    Fit the map on data the model never trained on; scikit-learn’s calibrator uses cross-validation for this.

    no leakage
  3. Fit per segment

    One map per field, class or document type — miscalibration differs between them.

  4. Prove it

    Compare ECE and Brier score on held-out folds before and after; keep the old map if it is not better.

  5. Refit and watch

    Refit on a rolling window as data drifts, and re-read the reliability diagram.

    drift
Pitfalls that make calibrated scores lie
  • Biased outcomesIf only low-score items are reviewed, high-score accuracy is never measured. Audit a blind sample.
  • Convenience clicks as labelsA reviewer reformatting a correct value is not a correction; count it as right.
  • One map for everythingA global fit can be perfect on average and wrong for every field.
  • ECE alonePair it with the Brier score and the diagram; ECE can look good with a few huge bins.
  • LLM scores taken at face valueToken probabilities and self-reported confidence both need fitting to real outcomes before they set a threshold.
On Botminds

How Botminds calibrates confidence field by field from reviewer decisions.

On Botminds each field’s raw confidence is mapped to how often values like it were actually right, using your reviewers’ own decisions — and the map sharpens as evidence grows.

Per-field calibration on Botminds
  1. Raw score firsta new field uses the model’s own confidence while evidence builds
  2. Fit a curvesmooth while evidence is thin, stepwise once it is rich
  3. Prove ittested on held-out folds; promoted when calibration error falls
  4. Route the workcalibrated scores decide which values reach a reviewer
  5. Read the verdictsapprove and same-value edits count as right; real changes as wrong; machine re-runs set aside

each review adds evidence for the next fit

Curves refit daily or on demand over a rolling window, and a reliability diagram is there to read for every field. Read human in the loop, and see how calibrated thresholds drive straight-through processing.

Questions people ask

Confidence calibration: common questions.

The technology behind itHuman in the loopApprovals, review and calibrated confidence
What is confidence calibration in machine learning?

Confidence calibration is how well a model’s predicted confidence matches its observed accuracy. If a calibrated model gives 100 predictions a confidence of 0.8, about 80 of them are right. Calibration is measured with reliability diagrams and ECE and fixed after training with a calibration map.

What is expected calibration error?

ECE groups predictions into confidence bins and takes the average gap between each bin’s accuracy and its average confidence, weighted by how many predictions fall in the bin. Zero means perfect calibration on that binning.

What is the difference between ECE and Brier score?

ECE measures calibration alone, through bins. The Brier score is the mean squared error between predicted probability and the 0/1 outcome, so it rewards both calibration and the ability to separate right from wrong.

Platt scaling vs isotonic regression: which should I use?

Platt scaling fits a two-parameter logistic curve and works well with little data. Isotonic regression fits any monotonic shape but overfits when data is scarce; Niculescu-Mizil and Caruana found Platt better below roughly 200–1,000 calibration cases.

What is temperature scaling?

A one-parameter version of Platt scaling for neural networks: divide the logits by a learned temperature before the softmax. It changes confidence without changing which class is predicted.

Are large language models well calibrated?

Pre-trained models can be well calibrated on multiple-choice questions, but post-training can hurt it: GPT-4’s technical report shows ECE rising from 0.007 to 0.074 on an MMLU subset. Calibrate LLM confidence against your own reviewed outcomes before relying on it.

How do I plot a reliability diagram?

Bin predictions by confidence, plot each bin’s average confidence against its accuracy, and draw the diagonal. Bars below the line are overconfident. scikit-learn’s calibration_curve function computes the points.

See it on
your own work.

Bring one process and its documents. We’ll show you the agents, the controls and the record, running on your data.