Semantic and Hybrid Search — Matching by Meaning

Keyword search has one incurable weakness: it matches words, not meaning, so it misses relevant results that use different vocabulary than the query. Semantic search fixes this by representing queries and documents as vectors of meaning and matching by proximity in that space — the technology behind modern RAG. But the surprising lesson of production search is that semantic didn't replace keyword; the best systems combine them. This post explains vector search and why hybrid retrieval wins.

Post 4 named BM25’s ceiling (the vocabulary gap), and post 6 traced the path toward learned, embedding-based retrieval. This post completes the arc: how semantic search works, why it’s powerful, where it’s weak, and why hybrid retrieval — the combination of BM25 and vectors — is the modern default and the backbone of RAG. (This blog has a dedicated Vector Search Internals series for the indexing details; here we focus on the IR picture.)

Semantic search: matching meaning, not words

The core idea is to stop matching words and start matching meaning, using embeddings (ML series, post 7): a neural model maps any text — a query or a document — into a dense vector in a high-dimensional space, arranged so that texts with similar meaning sit close together, regardless of the words they use.

Search then becomes nearest-neighbor retrieval in vector space: embed the query, find the documents whose vectors are closest (by cosine similarity), return them. This directly dissolves BM25’s vocabulary gap (post 4) — relevance is judged by meaning, so synonyms, paraphrases, and conceptual matches are found automatically, with no hand-maintained synonym lists (post 3). It’s why semantic search feels like it “understands” the query, and why it became the retrieval mechanism for RAG: given a user’s question, embed it, retrieve the semantically closest document chunks, and feed them to the LLM.

Two pieces make it practical, both covered deeply in the Vector Search series: an embedding model (what turns text into meaningful vectors — the quality of retrieval rests on it) and a vector index using approximate nearest neighbor (ANN) search, because exact nearest-neighbor over millions of high-dimensional vectors is too slow — ANN trades a tiny bit of accuracy for the speed that makes semantic search scale, the vector-space analog of the inverted index’s role for keywords.

Why semantic search isn’t a free upgrade

It’s tempting to conclude vectors make keyword search obsolete. Production experience says otherwise — semantic search has real, complementary weaknesses:

So semantic and lexical search have opposite strengths: keyword nails exact terms and is interpretable but misses meaning; semantic captures meaning but blurs specifics. Neither dominates — which points directly at combining them.

Hybrid search: the best of both, and the modern default

The production answer is hybrid search — run both a keyword (BM25) retriever and a semantic (vector) retriever, and combine their results:

Hybrid consistently outperforms either alone, because the two methods fail on different queries: hybrid catches the exact-match query that vectors fumble and the conceptual query that keywords miss. This is why serious RAG and search systems are hybrid, and often add a reranker (post 6) as a final precision stage over the fused candidates — the retrieve-then-rank, multi-signal architecture that recurs everywhere in retrieval.

The meta-lesson closes the series’ arc: the history of search is not “new method replaces old” but “methods accumulate and combine.” The inverted index (post 2), BM25 (post 4), learning to rank (post 6), and semantic search all coexist in a modern system, each doing what it does best. Semantic search was the most important addition in years because it finally addressed the vocabulary gap that limited search from the beginning — but it joined the toolkit rather than emptying it. Understanding why keyword and semantic are complementary, not competing, is the single most useful thing to know when building retrieval for a RAG system: reach for hybrid by default, and know which half is carrying each kind of query.

The throughline: semantic search matches meaning by embedding queries and documents into a vector space where similar meanings sit close, turning retrieval into nearest-neighbor search (via ANN for scale) — dissolving BM25’s vocabulary gap (synonyms, paraphrases, concepts found automatically) and powering RAG. But it’s not a free upgrade: it’s weak at exact matches (codes, names, rare terms, phrases — the fuzziness that bridges meaning loses exactness), can retrieve plausible-but-wrong results, depends wholly on the embedding model, and is hard to interpret. Since lexical and semantic have opposite strengths, hybrid search (run both, fuse the results, often + a reranker) consistently wins — the modern default and the backbone of RAG. The series’ arc: search methods accumulate and combine (index + BM25 + LTR + vectors coexist), they don’t replace — so build retrieval hybrid by default.

Key takeaways

Further reading

Sources & References