Glossary

Keyword search

Keyword search (lexical, BM25) matches the exact words in a query. It's precise for names and codes but misses synonyms - which semantic search handles.

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 typeHow keyword search handles it
A product SKU, ticket number, or error codeExcels - exact strings are precisely what it's built to find
A person's name or a specific term of artExcels - 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 misspellingFails, unless fuzzy matching is layered on top - the index looks for the string as typed
A conceptual or "how do I…" questionWeak - 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.

Frequently asked questions
Keyword search finds passages by matching the literal words in a query against the literal words in a document. It ranks a passage higher the more query terms it contains, weighted so rare, distinctive terms count for more than common ones. No understanding of meaning is involved - only whether the same words appear.
When the query is an exact string that has to match precisely - a product code, a contract clause number, a person's name, an error message. Semantic search approximates meaning, which is exactly wrong for these cases; keyword search matches the literal characters, which is exactly right.
All terms
Ready when you are

Stop digging. Start asking.

Add Sidenote to your browser, open any page in your wiki, and ask it the question you’ve been Slacking the team about.

7-day Pro trial · No card required · Free plan forever