Skip to content

Docs

Confidence

How TypeSafe reports certainty, how it differs from probability, and how to use it architecturally to gate and route decisions.
Format
Docs
Reading time
2 min
Published by
TypeSafe AI
Last verified
Sep 2026

Highlights

  • Confidence is a 0-1 statistic derived from the probability distribution; Noul answers carry no confidence at all.
  • The page's interactive demo approximates three-option confidence as (3 x largest probability - 1) / 2.
  • Suggested pattern: high confidence acts automatically, medium proceeds with caution, low routes to a human, clarification, or fallback.
  • Example code routes anything below 0.5 confidence to a human and requires above 0.9 to auto-approve a transfer.
  • You are never locked into TypeSafe's confidence formula; the full probabilities come back so you can compute your own measure.

Quickstart

python
action = response.answers["action"]
confidence = action.confidence

if confidence < 0.5:
    route_to_human(user_message)
elif action.choice == "check_balance":
    show_balance(account_id)
elif action.choice == "approve_transfer":
    if confidence > 0.9:
        confirm_then_execute(account_id)
    else:
        ask_user_to_confirm(account_id)

Watch out

Threshold values depend on your domain and the model's performance on your use case, and the docs advise starting conservative and tuning against your own data.

Questions about this entry

Short answers drawn from the linked project or page.

Reactions & coverage

Posts, threads, and videos about this entry from around the web.

Instagram: Shadow mode collects the real distribution before any user sees the answer.

Instagram

Facebook: Intake Router keeps diagnosis out of the answer space at the front desk.

FacebookClinicnotes

X: OpenRouter Decision Model Rankings

X: herdr + jev, an agent router

From the Jev guides

Original write-ups on what this entry is for.

From the Jev AI model community

Posts from builders shipping with Jev right now.

Follow @typesafeai