Lorem Ipsum
pinecone-rerank-v0
Use the pinecone-rerank-v0 embedding or reranking model with Pinecone: specs and index setup. Overview
Was this page helpful?
⌘I
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
🎉 New: Standard and Enterprise orgs get a one-time $250 bulk import credit (1 TB), through July 31, 2026. See details
Use the pinecone-rerank-v0 embedding or reranking model with Pinecone: specs and index setup. Overview
pip install -U pinecone
from pinecone import Pinecone
pc = Pinecone("API-KEY")
query = "Tell me about Apple's products"
results = pc.inference.rerank(
model="pinecone-rerank-v0",
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,
parameters= {
"truncate": "END"
}
)
print(query)
for r in results.data:
print(r.score, r.document.text)
Was this page helpful?