What is hybrid search? BM25 plus vector search

Also called hybrid retrieval, BM25 plus vector search, keyword and semantic search

Definition

Hybrid search is a retrieval method that runs keyword search, typically BM25, and vector similarity search on the same query and merges the two ranked lists into one result set.

Hybrid search is a retrieval method that combines lexical (keyword) search with semantic (vector) search for the same query. The keyword side, usually BM25, matches exact terms. The vector side compares embeddings to match meaning. A fusion step merges both ranked lists into one.

How hybrid search works#

Hybrid search works by running two retrievers in parallel and fusing their results:

  1. Keyword retrieval: BM25 scores each document by how often the query terms appear in it, weighted by how rare each term is across the corpus and normalized for document length.
  2. Vector retrieval: the query is embedded and matched against document vectors in a vector database.
  3. Fusion: the two lists are merged into one ranking.

Reciprocal rank fusion (RRF) is a common fusion method because it uses only rank positions, so the incompatible score scales of BM25 and cosine similarity do not matter. Each document receives 1 / (k + rank) from every list it appears in, and the sums are sorted. Elasticsearch's RRF implementation sets k to 60 by default. The alternative is weighted score fusion, which normalizes both scores and blends them with a tunable weight. The fused list often goes to a reranking model before it reaches the LLM.

Hybrid search tends to beat pure vector search when queries contain exact identifiers, such as error codes, product SKUs, function names, or legal citations, which embeddings blur together with similar-looking strings. Pure vector search handles paraphrases and synonyms well but can miss a document that shares the one rare term the user typed. Anthropic's contextual retrieval write-up makes the same point: embeddings can miss exact matches such as unique identifiers, and combining BM25 with embeddings beat embeddings alone in Anthropic's tests.

Vector search Hybrid search
Matches Meaning Meaning and exact terms
Handles synonyms Yes Yes
Handles rare identifiers Often poorly Yes
Moving parts One index Two indexes plus fusion

The cost of hybrid search is a second index to build and keep in sync, plus a fusion step to tune. Many vector databases and search engines now support both index types in one system, which reduces that overhead; the vector databases directory lists options. For the full pipeline, see What is RAG and the retrieval-augmented generation entry.

Cite this definition

The AI Engineering Editors. "What is hybrid search? BM25 plus vector search." The AI Engineering, updated Nov 06, 2026. https://theaiengineering.com/glossary/hybrid-search

Title
What is hybrid search? BM25 plus vector search
Author
The AI Engineering Editors
Publisher
The AI Engineering
Updated
View as Markdown

Part of the RAG and vector search hub · Updated