Cohere Rerank
Cohere Rerank receives search results, for example from a vector database, and reorders them by how well they answer the question, with a Cohere model specialised in ordering results. It returns only the best ones, so the agent receives less, more useful text.
When to use it
- Search finds the right documents, but not always first.
- You want to pass only the three or four most useful results to the agent.
- Your documents are in several languages and you want them ordered well in all of them.
Configuration
You need a Cohere API credential with your Cohere account key. See Credentials.
| Field | What it does |
|---|---|
| Credential (required) | The Cohere API credential. |
| Search Query | The question the results are compared with. |
| Search Results | The results to reorder, usually the Results output of a vector database. |
| Model | The Cohere model: rerank-v3.5 (default, Cohere’s newest, for any language), rerank-multilingual-v3.0 for any language, rerank-english-v3.0 for English only, and their earlier versions. |
Advanced options
| Field | What it does |
|---|---|
| Top N | How many results are returned. Default: 3. |
Output
The Reranked Documents output holds the best results, in order, to pass to a prompt or an agent.
Example
A Spanish-language support service wants the agent to receive only the three most useful help articles.
- Connect the Results output of its articles database to Search Results.
- Connect the customer’s question to Search Query and leave
rerank-v3.5in Model. - Pass Reranked Documents to the agent’s prompt.
Good practices
- For texts not in English, do not choose an
englishmodel.
Related components
- NVIDIA Rerank: reorders results with NVIDIA.
- Chroma DB: a vector database to get results from.