Getting started

Choice, Score, or Noul: which Jev question type should you use?

Choose a primitive by the answer your code needs, and avoid confusing probability, confidence, and ordered scores.

Choose the answer contract before writing the question. A label, an ordered rating, and the probability of a yes answer solve different problems.

TypeSafe exposes three question types. Their current answer shapes are documented in its primitive reference:

Primitive Suitable question What your code reads
Choice Which listed handler fits? Selected label, option probabilities, confidence
Score How does this compare with an ordered rubric? Expected score, rubric, level probabilities, confidence
Noul Is this particular condition true? Probability of yes, between 0 and 1

Use Choice when options are alternatives

A routing question might offer billing, technical support, sales, and other. The categories are destinations, not levels of quality.

Include an escape option when the available labels do not cover every input. Otherwise, selecting a valid label can conceal that none of the handlers fits. Make overlapping options more specific before trying to fix the problem with a confidence threshold.

A useful drafting exercise is to write one example that belongs to each option and one that belongs to none. If two options repeatedly seem equally appropriate, change the taxonomy or explicitly support a later review step. See route a support request.

Use Score when the levels have an order

For a bug report, you might define reproduction quality as missing steps, incomplete steps, and usable steps. A score expresses position along that rubric.

Describe observable differences between levels. “Bad, okay, good” gives a reader little help understanding the boundary. A rubric about reproduction steps should not silently include business impact or writing style.

The returned score can fall between integer levels. Decide explicitly how you will normalize, rank, or threshold it. Our bug-report scoring example combines separate rubrics in application code.

Use Noul for a specific yes-or-no condition

An urgency check asks whether a ticket needs a response today. A Noul value expresses the model’s probability that the condition holds.

It does not measure how much urgency exists. A value near the middle is uncertainty about the yes/no condition, not a medium priority level. If your product needs low, medium, and high priority, consider a rubric with defined levels.

The urgent-ticket example preserves an upstream question and its yes/no criteria so you can see exactly what is being evaluated.

Separate multiple labels from a single choice

Sometimes several conditions can hold at once. A ticket can request a refund and report an outage. Independent yes/no questions may represent that better than forcing one mutually exclusive category.

Conversely, separate yes/no probabilities should not be assumed to add to one. They answer different questions. A routing table that needs exactly one destination still needs a policy for resolving overlapping signals.

Decide the fallback before the threshold

For each primitive, write down what happens when the answer is uncertain, malformed, or unavailable. Clarification, manual review, and retaining the current state are concrete behaviors.

Then evaluate how often that fallback occurs. Changing the question type or rubric changes the decision contract, so re-evaluate it rather than carrying over a cutoff from an older version.

Sources & review

Reviewed against the following TypeSafe documentation on Sep 18, 2026. Model behavior and API details can change; check the current docs before shipping.

Found a mistake? Suggest a correction on GitHub.

← All guidesFind a prompt to try →