Skip to content

Docs

Pattern: Confidence-Gated Routing

Use the answer to decide what to do and confidence to decide whether to act: the voice-banking example routes below 0.6 to a human and needs 0.85 or more to auto-approve a transfer.
Format
Docs
Reading time
2 min
Published by
TypeSafe AI
Last verified
Sep 2026

Highlights

  • Any intent below 0.6 confidence routes to a support agent before the action is considered.
  • check_balance is safe at 0.6 because the worst case is a wrong read-out.
  • approve_transfer needs more than 0.85, otherwise the user confirms first.
  • Thresholds are set per action by the consequences of a wrong classification.

Quickstart

python
if action.confidence < 0.6:
    route_to_support_agent(account_id)

elif action.choice == "check_balance":
    show_balance(account_id)

elif action.choice == "approve_transfer":
    if action.confidence > 0.85:
        approve_transfer(account_id)
    else:
        ask_user_to_confirm("Just to confirm: you would like to approve this transfer?")

Watch out

Confidence is not permission: a high-confidence answer can still be wrong, so keep hard limits next to the model for irreversible actions.

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.

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

X: A group chat bot with decision room routing

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