AI Development Guide

TypeSafe Confidence and Calibration in 2026: Setting Thresholds That Work

A model that can say it is unsure is worth more than one that always sounds certain. This guide covers what TypeSafe's confidence value actually measures, what calibration does and does not promise, and how to choose thresholds from evidence rather than instinct.

Distk Editorial Sep 2026 11 min read

TypeSafe returns a confidence value from 0 to 1 on every Choice and Score answer, computed from how peaked the probability distribution is. All the probability on one option gives 1.0; an even spread gives a low number. Noul answers carry no confidence because one number fully describes a two-outcome distribution. Confidence is not a promise of correctness: calibration means stated probabilities match real frequencies across groups of predictions, and TypeSafe states plainly that this is not a guarantee about any single answer. The documented pattern is three bands, act automatically on high confidence, verify or review in the middle, and escalate to a person or another system at the bottom, with a 0.5 floor and a higher bar for destructive actions than read-only ones. Choose the numbers by plotting confidence against accuracy on your own labelled data in 2026, and staff the middle band deliberately.

What Is Confidence in TypeSafe in 2026?

Every Choice and Score answer includes a probabilities property holding the distribution across your options or levels. The shape of that distribution is what tells you how certain the model is: concentrated on one outcome means a confident answer, spread out means an uncertain one. The confidence property collapses that shape into a single number from 0 to 1 so your code can threshold on it without doing the maths. Noul answers do not carry one.

Confidence is therefore not an extra opinion from the model. It is a statistic computed from the distribution the answer already gives you. TypeSafe computes it so the common case needs no extra work on your side, but the raw probabilities are always there if you want to compute something else.

Explain It Like I Am Five: The Torch Beam

Imagine you ask a friend to point at the right door in a corridor, and your friend is holding a torch.

If your friend is sure, the beam is narrow and bright and lands on one door. You can walk straight through it.

If your friend is not sure, the beam is wide. It spreads across three doors at once, a bit of light on each. The torch is still pointing somewhere, and the brightest patch is still on one door, but you can see the light is smeared.

Confidence is just a number describing how narrow the beam is. 1.0 means a tight spot on one door. A low number means a wide wash of light over several.

Here is the clever part. Your program can look at the width of the beam before it walks anywhere. If the beam is narrow, walk through the door. If the beam is wide, stop and ask a grown-up.

And one more thing, which is important and easy to forget. A narrow beam means your friend is sure. It does not mean your friend is right. Sure and right are different words.

How Is Confidence Calculated in 2026?

Confidence is derived from how the probability is spread across the options or levels. All of the probability on one option gives 1.0, and the more evenly it spreads, the lower the confidence. TypeSafe's documentation includes an interactive demo that approximates confidence for a three-option Choice as (3 × largest probability − 1) / 2, and notes this is the demo's approximation rather than a general formula.

Work that through and the intuition arrives quickly. With three options, a probability of 1.0 on one gives confidence 1.0. An even split of one third each gives confidence 0.0, because no option is a winner. The documented demo shows 90 percent, 6 percent and 4 percent giving a confidence of 0.85.

What low confidence means differs by primitive, and TypeSafe spells it out. Low confidence on a Choice often means none of the options is a clear winner over the others. Low confidence on a Score often means the levels are ambiguous, multi-dimensional, or the state does not contain enough to go on. Those are three different bugs in your question design, and each has a different fix.

Why Is Being Able to Say "I Do Not Know" Valuable?

TypeSafe puts this as a principle rather than a feature: if an intelligent system, whether human or machine, cannot express honest uncertainty, the system cannot be trusted. Confidence gives the model a built-in way to say it is not sure about this one, which lets your code implement different behaviour for different levels of certainty.

That is the foundation for systems you can rely on, and it is the practical difference from a text model that sounds equally assured whether it is right or guessing. An uncertain answer is not a failed answer. It is a correctly reported state of the world, and the system around it decides what to do about it.

