Hybrid Search for RAG: Combining Lexical and Semantic Retrieval

Semantic (vector) search captures meaning but misses exact terms; lexical (keyword) search nails exact terms but misses meaning. Production RAG uses both. Here is why hybrid search wins and how to build it.

7 min read·By Bryan Rodrigues

Why one retriever is not enough

A single retriever consistently misses something. Pure vector search struggles with exact identifiers — product codes, error strings, names, acronyms — because they are not semantically distinctive. Pure keyword search misses paraphrase and meaning. Hybrid search combines lexical and semantic retrieval, then fuses and reranks the results, for higher recall and precision than either alone.

QueryLexical (BM25)exact termsSemantic (vector)meaningFuse (RRF)merge ranksReranktop resultsneither retriever alone catches everything — fuse them
Hybrid search runs both retrievers, fuses their rankings (often with RRF), and reranks before passing context to the model.

How fusion and reranking work

Each retriever returns a ranked list. Reciprocal Rank Fusion (RRF) merges them by rank without needing to normalize scores across two different scoring systems — simple and robust. Alternatively you can normalize and weight the scores. A reranker then re-orders the fused candidates by true relevance to the query. Keeping both lexical and vector scores visible makes the system debuggable.

Practical advice

  • Do not force the retrievers to compete — fuse their complementary strengths.
  • Benchmark BM25 + vector + reranker against one labelled query set before scaling.
  • Normalize scores before fusion, and keep individual scores visible for debugging.
  • Measure Recall@k and groundedness on a fixed evaluation set, not by eyeballing.

FAQ

Frequently asked questions

What is hybrid search in RAG?

+

Hybrid search combines lexical retrieval (keyword matching, e.g. BM25) with semantic retrieval (vector similarity), then fuses and reranks the results. It captures both exact-term matches and meaning, giving higher recall and precision than either method alone.

What is reciprocal rank fusion (RRF)?

+

RRF is a method for merging two ranked result lists by their ranks rather than their raw scores, so you do not need to normalize across different scoring systems. It is a simple, robust way to fuse lexical and vector search results in hybrid retrieval.

Does hybrid search improve RAG accuracy?

+

Usually, yes. Many RAG accuracy problems are retrieval problems — the right chunk never reached the model. Combining lexical and semantic retrieval, then reranking, typically improves recall and precision more than changing the model does.

Building this for real?

AI5 Labs designs, builds, and operates production AI systems. If this is the problem you are solving, let’s talk.

Schedule a discovery session