Learning outcomes
- Combine retrieval signals
- Place reranking stages
- Tune retrieval breadth
Mental model
Retrieval is a staged ranking problem: broad candidate generation seeks recall; later fusion and reranking spend more computation to improve precision.
Theory
Lexical and dense retrievers produce differently scored lists, so rank-based fusion is often safer than mixing raw scores. A reranker evaluates query-passage pairs and reorders a limited candidate set. The final context selector also considers diversity, duplication, authority, recency, and token budget.
Alternatives and trade-offs
Dense-only is simple, lexical-only is inspectable, hybrid improves mixed queries, and query rewriting or multi-query retrieval broadens recall at additional cost.
Failure modes and misconceptions
Do not rerank too few candidates, blend incomparable raw scores blindly, optimize retrieval without answer evaluation, or let duplicates consume the context.
Knowledge check
Why is rank fusion often preferred to directly averaging lexical and vector scores?
Decision scenario
For developer documentation, combine exact API symbol search with semantic retrieval, rerank the top candidates, deduplicate versions, and retain authoritative pages.
Relationships
Vector Search
Hybrid and reranking stages operate on retrieval candidates.
prerequisiteGrounded Generation and Citations
Grounded generation depends on relevant evidence selection.
alternativeVector Search
Lexical semantic and combined retrieval trade precision recall and cost.
Primary sources
- Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks - arXiv, verified 2026-07-16