AI CompendiumA public chart of the language
Home / Retrieval & Memory / Hybrid Search
Retrieval & Memory

Hybrid Search

Keyword search and vector search, combined and merged.

Definition

Running lexical retrieval (BM25 or full-text) alongside vector retrieval and blending the two ranked lists, so exact terms and paraphrases both work.

This is the pragmatic default for real corpora. Vector search finds the conceptually relevant passage; keyword search guarantees exact identifiers are not missed.

The reason it works is that the two methods fail in opposite directions. Vectors handle paraphrase and lose rare exact tokens; lexical search nails identifiers, error codes and product names and misses synonyms. Merging the ranked lists covers both, and needs no labelled data to set up.

How people use it
A search feature that fails on error codes.
"BM25 for the error string plus embeddings for the question. Hybrid, fused with reciprocal rank."
Worked example

The error code nobody could find

Support search cannot find documents by ticket or error identifiers.

Embeddings place a string like ERR-4021 essentially at random. Keyword search finds it instantly. Running both and fusing the ranks costs little and fixes the entire class of exact-token lookups.

Sources
Related terms