Docs
OfficialJev Practices & Patterns
Primitives: Choice, Score & Noul
The three TypeSafe question types, the typed answers they return, how to choose between them, and how to ask several in a single call.
- Format
- Docs
- Reading time
- 2 min
- Published by
- TypeSafe AI
- Last verified
- Sep 2026
Works forJev for Scoring
Used inJev for Software & DevTools
Highlights
- Choice returns choice, probabilities, and confidence; Score returns score, legend, probabilities, and confidence; Noul returns a 0-1 value.
- Every question has an ID, type, and instructions; Choice and Score also require criteria, while Noul's criteria are optional yes/no clarifications.
- Question IDs are for your code and are not sent to the model, so the full question must live in instructions.
- Questions can target nested state with backticked dot-and-index paths like ticket.messages[0].text.
- The page cites batching 13 questions into one call as 11.5x cheaper and 9.6x faster than 13 separate calls.
Quickstart
json
{
"state": "Our API integration started returning 500 errors on every request about 20 minutes ago, and we can't process any customer orders until this is fixed.",
"questions": {
"department": {
"type": "choice",
"instructions": "Which team should handle this",
"criteria": {"billing": "Payment or subscription issues", "technical": "Bugs or integration problems"}
},
"is_urgent": {"type": "noul", "instructions": "The message conveys urgency or time-sensitivity"}
}
}Watch out
A Noul of 0.5 means yes and no are equally likely rather than a medium level, so unclear criteria produce probabilities that are hard to interpret.
Questions about this entry
Short answers drawn from the linked project or page.
Choice returns choice, probabilities, and confidence; Score returns score, legend, probabilities, and confidence; Noul returns a 0-1 value. Every question has an ID, type, and instructions, and Choice and Score also require criteria.
No. IDs are for your code only, so the full question must live in the instructions. Questions can target nested state with backticked paths like ticket.messages[0].text, and batching 13 questions into one call measured 11.5x cheaper and 9.6x faster.
When it depends on several independent factors. The page advises rating market size, technical feasibility, and differentiation separately, then weighting them in code so priorities change by editing weights, not prompts.
Choice. It takes a map of options, and the page says to add an other or none of the above option when the list might not cover every input.
Use Noul only for a clean yes/no with a defined condition. To measure skill level, use a Score with named levels such as no experience, some familiarity, daily use, and deep expertise.
Yes. Answers are primitives too, so a typed value can be compared, thresholded, sorted, or placed into the state of a follow-up request, as the page's when-one-question-depends-on-another section describes.
One a knowledgeable person could answer in a second given the right context, such as whether a message conveys urgency. A prompt to analyze everything and choose a course of action is a signal to split the task.
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.