Evaluation and Quality Engineering

Evaluation and Quality Engineering

Confidence Calibration — Stack

Confidence calibration › Stack

69 of 73 in this book · 3 min read

Technology landscape as of 2026-10-10. Knowledge cutoff May 2026.

Selection criteria

Two separate things are chosen: where the confidence signal comes from, and what is used to assess and correct it. The first is constrained by what the serving path exposes, the second by how much labelled held-out data exists.

  • Signal availability. Whether token-level likelihoods are exposed by the serving endpoint at all, since many hosted interfaces do not provide them and the ones that do are inconsistent.
  • Cost multiplier. Sampling-based confidence costs a multiple of every generation; a trained scorer costs one extra inference; a stated number costs nothing extra and means the least.
  • Granularity. Whether confidence attaches to the whole output, to a claim, or to a specific field, which determines what can be thresholded.
  • Held-out data requirements. How much labelled data a recalibration method needs, and whether you have enough in the segments that matter.
  • Monotonicity constraints. Whether the recalibration method preserves the ranking, since a method that reorders outputs changes which ones a threshold selects.
  • Re-fitting cadence support. Whether the calibrator can be refreshed on a schedule as the input distribution moves, rather than being a setup-time artefact.
  • Reporting. Whether reliability curves with adequate bin populations, and per-segment breakdowns, are produced as a matter of course.

Options

Option Best for Watch out for
Token log-probabilities from the serving endpoint Nearly free when exposed, and a reasonable ranking signal for short, constrained outputs Many endpoints do not expose them; preference tuning degrades their calibration; they measure surprise rather than correctness
Verbalised confidence requested in the output Trivial to obtain, works with any endpoint, and sometimes informative in well-studied domains Systematically overconfident, clusters on round numbers, and is itself generated text subject to every prompt effect
Agreement across repeated samples A signal that needs no internals and no external data, and works with any model Costs several generations per item, and a consistently repeated error is maximally confident
Trained scorers over the output (correctness predictors, entailment and faithfulness models) A single reproducible number per output at one extra inference Trained on some distribution that is not yours; needs its own validation before its score is used as a probability
Post-hoc recalibration methods (temperature scaling, Platt scaling, isotonic regression) Correcting a usable but mis-scaled score when held-out labelled data exists Temperature scaling preserves ranking and fixes only scale; isotonic is flexible and overfits on small samples; all of them assume the distribution holds
Conformal prediction and selective-prediction frameworks Guarantees about coverage at a chosen error rate, rather than a point confidence The guarantees are distribution-dependent and marginal, not per-item; a shift in input distribution voids them
Monitoring and reporting tooling with reliability diagrams (model-monitoring platforms, calibration plotting libraries) Watching calibration continuously as the population moves Needs the paired outcome label to arrive, which is the part most products never instrument

Models

The signal a model exposes about its own certainty is a property of how it was built, and the differences between builds matter more here than general capability. Base models are usually better calibrated on token likelihood than the same models after preference tuning, which compresses the distribution toward confidence and removes much of the resolution a threshold needs — so a score that worked on one build can be useless on its successor without any change in accuracy. Larger models within a family tend to be more accurate and not reliably better calibrated, which means a model upgrade can leave an escalation threshold pointing at the wrong place while every quality metric improves. Reasoning models complicate the picture further: the likelihood of the final answer tokens says little when the answer is the product of a long internal derivation, and the useful signal is more often agreement across repeated derivations. Where the endpoint exposes nothing, sampling several completions and measuring agreement is the general fallback, and it is the one to distrust most on exactly the cases that matter, since a model that has confidently learned something false will repeat it identically every time. Whatever the source, treat any model change as invalidating every fitted calibrator and every threshold derived from it, and re-measure on held-out data before shipping.