Docs
OfficialJev Practices & Patterns
Score
Rate content against 2 to 10 ordered levels. Returns a probability-weighted score that can land between levels, per-level probabilities, and confidence, with the arithmetic left to code.
- Format
- Docs
- Reading time
- 2 min
- Published by
- TypeSafe AI
- Last verified
- Sep 2026
Works forJev for Scoring
Used inJev for Software & DevTools
Highlights
- Levels are numbered by array position from 0; the model sees the descriptions, not the numbers.
- The score is each level number times its probability: 0x0.0 + 1x0.57 + 2x0.43 = 1.43.
- Levels are judged separately, so describing one level as worse than another adds no signal.
- Confidence 1.0 means every ounce of probability sits on a single level.
Quickstart
python
"bug_severity": Score(
instructions="How severe is the reported issue?",
criteria=[
"Cosmetic; no impact to functionality",
"Broken or degraded feature, but workaround exists",
"Blocking issue; no workaround exists",
],
)Watch out
A confident answer is not a correct answer, and Score levels are poor at exact numeric calibration, so threshold in code rather than reading the score as a measurement.
Questions about this entry
Short answers drawn from the linked project or page.
As each level number times its probability. The worked example is 0 x 0.0 + 1 x 0.57 + 2 x 0.43 = 1.43, which is why a score can land between defined levels — the page leaves the arithmetic to your code.
No. Levels are judged separately, so comparisons between descriptions add no signal; describe each level's meaning instead. Confidence 1.0 only means all probability sits on one level, and a confident answer is not automatically a correct one.
At least two and up to 10. criteria is an ordered array from the low end of the scale to the high end, and the order of the array is the numbering, starting at 0.
ScoreAnswer exposes score, confidence, probabilities, and legend as typed fields, and it keys probabilities and legend by integer level rather than the string keys the raw API returns.
That probability is spread across levels. The page's example scores 1.43 with confidence 0.35 because the model split 0.57 on level 1 and 0.43 on level 2 instead of peaking on one.
Alongside score and confidence it returns probabilities for every level, a legend mapping each level number back to its description, and the request's usage in input and output tokens.
Use Choice when the answer is one of a fixed set of options with no order between them, and Score when the answer is a position on a spectrum; use a Noul for a plain yes or no.
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.