Skip to main content

Cohere Reranker

This reranker uses the Cohere API to rerank the search results. You can use this reranker by passing CohereReranker() to the rerank() method. Note that you’ll either need to set the COHERE_API_KEY environment variable or pass the api_key argument to use this reranker.
Note: Supported query types: Hybrid, Vector, and FTS.
Replace the credential placeholders with your provider credentials. In application code, load credentials from environment variables or a secrets manager.

Accepted Arguments

Supported Scores for each query type

You can specify the type of scores you want the reranker to return. The following are the supported scores for each query type: