52 Scoring API

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

Endpoint
http request
POST /api/score
Sample Request Payload
json
{
  "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."
  ]
}
Sample Response
json
[
  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 the [Embedding Model](#embedding-model) section above.