AI Rookies

BM25 — Best Matching 25

Fact

A search method for ranking documents by keyword match.

In Plain Words

BM25 is like hunting for fries in a school cafeteria. The short “FRIES” sign beats a giant salad poster.

Search and knowledge bases use it. It finds likely text first. Then the model answers from that text.

Related Concepts

IR
BM25 is a classic ranking method in IR.

RAG
RAG often uses BM25 to find text before the model answers.

Vector search
BM25 pairs with Vector search for word match and meaning match.