Concepts
Jev Choice
Choice is Jev's question type for picking one option from a closed set, with probabilities and confidence.
- Published
- Sep 20, 2026
- Updated
- Sep 20, 2026
- Last verified
- Sep 20, 2026
Quick answer
A Choice question asks Jev to select one label from options you define. The answer includes the winning option, a probability for every option, and a confidence value derived from how peaked that distribution is. Official maximum is 255 options.
Choice is the primitive you reach for when the product already has a closed set of destinations: teams, intents, document types, model names.
Request
{
"department": {
"type": "choice",
"instructions": "Which team should handle this?",
"criteria": {
"billing": "Payments, invoicing, refunds",
"technical": "Bugs, outages, integrations",
"sales": "Pricing, upgrades, new accounts",
"other": "None of the above"
}
}
}criteria is a map. Values may be null when the key is self-explanatory. Official cap: 255 options.
Response
{
"type": "choice",
"choice": "billing",
"probabilities": { "billing": 0.88, "technical": 0.12, "sales": 0.0, "other": 0.0 },
"confidence": 0.81
}Official confidence docs approximate three-option confidence as (3 × largest probability − 1) / 2. You can compute your own statistic from probabilities.
How to write criteria
Describe membership, not vibes.
- Good: “Charges, invoices, refunds, subscriptions”
- Weak: “Billing-related stuff”
When two options neighbor each other, write the boundary. Test those sentences against labeled examples.
Question IDs are not sent to the model. Put the full question in instructions.
Workflow
ticket text
→ Choice(department)
→ if confidence < T: human
→ else: enqueue(department.choice)When to use Choice
Routing, intent, language-of-this-file, which tool to call, which skill to suggest.
When not to use Choice
- Measuring intensity → Score
- A single yes/no probability → Noul
- Open-ended extraction → regex or an LLM, then Choice over candidates
Common mistakes
- No
otherbucket, so every weird ticket becomes “technical”. - Options that overlap so badly confidence collapses.
- Treating
choice === "billing"as safe while ignoringconfidence. - Expecting a Choice yes/no to match a Noul on the same sentence. Official jaggedness notes say they are not interchangeable.
Python and TypeScript helpers: Python tutorial, TypeScript tutorial.
FAQ
When should I use Choice instead of Noul?
Use Choice when there are three or more unordered options, or two options that are labels rather than true/false. Use Noul when you need P(yes) for one statement.
What if none of the options fit?
Add other or none_of_the_above. Official docs recommend an escape option whenever the list might be incomplete.
Sources
- ChoiceTypeSafe · accessed 2026-09-20 · documentation
- PrimitivesTypeSafe · accessed 2026-09-20 · documentation
- API referenceTypeSafe · accessed 2026-09-20 · documentation