Hybrid Search
Search that combines dense vector similarity with traditional keyword (BM25) scoring to handle both semantic and exact-match queries.
Last updated: April 26, 2026
Definition
Hybrid search runs two retrievers in parallel for the same query: a dense vector retriever for semantic similarity, and a sparse keyword retriever (BM25) for exact-match scoring. Results are then combined with reciprocal rank fusion or weighted scoring. The point: pure semantic search misses exact-match queries (product SKUs, error codes, named functions), while pure keyword search misses paraphrases and synonyms. Hybrid captures both. Most production RAG systems use hybrid because real user queries are a mix.
Code Example
# Hybrid search with reciprocal rank fusion
dense_hits = vector_db.search(query, top_k=50)
sparse_hits = bm25.search(query, top_k=50)
# RRF: combined_score = sum(1/(rank + 60)) across both lists
combined = reciprocal_rank_fusion([dense_hits, sparse_hits], k=60)
top_5 = combined[:5]Run both retrievers, fuse with RRF, take top-K. Most vector DBs (Qdrant, Weaviate, pgvector) ship hybrid search built in.
When To Use
Default for any production RAG over content with named entities, codes, or jargon (most B2B and technical content). Skip pure semantic for those workloads.
Related Terms
Building with Hybrid Search?
I've shipped this pattern in real production systems. If you want a second pair of eyes on your architecture, that's what I do.