Course map
Stage 1: Foundations
Stage 2: Machine Learning
Stage 3: Deep Learning
Stage 4: LLMs & Generative AI
Stage 5: Production & Specialization

Part 16 / Topic 5 of 5

Hybrid search

Sparse catches exact terms (order ids, error codes, names); dense catches paraphrases. Hybrid search runs both and merges rankings (commonly reciprocal-rank fusion), getting both behaviours:

query: "refund for order A1001"
  dense  → understands "refund" ≈ returns/payment meaning
  sparse → pins the literal token "A1001"
  fused  → the returns doc AND the exact order's records

Rule of thumb: pure dense for conversational questions over prose; add sparse the moment your corpus contains identifiers, codes or jargon users type verbatim. Most production RAG (Part 17) ends up hybrid.

Done here? The practice set for Part 16 — 4 exercises with solutions — is on the part page.

Search the guide