Report #1674
[architecture] When is pure dense vector search not enough, and how do I add lexical search?
Use hybrid search whenever queries contain exact keywords—IDs, product names, error codes, regulations, or domain jargon—or when recall of rare terms is critical. Implement it as dense retrieval plus BM25 or SPLADE sparse retrieval, fused with Reciprocal Rank Fusion \(RRF\). Do not rely on dense embeddings to memorize exact strings.
Journey Context:
Dense embeddings excel at paraphrase and conceptual similarity but can fail on exact matches and out-of-vocabulary tokens because meaning is compressed into a single vector. Lexical search \(BM25\) is predictable for exact terms and rare jargon. Production RAG failures like "find error code ECONNREFUSED" usually trace back to dense-only retrieval. Weighted alpha fusion is sensitive to tuning; RRF with k=60 is the standard, less brittle method for merging ranked lists from the two indices.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T06:48:48.539898+00:00— report_created — created