> For the complete documentation index, see [llms.txt](https://docs.maiagent.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.maiagent.ai/tech/maiagent-tech-ja/quickstart/reranker.md).

# Reranker モデル

## **Reranker** とは？

**Reranker** とは、**ランキングタスク**に用いられるモデルまたはシステムであり、一般的に情報検索、レコメンデーションシステム、自然言語処理（NLP）などで利用されます。その主な目的は、複数の候補結果の中から最も関連性が高い、または最も適切な選択肢を返せるように再順位付けを行うことです。

## Reranker の動作の仕組み

通常、検索エンジンやレコメンデーションシステムが一連の候補（例えば検索結果、おすすめ商品、記事など）を返す際には、すでに何らかの初期的な順位付け基準に基づいて並べ替えが行われています。これらの初期的な順位付けは、単純なマッチングや基本的な関連性指標に基づいている場合があります。しかし、こうした順位付けではすべての細部やより深い意味的な関係が十分に考慮されておらず、ユーザーのニーズに完全には合致しない結果になることがあります。

例えば、インターネットで「一番おいしいピザ屋」と検索した場合、検索エンジンは店舗名、評価、住所などのいくつかの基本的な基準に基づいて多くの結果を返します。これらの結果はすでにキーワードや単純なマッチングに基づいて並べ替えられているかもしれませんが、必ずしもあなたのニーズに完全に合致しているとは限りません。

このとき Reranker は、さらに「**順位付けを最適化**」する手助けをします。より多くの細部に基づいてこれらの結果を精査し、あなたの過去の検索習慣、他のユーザーによるその店舗への評価、店舗の最新の状況などを考慮して結果を並べ替え、最終的に最も関連性の高い店舗を選び出すことで、より早く最適な選択肢を見つけられるようにします。この例における Reranker の動作フローは次のとおりです。\\

{% stepper %}
{% step %}
**初期順位付け：単純なランキングモデル（キーワードマッチング、TF-IDF、その他の特徴量に基づくものなど）を用いて候補を初期的に並べ替える**

検索：「一番おいしいピザ屋」と入力すると、検索エンジンが多数の店舗のリストを返します
{% endstep %}

{% step %}
**候補結果の絞り込み：より多くの特徴量（文脈理解、意味的関連性、ユーザー行動など）に基づいて順位付けを精緻化し、候補を再度スコアリングする**

これらの店舗をさらに詳しく見て、あなたがよく行くエリアにある店舗かどうか、他のユーザーから高い評価を得ているかどうか、店舗が提供している優待があるかどうかなどを考慮します
{% endstep %}

{% step %}
**最終順位付け：そのスコアリング結果に基づいて、最も関連性が高い、または最も適切な結果を返す**

Reranker は、あなたのニーズに最も合致する店舗を先頭に並べ、最適な選択肢をより簡単に見つけられるようにします
{% endstep %}
{% endstepper %}

## MaiAgent が提供する Reranker モデル

### Cohere Rerank v3.5 の特長

**Cohere Rerank v3.5** は、Cohere が提供する **再順位付け（reranking）** モデルであり、検索結果や候補となる回答の順位付けを最適化することに特化しています。候補結果に対してきめ細かな順位付けを行い、より深い意味理解と文脈に基づいて最も関連性の高い結果を選択することで、最終的な品質を向上させます。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.maiagent.ai/tech/maiagent-tech-ja/quickstart/reranker.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
