Skip to main content
Pinecone Docs

Search documentation

Type to search this documentation.

cohere-rerank-3.5

Rerank has improved dramatically in cases where the user is expressing explicitly or implicitly constraints on what they would like returned.

### Overview

Cohere Rerank v3.5 is an iteration in Cohere’s Rerank model series, building upon Cohere Rerank v3.0. Rerank has improved dramatically in cases where the user is expressing explicitly or implicitly constraints on what they would like returned. Rerank’s ability to rank results based on this has considerably improved performance on queries that have traditionally been the hardest for retrieval systems. Other key features include multilingual support for over 100+ languages and SOTA performance in domains like finance, hospitality and many more. The model has a context length of 4096 tokens.

### Installation

```python theme={null}
pip install -U pinecone
```

### Reranking

See [rerank](/guides/index-data-search-rerank-results) to learn more about reranking.

```python theme={null}
from pinecone import Pinecone

pc = Pinecone("API-KEY")

query = "Tell me about Apple's products"
results = pc.inference.rerank(
    model="cohere-rerank-3.5",
    query=query,
    documents=[
"Apple is a popular fruit known for its sweetness and crisp texture.",	
"Apple is known for its innovative products like the iPhone.",
"Many people enjoy eating apples as a healthy snack.",
"Apple Inc. has revolutionized the tech industry with its sleek designs and user-friendly interfaces.",
"An apple a day keeps the doctor away, as the saying goes.",
    ],
    top_n=3,
    return_documents=True
)

print(query)
for r in results.data:
  print(r.score, r.document.text)

```

Lorem Ipsum

Suggest an edit

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

Export
Documentation menu