The Hybrid Search article combined sparse retrieval with dense retrieval. This article zooms into the older, more fundamental idea sparse retrieval itself is built on: keyword search.
The simple definition
Keyword search finds documents by matching the literal words in a query against the literal words in stored content, without any attempt to understand meaning. Recall from the Sparse Retrieval article’s discussion of BM25 — keyword search is the broader, older concept BM25 is one modern, statistically refined implementation of. It’s the search paradigm most people intuitively think of first: type in some words, find documents containing those same words.
Why this is the right starting point for understanding sparse retrieval
Recall from the Sparse Vector article’s introduction of word-counting as the classic source of sparse vectors. Keyword search predates embeddings, vector databases, and everything else covered throughout the Data Representation phase by decades — it’s the original, foundational approach to search, going back to early information retrieval systems long before neural networks were practically usable for this purpose at all.
flowchart LR
A["Query: 'refund policy'"] --> B[Keyword Search: exact word matching]
B --> C["Finds documents literally containing 'refund' and 'policy'"]
ANALOGY vs. TECHNICAL REALITY
Analogy: Think of using a printed book’s index, or the “find” function (Ctrl+F) in a word processor — you type an exact word, and it locates every place that exact word literally appears. No understanding of context or meaning is involved, just direct, literal text matching.
Where this breaks down: A simple find function does exact string matching with no ranking.
Real keyword search systems, using scoring formulas like BM25 covered in the Sparse Retrieval article, add genuine statistical sophistication on top of this basic idea — weighting rare words more heavily than common ones, adjusting for document length — a meaningfully more refined process than a simple, unranked text search, even though the underlying principle (literal word matching, not meaning) remains the same.
How keyword search relates to sparse retrieval, precisely
It’s worth being precise about this relationship, since the terms are used closely together throughout this phase. Keyword search is the general, conceptual approach — finding content through literal term matching.
Sparse retrieval, covered in its own article, is the modern, vector-based technical implementation of that same idea, using sparse vectors and BM25 scoring specifically so it can be combined mathematically with dense retrieval in a hybrid search system, as covered in the previous article.
In casual usage the two terms are often used interchangeably, but sparse retrieval specifically refers to keyword search recast into the vector framework this glossary has covered throughout.
A concrete example, layered
For a simple beginner example: searching an old-style library catalog system for “Shakespeare” returns every book with that exact word in its title or author field, with no attempt to also surface books about Elizabethan drama more broadly that don’t happen to use that specific name.
For a production example: search engines built on Elasticsearch and OpenSearch, referenced in the Sparse Retrieval article, are directly descended from decades of keyword search research and remain the standard, actively deployed infrastructure for large-scale text search across many industries — genuinely mature, battle-tested technology, not a historical footnote.
Why keyword search’s core limitation motivated everything else in this phase
It’s worth connecting this directly back to why dense retrieval and embeddings were developed in the first place.
Recall from the Semantic Search article: keyword search fails whenever a user’s query and the relevant content use genuinely different words for the same underlying concept — searching “affordable” would miss a document that only says “budget-friendly.” This exact, well-known limitation is precisely what motivated the entire embedding-based, semantic search research program covered throughout the Data Representation phase, and it’s why dense retrieval exists as a genuine complement rather than keyword search simply being replaced outright.
Search an inverted index
An inverted index records which documents contain each searchable term:
“refund” → documents 2, 7, 11
“headphone”→ documents 3, 7
“opened” → documents 7, 9
The query “opened headphone refund” quickly points toward document 7 because it contains all three terms. A ranking algorithm such as BM25 also considers term rarity, repetition, and document length.
Keyword search works especially well for names, identifiers, quoted phrases, dates, and specialized terminology. It works less well when the query and document express the same idea using entirely different vocabulary, which is where dense retrieval can help.
Keyword search in a real AI assistant
An IT assistant may use keyword search first when a query contains the exact code “ERR_AUTH_17”. The matching incident document is then supplied to the language model, which explains the fix in friendly language. Search finds the exact evidence; Gemini explains it.
Google’s search products expose lexical relevance as a distinct signal that can be combined with embedding similarity. This confirms that modern AI search has not made exact-word search obsolete. See the official Vertex AI Search method reference.
Common misconception
A frequent beginner assumption: that keyword search is a simple, outdated technique with nothing left to teach a modern AI engineer. As this article and the Sparse Retrieval article together have shown, keyword search’s core principle lives on directly inside BM25 and sparse retrieval — genuinely current, actively used components of virtually every serious production hybrid search system, not a discarded relic replaced entirely by embeddings.
Where this fits in what comes next
You now understand the full retrieval toolkit — dense, sparse, hybrid, and the classic keyword search foundation underneath sparse retrieval. The next two articles, Reranking and Reranker, cover what happens after initial retrieval — a further refinement step that takes an initial set of candidates and sorts them more carefully before they ever reach the language model.
In one sentence
Keyword search is the classic, decades-old approach of matching literal words rather than meaning, and while embeddings and dense retrieval have given search genuinely new semantic capabilities, keyword search’s core principle remains alive and well inside BM25 and sparse retrieval, still standard, actively deployed infrastructure across the industry today.
Related Terms
- Author
- TechByteByByte Editorial Team
- Reviewed by
- TechByteByByte Admin
- Published
- Last reviewed