52 スコアリングAPI

スコアリングAPIは、取得したドキュメントの関連性を評価し、検索精度を向上させます。

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
]

スコアリング・モデル

スコアリング・モデルでは、関連性に基づいて取得したドキュメントをランク付けし、レスポンス精度を向上させます。柔軟なデプロイメントでは、ローカルおよびリモート・モデルの両方がサポートされています。

ローカルおよびリモート・スコアリング・モデルの両方がサポートされており、スコアリング・モデルの名前は、前述の[埋込みモデル](#embedding-model)の項で説明されている同じ`<provider>/<modelName>`構文を使用して指定します。