Skip to content

agentset-ai/awesome-rerankers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Awesome Rerankers Awesome

A curated list of reranking models, libraries, and resources for RAG applications.

Rerankers take a query and retrieved documents and reorder them by relevance. They use cross-encoders to jointly encode query-document pairs, which is slower than vector search but more accurate. Typical pipeline: retrieve 50-100 candidates with vector search, rerank to top 3-5.

Contents

What are Rerankers?

Rerankers refine search results by re-scoring query-document pairs. Key differences from vector search:

Vector search (bi-encoders):

  • Encodes query and documents separately
  • Fast (pre-computed embeddings)
  • Returns 50-100 candidates

Reranking (cross-encoders):

  • Jointly encodes query + document
  • Slower but more accurate
  • Refines to top 3-5 results

Types: Pointwise (score each doc independently), pairwise (compare pairs), listwise (score entire list)

Top Models Comparison

Model Type Multilingual Deployment Best For
Cohere Rerank API 100+ languages Cloud Production, easy start
Voyage Rerank 2.5 API English-focused Cloud Highest accuracy
Jina Reranker v2 API/OSS 100+ languages Cloud/Self-host Balance cost/quality
BGE-Reranker-v2-m3 Open Source 100+ languages Self-host Free, multilingual
mxbai-rerank-large-v2 Open Source English Self-host Best OSS accuracy
FlashRank Open Source Limited Self-host Lightweight, CPU-only

View Full Benchmarks & Leaderboard - Live comparison of rerankers on production benchmarks including NDCG@10, latency, and cost metrics. Updated regularly with new models and real-world performance data.

Quick Start

5-Minute Setup:

# Option 1: Cohere API (easiest)
from cohere import Client
client = Client("your-api-key")
results = client.rerank(
    query="What is deep learning?",
    documents=["Doc 1...", "Doc 2..."],
    model="rerank-v3.5",
    top_n=3
)

# Option 2: Self-hosted (free)
from sentence_transformers import CrossEncoder
model = CrossEncoder('BAAI/bge-reranker-v2-m3')
scores = model.predict([
    ["What is deep learning?", "Doc 1..."],
    ["What is deep learning?", "Doc 2..."]
])

Choosing a Reranker: For help selecting the best reranker for your use case, check out Best Reranker for RAG: We tested the top models where we break down consistency, accuracy, and performance across top models.

Open Source Models

Cross-Encoder Models

Cross-encoders jointly encode query and document pairs for accurate relevance scoring.

BGE-Reranker (GitHub)

Jina Reranker v2 (HuggingFace)

  • 1024 token context, 100+ languages, code search support

Mixedbread AI

MS MARCO Models

T5-Based Models

Sequence-to-sequence models leveraging T5 architecture for text ranking.

  • MonoT5 - Pointwise T5-base reranker fine-tuned on MS MARCO, scores documents independently.
  • DuoT5 - Pairwise T5-3B reranker for comparing document pairs with O(n²) complexity.
  • RankT5 - T5 variant fine-tuned with specialized ranking losses for improved performance.
  • PyTerrier T5 - T5-based reranking models integrated with PyTerrier IR platform.

LLM-Based Models

Large language models adapted for reranking tasks with zero-shot or few-shot capabilities.

  • RankLLM - Unified framework supporting RankVicuna, RankZephyr, and RankGPT with vLLM/SGLang/TensorRT-LLM integration.
  • RankGPT - Zero-shot listwise reranking using GPT-3.5/GPT-4 with permutation generation.
  • LiT5 - Listwise reranking model based on T5 architecture.
  • RankVicuna - Vicuna LLM fine-tuned for ranking tasks.
  • RankZephyr - Zephyr-based model optimized for reranking.

Commercial APIs

Production-ready reranking services with enterprise support and scalability.

  • Cohere Rerank - Leading reranking API with multilingual support (100+ languages) and "Nimble" variant for low latency.
  • Voyage AI Rerank - Instruction-following rerankers (rerank-2.5/rerank-2.5-lite) with 200M free tokens.
  • Jina AI Reranker API - Cloud-hosted Jina reranker models with pay-as-you-go pricing.
  • Pinecone Rerank - Integrated reranking service within Pinecone's vector database platform.
  • Mixedbread AI Reranker API - API access to mxbai-rerank models with competitive pricing.
  • NVIDIA NeMo Retriever - Enterprise-grade reranking optimized for NVIDIA hardware.

