Go Deeper 7 min read Updated Sep 14, 2026

Hybrid Search and Reranking

If you've built the basic pipeline from earlier guides and retrieval quality is still disappointing, the fix usually isn't a better embedding model - it's one of two additions: hybrid search, which combines vector similarity with old-fashioned keyword matching, and reranking, which re-scores the retrieved candidates with a more precise (and more expensive) model before they reach the LLM. These two changes fix more retrieval problems than anything else in this series.

Why vector search alone falls short

Pure vector search is excellent at matching meaning - a query about "reducing staff" will find a chunk about "layoffs" even with zero shared words. But it's genuinely bad at exact matches: product codes, error messages, acronyms, names, and other precise strings often score worse on pure semantic similarity than they should, because embeddings are built to capture meaning, not exact tokens.

Keyword search fills the gap

Keyword search (commonly BM25, a decades-old but still very effective ranking algorithm) is the mirror image: it's excellent at exact and near-exact matches, and weak at anything requiring semantic understanding. Combining the two - running both searches and merging the results, typically with a weighted score or reciprocal rank fusion - covers each other's blind spots. This combination is what "hybrid search" refers to.

Query Vector search Keyword (BM25) Merge / fuse

Hybrid search: run both, then combine - covering vector search's blind spot for exact matches and keyword search's blind spot for meaning.

What reranking adds on top

Even a good hybrid search returns candidates ranked by a relatively cheap, approximate scoring method - it has to be cheap, because it's scanning potentially millions of chunks. A reranker takes the top handful of those candidates (typically 20-50) and re-scores them with a slower, more accurate cross-encoder model that directly compares the query against each candidate chunk, rather than comparing precomputed embeddings. It's far too slow to run over the whole index, but very fast over a short list, which is exactly the two-stage pattern that makes it practical.

Why the two-stage pattern works: initial retrieval (vector, keyword, or hybrid) needs to be fast enough to search everything, so it trades some accuracy for speed. Reranking needs to be accurate but only has to handle a short list, so it can afford to be slower. Using the right tool at each stage gets you both speed and precision.

When this is worth the added complexity

Hybrid search is worth adding almost any time your content includes exact identifiers, technical terms, or names that users are likely to search for directly - product catalogs, technical documentation, legal or medical text. Reranking is worth adding once your retrieval is directionally right but still surfaces near-misses in the top results - it's the natural next step after "the right document usually comes back in the top 10, but not always in the top 3."

Neither is worth the added latency and infrastructure if your evaluation (see the evaluating RAG systems guide) shows retrieval is already strong - measure before adding either, rather than adding them by default.

Next up: agentic RAG - giving the retrieval step its own reasoning loop instead of a single fixed retrieve-then-generate pass.
Share this guide

Was this guide helpful?

Thanks for the feedback!

Want more hands-on AI builds like this?

APA Mastery runs live, practical sessions on working with modern AI tools - not just theory.

See What's On →