ModelRefs / Sparse Retrieval — AI Glossary
Sparse Retrieval — AI Glossary
Retrieval using term-frequency representations (BM25, TF-IDF) that match on exact and overlapping vocabulary. Fast, interpretable, and requires no GPU.
Overview
Sparse retrieval assigns each document a high-dimensional sparse vector over the vocabulary. BM25 is the dominant algorithm: TF-IDF weighted by document length normalization. Fast, interpretable, and requires no GPU. Excels on exact-match, rare-word, and named-entity queries. Weakness: no understanding of synonyms or paraphrases.
Reference details
| Topic | rag |
|---|---|
| Also known as | BM25 retrieval, keyword retrieval, lexical retrieval |
| Last reviewed | 2026-06-24 |
Related terms
How it works
- Each document becomes a vector with one dimension per vocabulary term, almost all of them zero — which is what the word sparse describes.
- Non-zero weights come from term statistics: frequency in the document, rarity across the corpus, and a length normalisation.
- An inverted index maps each term to the documents containing it, so a query touches only the postings for its own terms rather than every document.
- Scoring sums contributions over the query's terms, so a match is always explainable by which terms matched and how rare they were.
- Learned sparse variants predict term weights with a model and may expand to related terms, keeping the inverted index while loosening exact matching.
Example: Why sparsity is what makes it fast
A 50,000-term vocabulary gives every document a 50,000-dimensional vector, but a 300-word document has perhaps 150 distinct terms — so about 0.3% of the dimensions are non-zero. A three-term query inspects only the postings lists for those three terms, perhaps a few thousand documents out of millions, instead of computing a similarity against every vector. Dense retrieval has no equivalent shortcut, which is why it needs an approximate index to be fast at all.
Commonly confused with
The category, of which BM25 is the standard implementation, named for the vectors: one dimension per vocabulary term, almost all zero. Dense retrieval is the counterpart, with a few hundred or thousand dimensions all populated. Learned sparse methods blur the line by producing sparse vectors from a model, which have the exact-match property with some semantic reach.
When to use it
Reach for it when:
- Exact term matching matters — identifiers, codes, names, error strings.
- Interpretability is required, since the score decomposes into which terms matched.
- No accelerator is available and a strong baseline is needed quickly.
Reach for something else when:
- Queries and documents use different words for the same concept, where there is no overlap to score.
- Cross-lingual retrieval, with no shared vocabulary.
- As the only retriever for conversational questions, where paraphrase dominates.
Continue your research
Use these connected ModelRefs sections to compare alternatives, inspect implementation paths, and review the evidence and governance boundaries relevant to Sparse Retrieval — AI Glossary.
Frequently asked questions
What is Sparse Retrieval?
Retrieval using term-frequency representations (BM25, TF-IDF) that match on exact and overlapping vocabulary.
Is Sparse Retrieval the same as BM25 retrieval?
Yes — BM25 retrieval, keyword retrieval, lexical retrieval are common aliases for Sparse Retrieval.
What concepts are related to Sparse Retrieval?
Closely related concepts include dense retrieval, fusion retrieval, ivf.