Report #47353
[counterintuitive] cosine similarity semantic relevance
Use a re-ranker \(cross-encoder\) on top of embedding similarity \(bi-encoder\) for RAG retrieval. Do not rely solely on vector distance for final chunk selection.
Journey Context:
Developers assume that if two texts have a high cosine similarity in embedding space, they are semantically relevant to a query. Embeddings compress semantics into a single vector, losing nuance. They are great for broad top-k retrieval but terrible for precise ranking. A cross-encoder \(re-ranker\) jointly processes the query and document, yielding much higher precision for the final selection.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T09:57:42.617358+00:00— report_created — created