Hybrid Search
Keyword search and vector search fused — lexical precision plus semantic recall.
Hybrid search runs lexical retrieval (BM25) and semantic retrieval (embeddings) in parallel and merges results, typically with reciprocal rank fusion. Each covers the other’s blind spot: keywords catch exact codes and names; vectors catch paraphrase and meaning. Most production RAG retrieval is hybrid, often followed by a reranker for final ordering.
Worked example: fuse BM25 keyword scores with embedding similarity (often via reciprocal rank fusion) so a query like ‘reset ENOTFOUND error’ matches both the exact code and paraphrased explanations. Gotcha: the two score scales differ, so you cannot just add them — rank-based fusion or tuned weights are needed, and the payoff is largest on mixed queries with rare terms plus conceptual intent.