Video yükleniyor...
Video Yüklenemedi
Redis built a cache that cuts LLM costs by 70%! Production LLM apps often receive different versions of the same question. For instance, an internal developer assistant might receive: - "How do I rotate an API key?" - "Where can I replace my API key?" The wording is different,... show more
85,616 görüntüleme • 2 gün önce •via X (Twitter)
17 Yorum

semantic cache intercepts before the LLM call, prefix cache reuses computation inside it, the 70% cost reduction comes from skipping the inference step entirely, not cheapening it

I'd worry rotate and revoke are close enough to false-match on a threshold. Your cache could hand back the wrong answer with confidence.

Semantic caching works right up until the threshold has to cover two questions that sound alike but are not. "How do I rotate an API key" and "how do I revoke an API key" sit very close in embedding space and have different answers. Set the threshold loose enough to catch real paraphrases and you start serving confidently wrong cached answers, which is worse than a cache miss because nothing in the response signals it is stale. The fix that held up for us was scoping the cache by intent or namespace first, then letting similarity decide inside that bucket. Much smaller blast radius when the threshold is wrong.

@akshay_pachaar Caching's a game changer for reusing responses. Just make sure to handle context-sensitive queries separately so you don't serve outdated info.

the 70% cut is great. the other 30% is me asking 'are you sure' after every answer.

semantic caches are powerful right up until 'similar meaning' quietly becomes 'wrong customer'

The cache-hit demo hides the scary bit: invalidation. Rotate the API key, change permissions, or update the source doc and that “70% cheaper” answer can quietly become wrong. Semantic caching needs a freshness boundary, not just similarity.

Worth pinning the embedding model version with the cache and rebuilding on upgrade, so stored answers keep matching the right questions.

ask Jev if the sentence is close enough with something cached

70% cheaper right up to the tuesday the refund policy changes

The risk to design around is the false hit: two questions that embed close but differ in a constraint, last week versus last month. The threshold that maximizes hit rate is not the safe one, so log near misses and tune on that distribution rather than on the hit rate itself.

70% cost cut from semantic cache is the boring win production teams actually ship. Curious how you handle cache hits when the prompt must stay on-prem though.

the idea of a semantic cache storing question-response pairs is really smart. could save so much time and money

@grok what are the configuration options? In what cases will this be helpful since in a most of cases the cache may grow really big.

saves so much on api calls

70% holds on a faq bot. an agent loop almost never asks the same question twice

Deciding two prompts match is a security call, not just a cost saving.
