> 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/en/quickstart/reranker.md).

# Reranker Models

How Reranker models reorder passages after retrieval, how MaiAgent uses Reranker, models enabled in the cloud, on-premises models, and URL rules for your own services.

## What Is a Reranker? <a href="#what-is-reranker" id="what-is-reranker"></a>

A Reranker is a model designed specifically for reranking. First-stage retrieval (vector and keyword search) is fast but only provides an approximate match. The Reranker evaluates the relevance of each candidate passage to the question, then reorders the passages by score so that those that actually answer the question appear first.

{% stepper %}
{% step %}

### Initial Retrieval <a href="#first-stage" id="first-stage"></a>

Quickly retrieve a set of candidate passages from the knowledge base using vector and keyword search.
{% endstep %}

{% step %}

### Rescoring <a href="#scoring" id="scoring"></a>

The Reranker evaluates each question–passage pair and assigns a relevance score to each passage.
{% endstep %}

{% step %}

### Selection <a href="#selection" id="selection"></a>

Keep the highest-scoring passages and filter out those below the similarity threshold, then pass them to the large language model.
{% endstep %}
{% endstepper %}

## How MaiAgent Uses Reranker <a href="#how-maiagent-uses-reranker" id="how-maiagent-uses-reranker"></a>

* Each knowledge base selects its own Reranker model and controls it with the <mark style="color:blue;">Enable Search Result Reranking (Reranking)</mark> toggle (enabled by default).
* When enabled, the first stage retrieves candidates equal to the <mark style="color:blue;">Number of Retrieved Passages</mark> × the platform's multiplier (7 by default). After reranking, only the <mark style="color:blue;">Number of Retrieved Passages</mark> is retained.
* The <mark style="color:blue;">Similarity Threshold (0–1)</mark> applies to Reranker scores, so it only takes effect when Reranker is enabled.
* When disabled, the first stage directly retrieves the <mark style="color:blue;">Number of Retrieved Passages</mark>, without reranking or applying the similarity threshold.

For the complete workflow, see [RAG Knowledge Base Retrieval System](/tech/en/quickstart/rag.md#rerank).

## Models Enabled in MaiAgent Cloud <a href="#saas-models" id="saas-models"></a>

The following models are enabled in the production environment as of October 2026. Refer to the admin interface for the models available when creating a knowledge base.

| Model (Admin Interface Name) | Provider                    |
| ---------------------------- | --------------------------- |
| Cohere Rerank v3.5           | Cohere (`rerank-v3.5`)      |
| Cohere Rerank v4 Pro         | Cohere (`rerank-v4.0-pro`)  |
| Cohere Rerank v4 Fast        | Cohere (`rerank-v4.0-fast`) |

## On-Premises Deployment <a href="#on-premise" id="on-premise"></a>

On-premises and private cloud environments can deploy a Reranker locally (the deployment package's model catalog provides `jina-reranker-v2-base-multilingual` and `bge-reranker-v2-m3`, which require a GPU), or connect to an existing model service or cloud provider. For available models and connection methods, see [On-Premises Model Service Integration](/tech/en/platform-development/onprem-model-services.md#local-model-catalog). For Reranker support from each cloud provider, see [Cloud Model Inference API Services](/tech/en/platform-development/cloud-model-inference-api-service.md).

{% hint style="warning" %}
**Do not add `/v1` to the URL when using your own Reranker service**, or all knowledge base searches will fail. For URL rules, see [On-Premises Model Service Integration: Connect to an Existing OpenAI-Compatible Model Service](/tech/en/platform-development/onprem-model-services.md#external-openai-compatible).
{% endhint %}


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
