Skip to content

RAG & Search

BM25

A widely used keyword-ranking algorithm that scores how relevant documents are to a search query.

Example

BM25 ranks a page highly when it contains important query terms without excessive repetition.

Why it matters

It gives search a practical starting method that does not require a language model.

You'll hear it

“The exact terms match, but the page is much longer than the useful passage.”

Can you control it?

Set by the team

The people building or running the AI choose this setup. An everyday user generally needs their help to change how this part works.

Common questions

Does BM25 understand a passage like a person?
No. It uses word-based calculations rather than establishing human-like understanding.
Does adding more repeated keywords always help?
No. The method limits the benefit of repeated terms and accounts for document length.
Can it be combined with meaning-based search?
Yes. A system can combine its word matching with other methods when that improves results.

AI chatbot

Still have questions?

Ask the AI chatbot about this term or another AI concept.

Up to 500 characters.

Ask LATHIC about AI. Relevant glossary entries may be included.

Your question, the glossary entries it matches, and a rotating pseudonymous identifier go to Microsoft Azure’s OpenAI service through Vercel AI Gateway to generate an answer. Zero retention and no training are required of the provider, and LATHIC does not save your question or answer. Privacy Notice