Keyword search - also called lexical search, or BM25 after its most common scoring algorithm - retrieves passages by matching the exact words in a query against the words in a document. A passage ranks higher if query terms appear in it frequently and if those terms are rare across the wider corpus (common words like "the" carry little weight).
This is the same basic idea behind decades of search engines and find-in-document tools: build an index of which words appear where, then look up the query's words in that index at search time. No model has to interpret anything - the system just counts matches, which is why keyword search is cheap to run and easy to reason about.
Why it matters
Keyword search is fast, transparent, and surprisingly hard to beat for certain queries. If a user types a contract clause number, a product SKU, a name, or any other term that is both precise and distinctive, a keyword index finds it reliably - without the approximation that comes from compressing meaning into a vector. The result is also easy to inspect: you can see exactly which words drove the match.
The limitation is symmetry: a keyword index only recognizes words it has seen. A query for "ending a subscription" won't match a paragraph headed "cancellation policy" because none of the words overlap. That is the gap semantic search was built to close - it matches meaning, so synonyms, paraphrases, and conceptual links all surface.
What exact-match handles well, and where it breaks down
Every strength of keyword search comes from the same source - it only ever asks "do these exact characters appear?" - and every weakness comes from that same narrowness.
| Query type | How keyword search handles it |
|---|---|
| A product SKU, ticket number, or error code | Excels - exact strings are precisely what it's built to find |
| A person's name or a specific term of art | Excels - distinctive words rank highly and rarely need interpretation |
| A synonym or rewording ("end my plan" vs. "cancellation policy") | Fails - no shared words means no match, regardless of matching meaning |
| A typo or misspelling | Fails, unless fuzzy matching is layered on top - the index looks for the string as typed |
| A conceptual or "how do I…" question | Weak - common words in the question rarely overlap with the document's phrasing |
The pattern is consistent: keyword search is at its best whenever the right answer is a specific string the user already knows, and at its weakest whenever the right answer requires understanding what the user means rather than what they literally typed. That second category is precisely what semantic search is designed for - and it's worth being clear that this isn't a flaw to be engineered away. Exact-match behavior is the entire point of a keyword index; asking it to also infer meaning would trade away the speed and precision that make it useful in the first place.
In practice, neither method dominates alone, which is why hybrid search combines both: keyword precision for exact terms, semantic recall for everything else. Together they give a retrieval system a better chance of finding the passage that actually answers a question, regardless of the words used to ask it.