Skip to main content
Pinecone Docs

Search documentation

Type to search this documentation.

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.

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.

### Using the Model

#### Installation:

```python theme={null}

pip install -qU cohere==4.34

```

#### Rerank:

```python theme={null}

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