54 Scoring API

The scoring API evaluates the relevance of retrieved documents, refining search accuracy.

POST /api/score
{
  "modelName": "-/ms-marco-TinyBERT-L-2-v2",
  "query": "How many people live in Berlin?",
  "answers": [
    "New York City is famous for the Metropolitan Museum of Art.",
    "Berlin had a population of 3,520,031 registered inhabitants in an area of 891.82 square kilometers."
  ]
}
[
  9.518212164868764E-6,
  0.9992176038347965
]

Scoring Model

A scoring model ranks retrieved documents based on relevance, improving response accuracy. Both local and remote models are supported for flexible deployment.

Both local and remote scoring models are supported, and the name of the scoring model is specified using the same <provider>/<modelName> syntax described in Embedding Model.

Scoring Pipeline Resources

Bound candidate counts and model resource use for the intended workload. Keep model/provider versions and credential configuration explicit, and compare score/recall behavior before changing a scoring stage. Remote provider errors must be handled at the application boundary rather than interpreted as an empty successful result.