Glossary · Phase 1 · Building with LLMs
BM25
The standard keyword-search score: it rewards documents that use the question's words, especially rare words, without over-rewarding repeats.
Learn it properly
Making RAG good · Hybrid search, reranking and citations. About 30 minutes.
Other terms from the same lesson
- hit rate: The share of test questions where the right document appears in the top k results.
- hybrid search: Combining keyword search with embedding search, so you get both exact-word matches and matches in meaning.
- keyword search: Finding documents that contain the words in the question. It catches exact names and codes that meaning-based search can miss.
- mean reciprocal rank: A search score: for each test question, 1 ÷ the rank of the first right document, averaged. 1 means the right one always comes first.
- reciprocal rank fusion: A simple way to merge two ranked lists: each document scores 1 ÷ (60 + its rank) in each list, and the scores are added.
- reranker: A slower, more careful model that re-orders the top search results by how well each one actually answers the question.
- stopwords: Very common words such as "the" and "a" that keyword search ignores because they say little about what a document is about.