Report #65702
[counterintuitive] cosine similarity semantic search accuracy
Use hybrid search \(combining sparse/BM25 and dense/vector search\) and apply cross-encoder reranking models on the top-K results instead of relying solely on embedding cosine similarity.
Journey Context:
Developers treat cosine similarity between embeddings as a direct proxy for semantic relevance. Bi-encoder embeddings compress meaning into a single vector, losing nuance, negation, and exact keyword matches. This leads to retrieving topically related but logically irrelevant or contradictory documents. Cross-encoders evaluate the query and document together, capturing deeper interactions and drastically improving precision.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T16:45:39.971138+00:00— report_created — created