Skip to content
← Blog Deep Dives · Field note

How a decision model produces calibrated probabilities

A probability only helps if 0.8 means 80% right. How a decision model is trained so its numbers mean that, and how ECE and the coverage curve measure it.

Balys Kriksciunas · · 8 min read
A reliability chart: stated probability against how often the answer was right, with bars close to the diagonal and a threshold line at 0.8

Ask a chat model which team should handle a ticket and it writes “billing”. Ask how sure it is and it may write “95% confident”, a number it generated with no measurement behind it. A decision model answers with a probability for every option, and it is trained so that those probabilities match how often it is right. This post explains how that works on turion and how to check it.

What “calibrated” means

A probability is calibrated when answers the model gives with probability p turn out right about p of the time. Weather forecasts have been scored this way for decades: on the days the forecast said “70% chance of rain”, it rained on about 70% of them. That is what makes the number usable, because you can plan around it.

For a model routing tickets, calibration is what lets you automate part of the work safely. If the model answers “billing” with probability 0.8 and is right 80% of the time on cases like that, you can send the confident answers straight to code, route the rest to a person, and know the error rate of the automatic path. If that 0.8 is right only 60% of the time, every threshold you set rests on a wrong number.

Why a text label can’t give you this

A general language model produces free text, and its confidence shows up in unreliable places. The probability it gave the token “billing” while generating it is a common stand-in, but that number moves with the sampling temperature, with the prompt, and with the many wordings that express the same answer. The words “I’m 90% sure” are worse, since they are generated text. None of these track how often the answer is actually right, so none of them make a good threshold.

The scores a model gives a fixed, closed set of options are a better starting point: there is no wording to vary and nothing is sampled. A decision model reads its answer from those scores, with no generated text in between.

Where a decision model’s probabilities come from

A decision model takes a state (a ticket, a document, a JSON record) and a typed question with a fixed list of options, and returns a probability for each option. When turion trains one, the prompt is the state, the question and the options labelled A, B, C and so on, rendered with the base model’s chat template. The base model stays frozen. The answer is read from the scores the base gives those letters at the first position of its reply, and training changes only the 26 rows of the output layer that score the letters A to Z, starting from the base’s own rows.

Because the answer is read from a closed set of letter positions, the model can only reply with one of your options. The scores are normalised into a distribution over your options, and that distribution comes back as the probabilities field: a number in [0, 1] for every option, summing to 1. The highest is the choice, and its probability is the confidence.

These raw scores are usually overconfident: the top option gets a higher probability than its accuracy deserves. One more step fixes that.

The temperature step is the calibration

Most people know temperature as a setting that makes a chat model’s text more or less random. On a decision model it is a fitted parameter, and fitting it is the calibration.

Temperature scales the distribution. A temperature above 1 flattens it, moving probability from the top option to the others, and a temperature below 1 sharpens it. After training, turion fits one temperature on the held-out evaluation cases so that answers given probability 0.8 come out right about 80% of the time. If the raw model says 0.9 where it is right 0.8 of the time, a temperature slightly above 1 pulls its probabilities down to match. If it undershoots, a temperature below 1 pushes them up.

Two details keep the reported number fair. The temperature is fitted on cases the model never trained on, and the calibration error is cross-fitted: the held-out cases are split into five folds, and each fold is scored with a temperature fitted on the other four. The number in the report is therefore out of sample, a measure of how the calibration does on new data. The temperature ships with the model, so the probabilities your code receives in production are the calibrated ones.

The trained artifact is small as a result: the frozen base is untouched, and the result is the 26 trained output rows plus the fitted temperature, a file of about 60 KB.

Measuring it: ECE and the reliability strip

The metric is the expected calibration error, ECE. It sorts the held-out cases into 15 bins by the probability the model gave its answer. In each bin it takes the gap between the bin’s mean probability and the share of its answers that were right, and it averages those gaps, weighting each bin by the cases it holds. An ECE of 0 is perfect, and an ECE of 0.038 means the stated probabilities are off by about four points on average.

The job’s page draws the same 15 bins as a reliability strip: one bar per bin, drawn up to the share of its answers that were right, with a mark at the bin’s mean stated probability. On a calibrated model each bar ends at its mark. A bar that ends below its mark shows overconfidence, where the model claimed more certainty than it delivered.

A related number is the Brier score, the mean squared error of the probabilities over the cases, where lower is better. ECE tells you whether “80% confident” means 80% right. Brier measures how far off the probabilities are on a smooth scale, and it penalises wild misses more than small ones.

One distinction matters when you read a report. A training job fits its temperature on the same cases it reports, so its ECE is the cross-fitted number. When you later re-score a model with turion eval on fresh data, the report shows the ECE at the temperature the model ships with, which is the calibration your production traffic gets.

Using calibration to act

The coverage curve in a decision model’s report turns calibration into a rule for your code. For each threshold (0.5, 0.6, 0.7, 0.8, 0.9, 0.95 and 0.99) the curve lists the share of cases the model answered with at least that probability, and how accurate it was on those.

Take the team question of a routing model from the docs’ example report. At a threshold of 0.8, the model answered 67% of cases with a probability of 0.8 or higher, and 99% of those were right. At 0.9 it answered 52% and was still 99% right. Raising the threshold mostly costs coverage: a person sees more tickets.

To pick a threshold, start from the error rate the automatic path can tolerate and take the lowest threshold that reaches it. If a misrouted ticket is cheap to fix and 98% accuracy is acceptable, 0.8 is the line, and two thirds of tickets never reach a person:

team = client.decide("acme/ticket-router", ticket, questions).choices["team"]
if team.confidence >= 0.8:
    assign(ticket, team.choice)
else:
    send_to_review(ticket)

The threshold holds only as long as production looks like the held-out set. A model calibrated on this quarter’s tickets drifts as customers, products and the questions change. Re-scoring on recent data with turion eval shows the drift before it turns into misrouted tickets.

A calibrated model on a public board

Our own decision model, Turion Jev 31B, is measured on the Decision Index, which scores how far each model’s stated confidence sits from how often it is right. Its calibration error is 1.9 points, the lowest in the board’s top 20. In the board’s sample, 44% of its answers came with 90% confidence or more, and those were right 97.3% of the time. When it is very sure, it is almost always right, so code can trust the top of its probability range.

Training a calibrated decision model on turion

turion trains every decision model this way, and each job’s report includes the calibration metrics. A decision dataset is JSONL, one question and its answer per line. Tickets your team has already routed are usually enough: the state is the ticket, and the answer is what your team decided.

turion train --base gemma-4-e4b --data decisions.jsonl --name ticket-router

turion train detects decision data and trains a decision model. turion jobs get then shows the base against the trained model, and for each question the accuracy, the ECE and the coverage curve. Deploy it and ask it the questions it was trained on:

turion deploy acme/ticket-router
turion decide acme/ticket-router --state @ticket.txt --questions router.json

The decision models guide covers the dataset rules, the metrics and the limits, and decision models on turion covers the API and prices. For the model behind the calibration number above, see Turion Jev 31B on the Decision Index and the introduction to decision models.