Course guide

Hybrid Search Explained: Combining Keyword and Semantic Search for Better RAG

Hybrid search combines BM25 keyword search with vector semantic search. Learn why single-mode search fails and how hybrid retrieval improves RAG quality.

Keyword search (BM25) finds exact term matches but misses synonyms and meaning. Semantic search (vectors) understands meaning but misses exact terms, acronyms, and proper nouns. Hybrid search combines both for dramatically better retrieval quality.

How Hybrid Search Works

  1. Query runs through both BM25 keyword index and vector similarity search
  2. Results from both are merged using Reciprocal Rank Fusion (RRF) or weighted scoring
  3. A reranker (cross-encoder model) reorders the combined results by relevance
  4. Top results are passed to the LLM as context

Learn Hybrid Retrieval

Module 7 covers hybrid search, reranking, query expansion, and Graph RAG.

Learning path

Continue from concept to implementation

These course modules place this topic in context, connect it to adjacent decisions, and provide the practical next step.

Practical outcomes

What the recommended module teaches

  • Implement hybrid search (BM25 + vector)
  • Add reranking with cross-encoder models
  • Design query expansion and transformation strategies
  • Understand Graph RAG for relationship-aware retrieval