loading
loading
The classic keyword-ranking algorithm that scores documents by how often query terms appear, weighted so rare words count more.
BM25 is a tuned bag-of-words ranker: it rewards documents containing your query terms, dampens the reward as a term repeats (TF saturation), and boosts rare terms via inverse document frequency, while normalizing for document length. It knows nothing about meaning — 'car' and 'automobile' are unrelated to it — but it's fast, needs no embedding model, and is unbeatable for exact tokens like names and codes. That's exactly why it pairs with vector search in hybrid setups: it covers the literal half that embeddings fumble.
Plainly
Think of BM25 as a simple recipe for doing the work better. The classic keyword-ranking algorithm that scores documents by how often query terms appear, weighted so rare words count more.
In practice
Use it when you need a repeatable method instead of guessing from vibes. In practice, define the owner, input, output, and failure mode before you rely on it.