Re-ranking and Hybrid Search
Vector search is good, but not enough.
Hybrid search combines semantic similarity with keyword matching, then reranking chooses the best final evidence.
Retrieval stages
text
query -> dense search + keyword search -> merge -> rerank -> top context
Why hybrid helps
| Problem | Hybrid benefit |
|---|---|
| exact product names | keyword search catches them |
| synonyms | vector search catches meaning |
| acronyms | keyword plus metadata helps |
| noisy top-k | reranker improves ordering |
Reranking
A reranker scores query-document pairs more carefully than the first retriever.
It is slower, so use it on the top 20-100 candidates, not the whole corpus.
Production tips
- keep source diversity
- filter by permissions first
- log retrieval scores
- evaluate recall before generation
- tune top-k separately for search and rerank
Knowledge check
Q1: Why use reranking after retrieval?
The first retriever is fast; the reranker is more precise.
Q2: What does hybrid search combine?
Dense semantic retrieval and sparse keyword retrieval.