Docs
CommunityJev Practices & Patterns
Routing by Probability
TypeSafe documentation page on routing Jev actions by probability threshold. Covers per-action thresholds, a voice banking example, and why probability is easier to read as risk than confidence for Choice questions.
- Format
- Docs
- Reading time
- 2 min
- Published by
- Community
- Added
- Nov 23, 2026
Highlights
- Sets a separate probability threshold for each action your code can take, with riskier actions getting higher thresholds.
- An answer below the threshold gets its own outcome, such as asking the user to clarify, instead of counting as a yes.
- Voice banking example uses 0.7 for check_balance and above 0.9 before opening the transfer workflow.
- With jev-1.14.0, a hesitant transfer command scored 0.99 for approve_transfer, so confirmation still matters.
- For a Choice question with fixed options, confidence is calculated from the top probability, so a threshold on it adds nothing.
Questions about this entry
Short answers drawn from the linked project or page.
It explains how to give each action your code can take its own probability threshold, using a voice banking interface as the worked example. It also explains why probability is preferred over confidence for Choice questions and points to Routing by confidence for Score questions.
The response answers object holds the chosen option and a probabilities map. Compare probabilities[choice] against your threshold; that number is how likely it is that this option is what the user asked for.
For a Choice question with a fixed number of options, confidence is calculated from the top probability, so a threshold on confidence adds nothing. The probability is easier to read as risk, and confidence is more useful for a Score question.
It gets its own outcome rather than counting as a yes. In the example, a likelihood below 0.7 on any action routes the command to a support agent, and a transfer intent below 0.9 asks the user to clarify before opening the workflow.
No. The thresholds only choose which workflow runs; none of them moves money. A clear transfer request opens a confirmation screen with the amount and recipient, and the transfer runs only after the user confirms them.
The example response reports model jev-1.14.0, with an intent Choice answer for check_balance at confidence 1.0 and usage of 343 input tokens and 41 output tokens.
When it matters how the other options compare. The page notes that the chosen option's probability is the primary signal, but the probabilities of the remaining options can be checked as well.
Reactions & coverage
Posts, threads, and videos about this entry from around the web.
YouTube: LangChain maps System 1 and System 2 onto fast decisions versus slow generation.
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.