Hybrid Search
Vector search feels like magic until it quietly misses the obvious. Ask a knowledge base for an exact form number, an error code, or a person's surname, and pure semantic similarity can rank the right document below several vaguely-related ones. Hybrid search fixes this by combining semantic vector similarity with old-fashioned keyword matching β and in practice it retrieves better than either alone.

Why pure vector search misses exact terms
Embeddings capture meaning, which is their strength and their blind spot. The model maps "document" and "form" near each other because they mean similar things β but it has no special respect for the literal token "GDS-4471" or "Β§230(c)". A rare identifier carries enormous signal to a human and almost none to a similarity score, so the exact match a user typed can sink beneath topically-adjacent noise. Keyword search has the opposite profile: it nails exact tokens and proper nouns but understands nothing β search "car" and it never finds "automobile."
The two methods fail in complementary ways. That is precisely why combining them works.
Combining the two signals
Hybrid search runs both retrievals and merges them:
- Semantic β embed the query and rank by
VECTOR_DISTANCE, catching paraphrases and concepts. - Keyword β match the literal terms (a
LIKE, full-text search, or a term-frequency score), catching exact identifiers and names. - Merge β fuse the two ranked lists into one final ordering.
A common, robust fusion is Reciprocal Rank Fusion (RRF), which scores each result by its position in each list rather than by raw scores β sidestepping the awkward problem that cosine distances and keyword scores aren't on the same scale. The simpler approach LyraLearn takes is a keyword boost: it ranks chunks by cosine distance, then nudges results that also contain the query's literal terms upward. Cheap to implement, and it rescues the exact-match cases that pure vector ranking would bury.
Practical guidance
A few rules that hold up in enterprise and public-sector deployments:
- Default to hybrid for any corpus with identifiers, codes, names, statutes, or product SKUs β which is nearly all of them. Pure vector search is fine only when content is uniformly prose.
- Keep it in one query path. Because the vectors and the text live in the same SQL Server table, you can compute the semantic rank and the keyword match together β no second system to call, no two result sets to reconcile across a network.
- Always re-rank what you retrieve. Hybrid search widens the net; grounding (Module 3) still decides what actually goes into the prompt and whether the evidence is strong enough to answer.
Hybrid retrieval is the quiet workhorse of production RAG: it's what keeps a tutor from confidently overlooking the one passage that names exactly what the user asked about.