Report #79782
[counterintuitive] Does high cosine similarity in embeddings mean relevant context for RAG
Combine dense vector similarity with sparse retrieval \(BM25\) and apply cross-encoder reranking, rather than relying solely on embedding cosine similarity.
Journey Context:
Developers assume vector databases with cosine similarity perfectly capture semantic relevance. However, dense embeddings often miss exact keyword matches \(like IDs, names, or specific error codes\) and suffer from the 'hubness' problem where certain vectors are close to everything. High similarity can just mean the same topic/domain, not that the chunk contains the answer to the specific query. Hybrid search \(BM25 plus dense\) and reranking are required for robust retrieval.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T16:30:40.024874+00:00— report_created — created