Define ordered levels from low to high. Give each level a concrete meaning so score changes have an interpretation in your application.
{
"type": "score",
"instructions": "Does the passage answer the query?",
"criteria": [
"Unrelated",
"Partially relevant",
"Direct answer"
]
}Inspect a fractional score
With six criteria the scale runs from 0 through 5. The result can lie between levels. The legend maps levels to descriptions and probabilities gives their weights. Save the rubric version before comparing scores over time.
Request structure
The question lives under a stable key in the request’s questions object. State supplies the evidence it evaluates.
{
"model": "ngila-judge",
"state": {
"query": "Where can I return a rental bike?",
"passage": "Bikes may be returned to any staffed rental station."
},
"questions": {
"relevance": {
"type": "score",
"instructions": "Does the passage answer the query?",
"criteria": [
"Unrelated",
"Partially relevant",
"Direct answer"
]
}
}
}Response structure
Read the matching key under answers. The values below illustrate the fields used in this example.
{
"answers": {
"relevance": {
"type": "score",
"score": 1.85,
"legend": {
"0": "Unrelated",
"1": "Partially relevant",
"2": "Direct answer"
},
"probabilities": {
"0": 0.05,
"1": 0.05,
"2": 0.9
},
"confidence": 0.83
}
}
}The weighted score can be fractional. The legend gives each level’s meaning and the probabilities show where the weight falls.