---
title: "Comment by Kartik N V J K on \"Semantic Caching in Production: What Breaks When Cosine Similarity Isn't Enough\n\" | Hashnode"
description: "The 0.88-0.93 cosine between \"cancel my subscription\" and \"reactivate my subscription\" is a perfect example of why raw similarity is a blunt cache key: opposite"
url: "https://hashnode.com/posts/semantic-caching-in-production-what-breaks-when-cosine-similarity-isn-t-enough/6a70534568d5fc66a416ca64/comment/6a70eefb376a4ec4ee8a5d46"
---

[Discussion](https://hashnode.com/posts/semantic-caching-in-production-what-breaks-when-cosine-similarity-isn-t-enough/6a70534568d5fc66a416ca64)

Comment [Semantic Caching in Production: What Breaks When Cosine Similarity Isn't Enough](https://hashnode.com/posts/semantic-caching-in-production-what-breaks-when-cosine-similarity-isn-t-enough/6a70534568d5fc66a416ca64)

[Kartik N V J K](https://hashnode.com/@kartik-nvj)

[Aug 3](https://hashnode.com/posts/semantic-caching-in-production-what-breaks-when-cosine-similarity-isn-t-enough/6a70534568d5fc66a416ca64/comment/6a70eefb376a4ec4ee8a5d46)

The 0.88-0.93 cosine between "cancel my subscription" and "reactivate my subscription" is a perfect example of why raw similarity is a blunt cache key: opposite intent, near-identical vector. Two-stage retrieval with a cross-encoder is what fixed the same false-hit problem for me. The staleness half is harder though: how are you invalidating a cached answer when the underlying source changes but the query text stays identical?