Libraries & Frameworks

Unified Reranking Libraries

  • rerankers - Lightweight Python library providing unified API for all major reranking models (FlashRank, Cohere, RankGPT, cross-encoders).
  • FlashRank - Ultra-lite (~4MB) reranking library with zero torch/transformers dependencies, supports CPU inference.
  • Sentence-Transformers - Popular library for training and using cross-encoder reranking models.
  • rank-llm - Python package for listwise and pairwise reranking with LLMs.

Specialized Tools

  • FlagEmbedding - BAAI's comprehensive toolkit for embeddings and reranking, includes BGE models and training code.
  • PyTerrier - Information retrieval platform with extensive reranking support and experimentation tools.

RAG Framework Integrations

LangChain

Node postprocessors and document transformers for reranking in LangChain pipelines.

LlamaIndex

Postprocessor modules for enhancing retrieval in LlamaIndex query engines.

Haystack

Ranker components for deepset's Haystack framework.

Datasets & Benchmarks

Training & Evaluation Datasets

  • MS MARCO - Large-scale passage and document ranking datasets with real Bing queries.
  • MS MARCO Passage Ranking - 8.8M passages with 500k+ training queries for passage retrieval.
  • MS MARCO Document Ranking - 3.2M documents for full document ranking tasks.
  • BEIR - Heterogeneous benchmark with 18 diverse datasets for zero-shot evaluation.
  • TREC Deep Learning Track - High-quality test collections (TREC-DL-2019, TREC-DL-2020) for passage/document ranking.
  • TREC-DL-2019 - 200 queries with dense relevance judgments.
  • TREC-DL-2020 - 200 queries with expanded corpus coverage.
  • Natural Questions - Google's dataset of real user questions for QA and retrieval.
  • SciRerankBench - Specialized benchmark for scientific document reranking.

Benchmark Suites

  • BEIR Benchmark - Zero-shot evaluation across 18 retrieval tasks (NQ, HotpotQA, FiQA, ArguAna, etc.).
  • MTEB Reranking - Massive Text Embedding Benchmark including reranking tasks.

Evaluation Metrics

Key metrics for assessing reranker performance:

Research Papers

Foundational Papers

Recent Advances (2024-2025)

Cross-Encoder Innovations

LLM-Based Reranking

RAG & Production Systems

Test-Time Compute & Advanced Techniques

Surveys & Analysis

Survey Papers

Tutorials & Resources

Comprehensive Guides

Implementation Tutorials

Video Tutorials

Blog Posts & Articles

Tools & Utilities

Evaluation Tools

  • ranx - Fast IR evaluation library supporting NDCG, MAP, MRR, and more.
  • ir-measures - Comprehensive IR metrics library with TREC integration.
  • MTEB - Massive Text Embedding Benchmark for systematic evaluation.

Development Tools

  • Haystack Studio - Visual pipeline builder with reranking components.
  • LangSmith - Debugging and monitoring for LangChain pipelines including rerankers.
  • AutoRAG - Automated RAG optimization including reranker selection.

Visualization Tools

Reranker Leaderboard

📊 View Live Leaderboard - Compare rerankers using ELO scoring, nDCG@10, latency, and cost

Models ranked by head-to-head GPT-5 comparisons across financial, scientific, and essay datasets.

Current Leaders (as of Nov 2025):

Rankings update as new models are evaluated.

Related Awesome Lists

Contributing

Contributions are welcome! Please read the contribution guidelines first.

To add a new item:

  1. Search previous suggestions before making a new one
  2. Make an individual pull request for each suggestion
  3. Use the following format: **[Name](link)** - Description.
  4. New categories or improvements to the existing categorization are welcome
  5. Keep descriptions concise and informative
  6. Check your spelling and grammar
  7. Make sure your text editor is set to remove trailing whitespace

License

CC0

To the extent possible under law, the contributors have waived all copyright and related rights to this work.

About

A curated list of reranking models, libraries, and resources for building high-quality Retrieval-Augmented Generation (RAG) applications.

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages