An Overview of Cohere’s Rerank Model
How Rerank Works
The Rerank API endpoint, powered by the Rerank models, is a simple and very powerful tool for semantic search. Given a query
and a list of documents
, Rerank indexes the documents from most to least semantically relevant to the query.
Get Started
Example with Texts
In the example below, we use the Rerank API endpoint to index the list of documents
from most to least relevant to the query "What is the capital of the United States?"
.
Request
In this example, the documents being passed in are a list of strings:
Response
Example with Structured Data:
If your documents contain structured data, for best performance we recommend formatting them as YAML strings.
Request
In the documents
parameter, we are passing in a list YAML strings, representing the structured data.
Response
Multilingual Reranking
Cohere’s Rerank models have been trained for performance across 100+ languages.
When choosing the model, please note the following language support:
- Rerank 3.0: Separate English-only and multilingual models (
rerank-english-v3.0
andrerank-multilingual-v3.0
) - Rerank 3.5: A single multilingual model (
rerank-v3.5
)
The following table provides the list of languages supported by the Rerank models. Please note that performance may vary across languages.