Modern vector databases combine sparse (BM25) and dense vectors at the storage layer via two distinct patterns. Identify them.
Two patterns: (1) Two separate indexes (inverted for BM25, ANN for dense) fused at query time via Reciprocal Rank Fusion, the Pinecone / Weaviate / Qdrant way.
Imagine you're sorting books by 'most relevant to my question.' One approach: ask your keyword-matching librarian for their ranked list, ask your meaning-matching librarian for theirs, then blend the two lists fairly using a formula. **That's pattern 1 (score fusion).** Another approach: have one super-librarian who looks at both keyword matches AND meaning at the same time and produces a single ranked list directly. **That's pattern 2 (joint scoring).** Both work; the first is easier to operate (two simpler systems) and the second is sometimes more accurate (the librarian can balance the signals on a per-book basis).
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Hybrid search is one of the most-implemented and least-understood features in modern vector databases. Users see a single 'hybrid' parameter; engineers need to know that there are two architecturally distinct ways to deliver it, with different operational and quality tradeoffs.
Why hybrid exists
BM25 and dense embeddings have complementary strengths. BM25 wins on queries with rare exact terms (product SKUs, person names, technical identifiers); dense embeddings win on paraphrased semantic queries. Published BEIR benchmarks consistently show hybrid retrieval beating either modality alone across diverse query mixes.
The production answer to 'should I use sparse or dense?' is almost always 'both, with hybrid'. The question is then how to combine them at the storage layer.
Situations where this technique stops working.
2–4 min · Everything important, quickly.
| Aspect | Pattern 1 (two indexes + RRF) | Pattern 2 (single hybrid) |
|---|---|---|
| Indexes per collection | Two (inverted + ANN) | One (combined) |
| Fusion location | Query-time, after both indexes | Index-time, during traversal |
| Canonical fusion | Reciprocal Rank Fusion (RRF) | Per-document tensor expression |
| Operational complexity | Two writes per insert | One write, complex index |
| Scoring nuance | Uniform across documents | Per-document conditional |
| Canonical vendors | Pinecone, Weaviate, Qdrant | Vespa, Milvus-hybrid mode |
| Best for | RAG retrieval, mixed-query loads | Search/ranking with business rules |
Real products, models, and research that use this idea.
- Pinecone's sparse-dense hybrid: per-record sparse_values + dense values; RRF fusion is automatic via the query API.
- Weaviate's hybrid query exposes an alpha parameter to weight sparse vs dense, layered on RRF-style ranking.
What an interviewer would ask next. Try answering before peeking at the approach.
QWhy is Reciprocal Rank Fusion (RRF) preferred over weighted-sum fusion in production?
BM25 scores are unbounded positives; dense cosine scores are bounded in [-1, 1]. Weighted sum requires normalization, which is brittle to score-distribution drift across collections and over time. RRF is rank-based, sidestepping the normalization problem entirely.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Believing hybrid search is a single technique. There are two architecturally distinct patterns, and the choice has real operational and quality consequences. Production engineers need to know which pattern their vendor implements.
60 second bullets to scan on the way to the call.
Pattern 1 = two indexes (inverted + ANN) fused via RRF after retrieval
Pattern 2 = single hybrid index with joint scoring during traversal
Primary sources. Browse if you want the original framing.
Same topic, related formats. Practice these next.