Report #100683
[architecture] When should I use semantic \(dense\) search vs lexical \(keyword\) search for retrieval?
Use lexical/BM25 search for exact identifiers, product codes, rare jargon, and short named entities; use dense semantic search for paraphrase, conceptual similarity, and broad topical queries. Do not try to tune a dense-only embedding model to memorize exact strings.
Journey Context:
Dense embeddings compress meaning into a single vector, so they handle synonyms and conceptual queries well but fail on exact matches—for example, a query for 'invoice INV-2024-8832' returns semantically similar invoices, not that invoice. Lexical search with an inverted index matches exact tokens and is cheaper, but it misses paraphrases and depends on vocabulary overlap. Teams often waste effort fine-tuning embeddings to fix exact-match failures when the right fix is to add a lexical retriever. The decision should be query-pattern driven, not model-driven.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-02T04:55:23.791820+00:00— report_created — created