What Does Calibration Promise, and What Does It Not?

Calibration is the property TypeSafe trains for with RLCD, reinforcement learning for calibrated decisions. Its stated contract is that higher probability should correspond to a greater chance that the answer is correct, and specifically that across many predictions from a well-calibrated model, outcomes assigned 0.2 should occur about 20 percent of the time, outcomes at 0.8 about 80 percent of the time, and outcomes at 1.0 should occur 100 percent of the time.

Then comes the sentence every team should paste into its own internal documentation: these rates describe groups of predictions, not a guarantee about any single answer. TypeSafe repeats the point elsewhere, noting that calibration is measured across groups of predictions and does not guarantee that an individual answer is correct.

What this means operationally in 2026

You can use calibration to set a threshold that gives a predictable error rate across a population of decisions. You cannot use it to tell a customer why their individual case was decided a particular way. If your process needs per-case justification, that requirement is met by logging the inputs and the distribution, not by the confidence number.

How Should Your Code Use Confidence in 2026?

TypeSafe's documented starting pattern divides confidence into three ranges, each producing a different system behaviour. It is deliberately simple, and it is the right shape for a first implementation.

BandWhat TypeSafe recommendsTypical implementation
High confidenceAct automatically. The model has a clear read and you can proceed without human involvement.Execute the branch.
Medium confidenceProceed with caution. Ask the user to confirm, flag for review, or gather more information before acting.A confirmation step or a review queue.
Low confidenceDo not act. Route to a human, request clarification, or fall back to a different system.Escalation, including to a reasoning model.

Where you draw those boundaries depends on the stakes, and TypeSafe is explicit that a confidence threshold is not one number. Different actions within the same system should be gated at different levels depending on the consequences of getting it wrong. It suggests a 0.5 floor to catch anything the model reports as genuinely uncertain, with the threshold for acting without confirmation set higher for a destructive operation than for a read-only one.

How Does Confidence-Gated Routing Work in Practice?

TypeSafe's documented example is a voice banking interface, which is a good choice because the actions have obviously different stakes. One Choice question classifies the intent, and the code then applies a different confidence bar to each action.

action = response.answers["intent"]

# Below 0.6 confidence on any action, route to a human
if action.confidence < 0.6:
    route_to_support_agent(account_id)

elif action.choice == "check_balance":
    # Low stakes. 0.6 confidence is sufficient.
    show_balance(account_id)

elif action.choice == "approve_transfer":
    if action.confidence > 0.85:
        # High stakes, but high confidence. Safe to act automatically.
        approve_transfer(account_id)
    else:
        # High stakes, moderate confidence. Verify intent first.
        ask_user_to_confirm("Just to confirm: you would like to approve this transfer?")

else:
    route_to_support_agent(account_id)

The 0.6 floor catches anything genuinely uncertain. Above it, checking a balance at 0.6 is fine because the worst case is the customer hearing their balance unnecessarily. Approving a transfer needs above 0.85, and anything between goes to a confirmation. One model answer, three different behaviours, all decided by ordinary code you can read in a review.

How Do You Choose the Right Threshold for Your Data?

Empirically, not by instinct. TypeSafe's build guide says to test thresholds by plotting confidence against accuracy on your data, and that is the only method that actually tells you anything about your material. The procedure is short enough to do in an afternoon.

  1. Label 100 to 300 real examples yourself. Real ones from your product, including the awkward ones.
  2. Run them all in one batch. Record the answer, the full probability distribution and the confidence for each.
  3. Bucket by confidence. Group into bands such as 0.9 and above, 0.7 to 0.9, 0.5 to 0.7, and below 0.5.
  4. Measure accuracy per band. This is the number that tells you where automatic action becomes safe.
  5. Set each action's threshold from its own cost of being wrong. A reversible action tolerates a lower bar than an irreversible one.
  6. Count how much lands in the middle band. That volume is your human review workload, and it needs to be a number someone has agreed to staff.
  7. Re-run when the model version moves. Aliases move on their own, so thresholds tuned against one version deserve re-checking against the next.

