Skip to content

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.

FieldWhat it does
Credential (required)The Cohere API credential.
Search QueryThe question the results are compared with.
Search ResultsThe results to reorder, usually the Results output of a vector database.
ModelThe 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

FieldWhat it does
Top NHow 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.

  1. Connect the Results output of its articles database to Search Results.
  2. Connect the customer’s question to Search Query and leave rerank-v3.5 in Model.
  3. Pass Reranked Documents to the agent’s prompt.

Good practices

  • For texts not in English, do not choose an english model.