# Confidence

Choice and Score answers carry `probabilities`, the full distribution, and `confidence`, one number from 0 to 1 that says how concentrated that distribution is. Concentrated on one outcome means a confident answer; spread out means an uncertain one. A Noul answer carries `noul` and `confidence`, the larger of `noul` and 1 − `noul`.

For a choice or a score the engine computes confidence as one minus the normalised entropy of the probabilities; when Jers combines answers (option orders, two rounds, windows) or applies a tenant temperature, it recomputes it the same way. Whether a confidence of 0.9 means "right nine times in ten" is a calibration property. TypeSafe claims it for Jev. For Jers it was checked on one constructed set of 60 support messages: calibration error 0.17 (`jers-english`) and 0.34 (`jers-typed-decisions`) on held-out folds, 0.13 and 0.10 after a fitted temperature (`measurements/jers-gateway-live-2026-09-23.txt`). Fit it on your own labels (Quality); until then, treat confidence as a ranking signal: higher is more certain, and set thresholds from your own observed error rates.

## Three tiers

```python
answer = r.answers["intent"]
if answer.confidence >= 0.9:
    act(answer.choice)                      # automatic
elif answer.confidence >= 0.6:
    act_after_confirmation(answer.choice)   # ask the user, or log for review
else:
    route_to_human()
```

The 0.9 and 0.6 are a starting point, not a measurement. Scale the threshold with the consequence: a read-only action can run at 0.6, a destructive one wants 0.9 or more. Start conservative, then set the thresholds from `GET /v1/quality`, which gives per question the probability at which 90% accuracy is reached on your labels.

## What the memory does to confidence

Memory lines change the distribution, and so the confidence, in both directions. In the escalation cookbook two lines about a priority account moved the escalate answer from 0.20 to 0.82. `memory.compare` shows both distributions so you can see it. Lines can also move answers just by being there, in either direction: five neutral lines moved an escalation answer from 0.46 to 0.28 (`measurements/jers-recall-size-2026-09-23.json`). Keep memories short and check with `compare` and `placebo`.
