Sparse Retrieval

Definition: Sparse retrieval finds information using mostly zero-valued feature representations in which exact words or lexical terms receive meaningful weights.
Also known as: Lexical retrieval

What is sparse retrieval?

Sparse retrieval finds documents using high-dimensional feature representations in which most values are zero. In traditional lexical systems, the non-zero features correspond mainly to words or terms, with weights reflecting their importance.

It is often described as keyword or lexical retrieval.

How it works

The system builds an inverted index that maps terms to documents containing them. At search time, it compares the query's terms with indexed terms and calculates relevance using factors such as frequency, rarity, and document length.

For example, a search for an exact error code can quickly find documents containing that code. Exact names, identifiers, quoted phrases, and domain terminology are strong sparse-retrieval use cases.

Some modern sparse models learn term weights or expansions, but their representation remains mostly zero-valued and tied to lexical features.

Sparse retrieval versus dense retrieval

Dense retrieval compares embeddings that encode semantic relationships. It can find paraphrases with different wording. Sparse retrieval focuses on term-level evidence and is often easier to inspect.

Sparse retrieval may miss a document that uses synonyms instead of the query words. Dense retrieval may miss or blur rare identifiers. Neither method is universally better.

Sparse retrieval versus hybrid search

Hybrid search combines sparse and dense retrieval. Sparse results contribute precise lexical matches, while dense results contribute semantic matches. A fusion or reranking step combines them.

Query rewriting can also improve sparse retrieval by adding useful synonyms or expanding abbreviations, but a wrong rewrite can reduce precision.

Limits and quality

Common words can dominate unless scoring handles them properly. Tokenization, stemming, language, spelling, and domain vocabulary affect results. Exact matching also does not ensure that a document is current, authorized, or contextually correct.

Metadata filters should enforce known constraints. Retrieval evaluation should include rare terms, identifiers, paraphrases, and ambiguous queries.

Why it matters

Sparse retrieval is fast, mature, and strong when wording carries precise meaning. It remains valuable even in embedding-based systems because real queries often contain codes, names, and exact phrases.

Its best role may be standalone or as one half of hybrid search. The right choice depends on the collection and query patterns, not on whether one method is newer.