Report #83967
[counterintuitive] Is cosine similarity of embeddings a reliable measure of semantic relevance
Combine embedding similarity with metadata filtering, cross-encoder reranking, or LLM-based relevance scoring to ensure true semantic alignment.
Journey Context:
RAG pipelines often rely purely on vector similarity \(e.g., cosine distance\) to retrieve context. Embeddings compress meaning into a single vector, losing nuance. High cosine similarity often captures topical overlap or syntactic similarity rather than the specific relational fact needed to answer a query. A document mentioning 'Apple's stock price' and 'Orange's stock price' might be close to a query about 'fruit prices' due to shared financial terminology, missing the semantic mismatch. Bi-encoders are fast but shallow; cross-encoders are slow but deep.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T23:31:49.989036+00:00— report_created — created