Hybrid Search
Hybrid search combines keyword-based sparse retrieval with semantic dense retrieval and fuses and ranks both result sets, usually followed by reranking and truncation. In RAG and search it sits in the recall layer, a general answer to the conflict that "semantic retrieval misses exact terms while keyword retrieval misses synonyms," and a default starting point for modern search.
Core Principles
The complementarity comes from mechanism. Sparse retrieval, typified by BM25, counts term frequency and inverse document frequency, essentially literal matching: query words must appear. It is highly reliable for exact identifiers (model numbers, names, regulation numbers, error codes, internal code names), interpretable and model-free, but fails on synonyms, paraphrases and cross-lingual queries: a user asking "how do I unsubscribe" misses a document saying "cancel subscription."
Dense retrieval maps queries and documents into one semantic space via embeddings and compares cosine similarity, hitting relevant segments across wording. It over-generalizes: a key product number is diluted into overall meaning, recalling topical but wrong-numbered documents, and rare proper nouns are poorly covered.
Fusion hinges on normalization and weights. The scales differ (BM25 unbounded, cosine from -1 to 1), so direct addition is meaningless, and BM25 drifts with corpus size and query length, so weights are not portable. The mainstream approach is RRF (Reciprocal Rank Fusion): ranks only, each document scoring the sum of 1/(k + rank), k usually 60, robust and distribution-free. The alternative is weighted fusion after min-max normalization, such as 0.3 x sparse + 0.7 x dense.
Key Points
First, adopt hybrid search according to query types and corpus: pure natural language often needs only dense, while enterprise bases full of numbers, abbreviations and jargon gain clearly from hybrid. Check the logs first. Second, rerank after fusion: hybrid widens recall, and precision needs a reranker; the fused list is usually truncated to a fixed count whose position also needs tuning.
Third, weights can be dynamic: raise the sparse side when numbers, English abbreviations and quoted text dominate, otherwise favor dense. Fourth, three implementation paths: parallel calls at the application layer then fusion (most flexible), built-in hybrid in vector databases (Milvus sparse plus dense, Elasticsearch or OpenSearch kNN plus BM25), and learned sparse models such as SPLADE emitting both representations from one index.
Fifth, Chinese sparse retrieval needs a good tokenizer: BM25 depends on segmentation, a missing domain dictionary cuts recall, character n-grams can serve as fallback, and English abbreviations and model numbers need lowercasing disabled.
Common Misconceptions
Misconception one: adding scores directly, letting long-tail BM25 values dominate and swallowing the vector side. Misconception two: hybrid always beats single channel; on pure semantic queries it may add noise. Misconception three: no dedup after fusion, so a document hit twice takes two slots. Misconception four: tuning only alpha while the issue is chunking or tokenization. Misconception five: updating the two indexes separately, recalling different versions.
Application Scenarios
Enterprise knowledge base QA, e-commerce search (brand and model plus description), legal and regulatory retrieval, code repository retrieval, medical literature search, ticket troubleshooting, RAG with citations, multilingual search, internal portal search, log and alert retrieval, academic aggregation, and cross-department knowledge search.