When Should You Not Use a Confidence Threshold?

TypeSafe's own troubleshooting notes flag this, and it corrects a habit teams pick up quickly. If all you care about is choosing the best option, you simply take the option the model selected; you do not need a threshold at all. And if you have a specific statistical algorithm in mind, you should probably be using the raw probabilities rather than the collapsed confidence value.

Two more cases where confidence is the wrong instrument. A Noul has none, so thresholding a Noul means thresholding the noul value itself, which is a probability rather than a certainty measure. And when a second option carries meaningful probability, the useful signal is that probability, not the headline confidence: TypeSafe's Choice documentation shows a ticket routed to returns while billing still gets a copy because its 0.35 share crossed a 0.25 threshold.

What Does a Low-Confidence Answer Tell You About Your Question?

Often more than it tells you about the input. Persistent low confidence across many inputs is usually a question design problem, and the fix depends on the primitive.

SymptomLikely cause (per TypeSafe's docs)Fix to try in 2026
Choice confidence low across many inputsNone of the options is a clear winner; option descriptions overlapRewrite descriptions to separate options, or use structured criteria with what it covers, what it does not, and examples
Score confidence low across many inputsLevels are ambiguous or multi-dimensionalSplit into several Score questions and combine with weights in code
Confidence low only on long inputsThe state contains material unrelated to the decisionFilter the state first; accuracy falls as irrelevant content grows
Confidence high but answers wrongThe question is being read literally and means something other than you intendedState the exact condition; put boundary cases in the criteria
Confidence jumps after adding examplesThe examples matched the input shapeGood, but verify on separate inputs; higher confidence does not establish correctness

That last row matters. TypeSafe's Score documentation shows a case where adding a well-matched example moved confidence from 0.35 to 0.96, and states plainly that higher confidence does not establish which answer is correct. Treat a confidence jump as a prompt to re-test, not as proof.

What Are the Common Confidence Mistakes in 2026?

Key Takeaways for 2026

Distk sets these thresholds with clients the boring way: label a real sample, measure accuracy per confidence band, and agree who staffs the middle before anything ships.

Sources

TypeSafe Confidence in 2026: FAQs

What is confidence in TypeSafe?

A number from 0 to 1 computed from how the probability is spread across your options or levels. All the probability on one option gives 1.0; the more evenly it spreads, the lower the confidence. It is returned on Choice and Score answers only.

Does high confidence mean the answer is correct?

No. TypeSafe states that calibration is measured across groups of predictions and does not guarantee that an individual answer is correct. Its Score documentation also shows that adding examples can raise confidence without establishing which answer is right.

Why do Noul answers have no confidence?

Because a Noul distribution has only two outcomes, so the single value from 0 to 1 describes it completely. For a Noul you threshold the value itself, choosing the cut point by the cost of being wrong in each direction.

How should I set a confidence threshold?

Per action, not per system, and from data. Label real examples, run them, bucket results by confidence band, and measure accuracy in each band. TypeSafe's own guidance is to test thresholds by plotting confidence against accuracy on your data.

What does low confidence usually mean?

On a Choice it often means no option is a clear winner, which usually points at overlapping option descriptions. On a Score it often means the levels are ambiguous or multi-dimensional, or the state does not contain enough to judge.

When should I not use a confidence threshold?

When all you need is the best option, in which case you simply take the choice. And when you have a specific statistical algorithm in mind, where TypeSafe suggests using the raw probabilities rather than the collapsed confidence value.

Set the threshold from evidence, not instinct

Distk runs the unglamorous part of a decision-model rollout: labelling a real sample, measuring accuracy by confidence band, and agreeing who staffs the uncertain middle before anything goes live.

Start the conversation →