Learn the primitives / Lesson 6 of 24

Use Choice for one winner

Define a complete option set and interpret the winner relative to all supplied alternatives.

After this moduleYou can design a Choice with clear boundaries and avoid forced winners from incomplete taxonomies.

Use Choice when one option should win

A notes app wants to place each saved article in one primary collection: engineering, design, business, or other. The categories are known before evaluation and the product needs one winner.

Choice: Jev's primitive for selecting one option from a fixed set and returning a probability distribution across all supplied options. The selected choice is the option with the highest probability. The full distribution shows how the options compared.

Primitive explorer

Choose by what the answer means

Use the arrow keys or select a tab to compare the three question shapes.

Synthetic teaching data
Ask this kind of questionDoes this review describe a product problem?

Use Noul when the answer is one yes-or-no proposition.

Synthetic native response
{
  "type": "noul",
  "noul": 0.73
}
Synthetic output
yes0.73
no0.27

0.73 is the synthetic probability of yes. It is not 73% problem severity.

Choice fits a primary topic, route, style, or intent when exactly one answer should lead. It is a poor fit for tags that may all apply. An article can mention both engineering and design; the question must explicitly ask for the primary subject if the product needs one folder.

Trace this example from input to result
01

Customer choice

A user saves an article about designing database APIs.

02

Request or event

The notes app asks which primary collection best fits the article.

03

Backend behavior

Jev compares the supplied options and returns one winner plus probabilities.

04

Customer sees

The app suggests a collection that the user can change.

05

Diagnostic reasoning

Inspect the option definitions, omitted categories, full distribution, and collection mapping.

Define a complete set of options

Every option needs a distinct meaning. Repeating the label in its description does little to separate boundaries.

const primaryCollection = {
  type: "choice",
  instructions: "Which collection best matches the article's primary subject?",
  criteria: {
    engineering: "Software construction, systems, data, APIs, or operations",
    design: "User experience, visual design, research, or product interaction",
    business: "Markets, finance, sales, strategy, or company operations",
    other: "No listed collection is the article's primary subject",
  },
};

The other option matters. Without it, Choice still selects a relative winner even for a recipe or travel story. A winning label means "best among these supplied options," not "a universally correct category exists."

Use a separate unknown option when evidence may be missing. Other means the evidence is present but does not fit. Unknown means the application cannot tell from the supplied state. Combining them can hide whether the taxonomy or retrieval step needs work.

Customer seesApplication doesJev returns
One suggested collectionDefines a primary-category taskOne winner and relative probabilities
Several independent tagsAsks separate Nouls or uses another multilabel designNo automatic multi-select from Choice
An editable suggestionPreserves the user's correctionNo permanent folder policy

Read the whole distribution

Suppose a synthetic native-style answer is:

{
  "choice": "engineering",
  "probabilities": {
    "engineering": 0.46,
    "design": 0.42,
    "business": 0.04,
    "other": 0.08
  },
  "confidence": 0.18
}

Engineering wins, but design is close. That makes sense for an article about designing APIs. The application might show a suggestion rather than silently file it. If engineering had 0.91 and all alternatives were small, the distribution would be more concentrated.

The illustrative confidence value summarizes distribution concentration; the public native formula is not published. Confidence does not mean probability of correctness. An omitted research category could make a remaining option dominate even though the answer space is wrong. Lesson 7 develops that distinction.

Applied diagnosis

A cooking article is confidently classified as business

options omit other · business wins with 0.78

The question forced a winner among incomplete options. Add a defined other category and test it against realistic off-topic articles. Do not fix this taxonomy gap by merely increasing a confidence threshold.

Connect the winner to modest behavior

Treat the answer as a suggestion your code can use. Preserve the full distribution for evaluation even if the UI only shows one label.

function collectionSuggestion(answer: ChoiceAnswer) {
  const winnerProbability = answer.probabilities[answer.choice];
  if (answer.choice === "other") return null;
  if (winnerProbability < policy.showSuggestion) return null;
  return answer.choice;
}

The example reads the winning probability, handles other, and keeps the result reversible. The real threshold must be evaluated on the app's labeled articles.

Dig deeperChoice probabilities are relative

Adding, removing, or redefining options changes the comparison. A probability for engineering under four options should not be treated as the same measurement after the taxonomy changes. Keep the question and option version with evaluation examples.

When multiple options are acceptable, a spread distribution may reflect real ambiguity rather than failure. Product behavior should match the consequence: suggestions can remain flexible, while consequential routing may need review.

Saved locally

Design a complete Choice

Your answers stay in this browser. Write enough that another engineer could continue the investigation.

Knowledge check

Check your understanding

Use Choice for a complete one-winner decision and interpret its probabilities relative to the supplied options.
Module quiz

0/3 answered

01What does the selected Choice label represent?
02What is the difference between `other` and `unknown`?
03A winner has 0.46 and the runner-up has 0.42. What is a reasonable low-risk behavior?
Sources and verification notes 6
Choicepublic-contract

Relative selection, labels, descriptions, full probabilities and confidence.

Primitives overviewpublic-contract

Independent named questions and typed answers. Its approximate 32k wording differs from the model page's more specific 64k aggregate and 32k longest-question limits.

Probability and confidencepublic-contract

Distribution concentration is distinct from empirical correctness. The exact native confidence formula is not published.

Composition patternspublic-contract

Fan-out, confidence-gated routing, composite scoring and intent routing.

Official cookbookspublic-contract

All 18 indexed cookbooks were reviewed; measurements remain attributed, dated vendor reports.

Jev 1.13 limitationspublic-contract

Literal interpretation, arithmetic, dates, representations, indirection, irrelevant and adversarial text, criteria and calibration limitations. Reviewed model page dated September 17.

Further learning

Optional references

These resources provide public documentation and examples for readers who want them.

Official documentationChoiceOfficial documentationPrimitives