Skip to main content
Pinecone Docs
current

Search documentation

Type to search this documentation.

On this pageOverview

rerank-english-v2

Use the rerank-english-v2 embedding or reranking model with Pinecone: specs and index setup. Good reranking model, consumes both a query and a list of.

Back to all models

Good reranking model, consumes both a query and a list of documents to be ranked in relevance against the query. Is a closed source model that can be used via Cohere’s API.

Reranking models are designed to provide superior accuracy over retriever models but are much slower — so this model shouldn't be used with more than a few hundred documents. Due to the slowness of rerankers, we recommend using them in a two-stage retrieval system, ie use a retrieval to pull in a smaller number of documents from a larger database and then rerank the smaller number of documents using a reranker.

Python

pip install -qU cohere==4.34
Python

import cohere

co = cohere.Client("<<YOUR_COHERE_API_KEY>>")
reranked_docs = co.rerank(
        query=query_str,
    documents=docs,
    top_n=5,  # controls how many reranked docs to return
    model="rerank-english-v2.0"
)

Lorem Ipsum

Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu