Rerank Overview
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-v3.5
and rerank-multilingual-v3.0
models have been trained for performance across a variety of languages. Please note that performance may vary across languages. The model is trained on the following languages: