Pixel Myth
← Field notes
RAG

Hybrid retrieval: BM25 never left

RAG field note

Part numbers, standards codes and proper nouns are still found better by keyword search.

Vector databases are the modern approach to context retrieval and semantic search. They understand semantic meaning and similarity relationships. They also fail completely and reliably on exact string queries like part numbers or technical standards.

A client selling industrial components needs retrieval on part numbers like EN 12345 or ISO 8080 or other standards identifiers. Vectors understand those are all standards but cannot distinguish between them effectively.

Keyword search on those exact-match queries works perfectly and reliably. Vector search fails consistently. Combining both approaches with rank fusion fixed the class of queries that users complained about most.

Half a decade of research into neural retrieval methods and it is still BM25, an algorithm from nineteen-ninety-four, that solves this particular problem. Sometimes the older tool is exactly right.

We stopped assuming vectors were sufficient in all cases and contexts. Most production systems now start with hybrid search combining both approaches. Vector-first is only an optimization for later refinement stages.

It is a useful reminder that novelty in technique does not always beat simplicity and that the tool right ten years ago may still be right.