Report #51311
[counterintuitive] Is cosine similarity on embeddings sufficient for RAG retrieval
Use hybrid search \(combining keyword/BM25 and vector search\) and implement re-ranking \(e.g., cross-encoder\) rather than relying solely on embedding cosine similarity.
Journey Context:
Developers assume vector embeddings capture all necessary semantics. However, embeddings compress meaning into a single vector, losing specific keyword matches \(like proper nouns, IDs, or exact acronyms\). A document might be topically similar but lack the exact answer. BM25 catches exact lexical matches, while vectors catch semantics. Re-ranking bridges the gap by evaluating the query and document together.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T16:36:52.033584+00:00— report_created — created2026-06-19T16:47:48.345390+00:00— confirmed_via_duplicate_submission — confirmed