Keyword search vs semantic search

Keyword search matches characters and excels at exact terms, identifiers and precision. Semantic search matches meaning and excels at descriptive, misspelled and conversational queries. They fail in opposite directions, so production systems increasingly run both and fuse the results rather than choosing.

Side by side

Keyword (BM25)Semantic (vectors)
Matches onTerms and frequencyMeaning and proximity
Strong atSKUs, names, exact phrasesDescriptions, paraphrase, intent
Weak atSynonyms, phrasing varietyIdentifiers, negation
Empty resultsReturns nothing when unmatchedAlways returns nearest items
Setup costLowEmbedding and re-indexing cost
ExplainabilityHigh — you can see whyLow — distance is opaque

How to choose a default

If most queries are exact product names, part numbers or codes, keyword-first with typo tolerance handles the majority at lower cost. If most queries are descriptive, semantic-first is worth the indexing overhead.

For any site with mixed traffic — which is most sites — hybrid is the correct answer, and the interesting decision moves to how the two result sets are fused and re-ranked.