CohereReranker reorders retrieved documents by relevance to the query using Cohere’s rerank models. Pass it to your vector database’s reranker parameter.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
CohereReranker reorders retrieved documents by relevance using Cohere rerank models.
CohereReranker reorders retrieved documents by relevance to the query using Cohere’s rerank models. Pass it to your vector database’s reranker parameter.
| Parameter | Type | Default | Description |
|---|---|---|---|
| model | str | "rerank-multilingual-v3.0" | The Cohere model to use for reranking. |
| api_key | Optional[str] | None | The Cohere API key. If not provided, will attempt to use environment variables. |
| cohere_client | Optional[CohereClient] | None | An optional pre-configured Cohere client instance. |
| top_n | Optional[int] | None | The maximum number of documents to return after reranking. If None, returns all documents. |
Was this page helpful?