Voyage rerank-2.5

Hosted API · Voyage AI ·

Hosted APIHigh precisionInstruction-following

Voyage AI built their rerankers with a single goal: maximise retrieval precision. The current generation, rerank-2.5 and rerank-2.5-lite, doubles the context window to 32,000 tokens and adds instruction following — you can shape what counts as relevant with a natural-language prompt instead of fine-tuning. Pricing is per token, which stays cheap when your passages are short.

Available models

ModelContextBest for
rerank-2.532K tokensCurrent flagship; instruction following
rerank-2.5-lite32K tokensSame context and instructions, lower cost
rerank-2 / rerank-2-lite16K tokensPrevious generation, still served

The 32K context window on the 2.5 models is large enough to rerank long legal, medical or financial documents without chunking them first. Instruction following is the more interesting change: a prompt such as “prefer passages that cite a statute” reshapes the ranking without any training data.

Pricing

ModelPrice
rerank-2.5$0.05 / 1M tokens
rerank-2.5-lite$0.02 / 1M tokens
Free allowanceFirst 200M tokens per account
Batch API33% discount

Voyage uses token-based pricing, which is cost-effective at high volume. Check the Voyage AI website for current rates.

Quick start

Python

pip install voyageai
import voyageai

vo = voyageai.Client(api_key="YOUR_API_KEY")

query = "How do I add reranking to my RAG pipeline?"
documents = [
    "Rerankers score each query-passage pair with a cross-encoder.",
    "BM25 is a classical keyword-based retrieval method.",
    "London is the capital of the United Kingdom.",
    "Two-stage retrieval: retrieve 50 candidates, rerank to top 5.",
]

result = vo.rerank(
    query=query,
    documents=documents,
    model="rerank-2.5",
    top_k=3,
)

for r in result.results:
    print(f"{r.relevance_score:.4f}  {documents[r.index][:80]}")

REST (curl)

curl https://api.voyageai.com/v1/rerank \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "rerank-2.5",
    "query": "How do I add reranking to my RAG pipeline?",
    "documents": ["Rerankers score...", "BM25 is..."],
    "top_k": 3
  }'

In a RAG pipeline

import voyageai

vo = voyageai.Client(api_key="YOUR_API_KEY")

def rag_answer(query: str, vector_db, llm) -> str:
    # Stage 1: retrieve wide
    candidates = vector_db.search(query, top_k=50)
    # Stage 2: rerank tight
    result = vo.rerank(query=query, documents=candidates, model="rerank-2.5", top_k=5)
    top5 = [candidates[r.index] for r in result.results]
    # Stage 3: generate
    return llm.complete(f"Context:\n" + "\n\n".join(top5) + f"\n\nQ: {query}")

Pros and cons

Pros

  • Top-tier BEIR retrieval precision scores
  • 32K token context — great for long documents
  • Competitive token-based pricing
  • 200M free tokens on sign-up
  • Works seamlessly with Voyage embeddings
  • Clean Python SDK

Cons

  • Hosted-only — no open weights
  • Smaller community than Cohere or bge
  • SDK is Python-only (REST for other languages)
  • No multilingual flagship (general model is multilingual but not marketed as such)

See reranking in action

Our demo runs a cross-encoder in your browser — no API key, no cost, same reranking logic.

Open the demo →

Other models