Course contentsShow
← Machine Learning and Deep Learning
Lesson 2008 of 3,53843. Retrieval-Augmented Generation: Advanced TechniquesFree lesson

Reranking Model Selection

Choosing between general-purpose and domain-specific rerankers, evaluating model size vs accuracy.

Reranking Model Selection

What you'll learn: How to choose the right reranker for your RAG system by balancing generalization, domain fit, and computational cost.

The Selection Challenge

You've built a two-stage retrieval pipeline with a fast bi-encoder and a slow, accurate cross-encoder. Now comes the question: which reranker should you actually use? Not all rerankers are created equal—some are jacks-of-all-trades, others excel in narrow domains.

General-Purpose vs Domain-Specific Rerankers

General-purpose rerankers (like ms-marco-MiniLM-L-12-v2) are trained on broad datasets covering diverse topics. They work reasonably well across many domains but may miss nuanced relevance signals in specialized fields.

Domain-specific rerankers are fine-tuned for particular verticals—medical literature, legal documents, scientific papers, or customer support tickets. They understand domain jargon and what "relevance" means in context. If you're building a legal RAG system, a legal-trained reranker will drastically outperform a generic one.

The catch? Domain models require specialized training data or pre-trained checkpoints, which aren't always available for your exact niche.

Model Size vs Accuracy Trade-off

Larger rerankers (e.g., 350M parameters) capture subtler semantic relationships but:

  • Add 50-200ms latency per batch
  • Require GPU hosting for reasonable speed
  • Cost more to operate

Smaller models (30-70M parameters) sacrifice some accuracy for:

  • 10-30ms inference times
  • CPU-feasible deployment
  • Lower operational costs

Think of it like restaurant selection: A Michelin-star chef (large model) makes exquisite meals but takes time. A skilled fast-casual cook (small model) delivers 80% of the quality in 20% of the time.

Making the Choice

Evaluate candidates on your data using metrics like NDCG@10 or MRR. Measure latency under realistic load. If accuracy differences are <2% but latency differs by 5x, the smaller model often wins for production.

Key Takeaway: Select rerankers by profiling domain fit and benchmarking size-accuracy-latency trade-offs on representative queries—generic large models aren't always the answer.