KNOWLEDGE / RAG / Retrieval
RAG Retrieval and Reranking
How candidate generation and reranking work together to produce a small, relevant context window.
RAGRetrievalReranking
- DOMAIN
- AI Engineering
- LEVEL
- Advanced
- READ
- 9 min
- UPDATED
- Aug 27, 2026
MENTAL MODEL / KEY IDEAS
Keep these in mind
- 01Optimize recall before precision
- 02Reranking is a separate relevance model
- 03Evaluate with real queries
Two different jobs
Retrieval quickly finds a broad candidate set. Reranking spends more compute to order those candidates by relevance to the exact question.
- Fast first stage
- Precise second stage
- Small final context
Hybrid retrieval
Lexical search preserves exact terms while embeddings recover semantic matches. Combining both is often more robust than treating either as universal.
- Normalize scores
- Deduplicate passages
- Keep source metadata
Evaluation
Measure retrieval before answer quality. If the supporting passage never reaches the model, generation tuning cannot repair the system.