Report #85819
[counterintuitive] Is cosine similarity of embeddings enough for RAG retrieval
Use a two-stage retrieval pipeline: fast embedding search \(bi-encoder\) followed by a cross-encoder/reranker model to evaluate true semantic relevance before passing to the LLM.
Journey Context:
Developers assume vector databases with cosine similarity perfectly capture semantic meaning. Embeddings compress meaning into a single vector, losing nuance and often matching on superficial vocabulary or topical overlap rather than answer-relevance. A reranker \(cross-encoder\) evaluates the query and document together, solving the approximate nearest neighbor limitation of embedding spaces.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T02:38:09.753465+00:00— report_created — created