Learn the primitives / Lesson 7 of 24

Use Score for ordered meaning

Describe an ordered semantic rubric, inspect its distribution, and read the numeric score as an expected index.

After this moduleYou can design clear Score levels and avoid treating a semantic score as an exact measurement.

Use Score for an ordered quality

A search feature has already retrieved several passages. It now needs to rank how directly each passage answers the reader's query. This is not a yes-or-no boundary and it is not a set of unrelated categories. It is an ordered degree.

Score: Jev's primitive for evaluating one semantic dimension against ordered levels you describe. Jev returns a probability for every level, a numeric score derived from that distribution, a legend, and a confidence value.

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.

Score fits relevance, clarity, urgency expressed in text, or another quality that moves from less to more. It does not replace exact measurements. Code should calculate elapsed time, word count, price, and percentages.

Trace this example from input to result
01

Customer choice

A reader searches for an explanation of why database indexes improve lookup speed.

02

Request or event

The application evaluates how directly each candidate passage answers that query.

03

Backend behavior

Jev distributes probability across ordered relevance levels; code sorts the results.

04

Customer sees

Passages that answer the query more directly appear first.

05

Diagnostic reasoning

Inspect the query, passage, level definitions, full distribution, and sorting code.

Describe levels as recognizable situations

Each level should stand on its own. "More relevant than level 1" makes a reader jump between definitions. Concrete descriptions give both the model and reviewers a stable rubric.

const directAnswer = {
  type: "score",
  instructions: "How directly does candidate.passage answer searchQuery?",
  criteria: [
    "Unrelated to the query.",
    "Mentions the topic but does not answer the query.",
    "Answers part of the query or gives a useful indirect explanation.",
    "Directly and substantially answers the query.",
  ],
};

The array order defines the scale: index 0 is unrelated and index 3 is direct and substantial. The levels judge one dimension. They do not mix relevance with writing quality, freshness, or source authority. Those signals can remain separate.

Use only distinctions you can explain and label. Ten levels are not automatically better than four. If people cannot reliably tell neighboring levels apart, simplify the rubric.

Customer seesApplication doesJev returns
More relevant passages firstSorts or combines bounded relevance signalsA distribution over ordered levels
A newest-first filterCompares publication dates in codeNo date arithmetic
A source-quality badgeUses separate verified metadata or judgmentNo hidden mixture inside relevance

Read the score as a summary of a distribution

Suppose four levels receive probabilities [0.0, 0.2, 0.6, 0.2]. The expected score is 0*0.0 + 1*0.2 + 2*0.6 + 3*0.2 = 2.0. The decimal is a weighted average of level indexes, not a new level with its own definition.

Different distributions can have the same score. [0.0, 0.5, 0.5, 0.0] and [0.5, 0.0, 0.0, 0.5] both average to 1.5. The first is split between neighboring middle levels. The second is split across extremes. Preserve the probabilities when that difference matters.

function rankingSignal(answer: ScoreAnswer) {
  const directProbability = answer.probabilities["3"] ?? 0;
  return {
    expectedRelevance: answer.score,
    directAnswerProbability: directProbability,
  };
}

This code keeps the expected score and one useful tail probability. A simple ranking may only need the score. A review tool might surface polarized distributions for inspection.

Applied diagnosis

Two passages have the same score but different shapes

A: [0,.5,.5,0] · B: [.5,0,0,.5] · both score 1.5

Do not claim the passages received the same judgment. Their expected indexes match, but one answer is locally uncertain and the other is polarized. Inspect the passages and rubric, then decide whether ranking by the mean alone is adequate for this feature.

Keep semantic order separate from measurement

A relevance score of 2.4 does not mean a passage is "80% relevant" on a four-level rubric. It summarizes the model's distribution over the levels you defined. Renaming or reordering those levels changes what the number means.

Likewise, do not ask Score to infer an exact duration from timestamps or a percentage from counts. Calculate exact values in code. If their meaning needs judgment, include the calculated fact in state and ask a separate semantic question.

Dig deeperCombining several Scores

An application can evaluate relevance, clarity, and audience fit separately, then combine them in code. Keeping the dimensions separate makes the tradeoff visible. A weight change can adjust ranking without redefining the model questions.

Some rules should not be averaged. A missing permission or required document is a code-owned condition, not a low score that a high relevance result can offset.

Saved locally

Design an ordered Score

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

Knowledge check

Check your understanding

Interpret Score as a distribution over defined ordered levels, with the numeric score as an expected index.
Module quiz

0/3 answered

01Which is a good Score question?
02What does a Score value of 1.5 represent?
03Why keep the full distribution when using Score?
Sources and verification notes 5
Scorepublic-contract

Ordered rubric, weighted expected index, legend, probabilities and confidence; numerical calibration has documented limitations.

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.

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 documentationScoreOfficial patternComposite scoring