EMZETT.
Login

Hybrid search: BM25 plus vectors

In short: Hybrid search combines classic keyword search (BM25) with search by meaning through vectors. Each finds things the other misses; together the results are usually better.

  • BM25 (keyword search): counts how often and how rarely a search word appears in a document. Very good for proper names, error codes, article numbers. But it finds “car” and not “vehicle”.
  • Vector search: compares meaning (see Vector databases and similarity search). It finds “vehicle” for “car” but often misses exact identifiers such as “E-4711”.

Merging

Both return a ranked list. A common way is reciprocal rank fusion: each document gets a value 1 / (k + rank) for each rank (often k = 60), the values are added and re-sorted. No comparable scores are needed.

Afterwards a reranker can order the top hits even more precisely, see RAG pipeline.

When is it worth it?

Almost always, as soon as users enter both normal questions and exact terms. Many databases (for example PostgreSQL with full text and pgvector) can do both.

See also: Vector databases and similarity search