← All questions
Retrieval & EmbeddingsMedium· Retrieval Strategies

What makes hybrid search better than pure vector search...

Dense retrieval is built to find meaning, which is exactly why it struggles with exact tokens. Embeddings compress a term like an error code, a clause number, or a product SKU into a point in semantic space near similar-looking tokens — which is the opposite of what you want when the user is searching for one specific, exact identifier. Enterprise documents are dense with exactly this kind of token, and a query for “error E-4012” run through pure vector search can come back with generically related troubleshooting guides while missing the one document that actually names E-4012.

Sparse keyword search — BM25 — is the mirror image: it matches exact terms precisely but has no notion of paraphrase or synonymy, so it misses documents that describe the same thing in different words. The fix is running both retrieval methods in parallel on every query and merging their two ranked lists with Reciprocal Rank Fusion, which combines results by rank position rather than trying to compare BM25 scores and cosine similarities on incomparable numeric scales. This consistently outperforms either method run alone, and it’s the reason “only dense search” is a weak answer for anything touching real enterprise content.

Code playground (Python)