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.
Choose by what the answer means
Use the arrow keys or select a tab to compare the three question shapes.
Use Noul when the answer is one yes-or-no proposition.
{
"type": "noul",
"noul": 0.73
}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
Customer choice
A reader searches for an explanation of why database indexes improve lookup speed.
Request or event
The application evaluates how directly each candidate passage answers that query.
Backend behavior
Jev distributes probability across ordered relevance levels; code sorts the results.
Customer sees
Passages that answer the query more directly appear first.
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 sees | Application does | Jev returns |
|---|---|---|
| More relevant passages first | Sorts or combines bounded relevance signals | A distribution over ordered levels |
| A newest-first filter | Compares publication dates in code | No date arithmetic |
| A source-quality badge | Uses separate verified metadata or judgment | No 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.
Two passages have the same score but different shapes
A: [0,.5,.5,0] · B: [.5,0,0,.5] · both score 1.5Do 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.
Design an ordered Score
Your answers stay in this browser. Write enough that another engineer could continue the investigation.