Skip to content
System One

Confidence Gating

Confidence gating is the practice of branching your code on a model's confidence value as well as on its answer. High confidence runs the action automatically. Low confidence sends the case to a person or a fallback. TypeSafe calls the pattern confidence-gated routing and leaves the thresholds to you.

A classifier that only returns a label forces one behaviour for every prediction. Adding confidence gives a second axis, so the same answer can trigger an automatic action in one case and a review queue in another.

The docs put numbers on it. Anything under 0.5 counts as uncertain and goes to a human. Destructive operations, their example is a funds transfer, need confidence above 0.9 before they run without a confirmation step, while a read-only balance check can proceed at a lower bar. The thresholds scale with what happens if the answer is wrong, and the docs are explicit that “your code encodes the risk tolerance”.

Run the docs’ own bug severity answer through that: score 1.3 at confidence 0.54. It clears the 0.5 floor, so it does not go straight to a human, but it is nowhere near 0.9, so auto-closing the ticket would be the wrong call. Flagging it for a triage sweep fits the number.

Gating only works if the probabilities mean something, which is the case TypeSafe makes for RLCD. A working version is in the confidence-gated action recipe.

Related terms