Skip to content

Learning path · Retrieval & Ranking · 43

Semantic Search

Finding documents by meaning similarity between query and corpus embeddings rather than exact keyword match.

Why it matters

  • Captures paraphrases and conceptual questions keywords miss.
  • Core retrieval stage before RAG generation.
  • Fails on rare proper nouns without hybrid lexical backup.

Key ideas

  • Query embedding
  • Top-K retrieval
  • Similarity thresholds

Semantic search embeds the user question, pulls nearest neighbours from the vector index, and passes hits to downstream rerankers or the LLM. Tune top-K: too low misses evidence; too high adds noise and tokens. Log queries with zero hits—they signal glossary gaps or stale indexes. Always pair with ACL filters so embeddings never leak cross-tenant data. Publish zero-hit queries to content owners monthly; they reveal glossary gaps faster than tuning embedding models alone. Ship only after eval gates pass on representative production failures.

Updated 2026-08-09 · Full learning path