Overhyped AI Gateway Features Part 1: Semantic Caching An analysis of 15,000 prompts from 2,500 Codex sessions found that semantic caching in AI gateways produced only false-positive cache hits, according to a post from the AI/LLM Gateway project AgentGateway. Checking each prompt against a 0.90 to 0.99 similarity threshold yielded a 5-17% hit rate, but every hit was a false positive, with examples like "wdyt," "fix it," and "keep going" all depending on prior context; caching only the first prompt of a session yielded an 8-20% hit rate, and those hits were also harmful because identical prompts targeted different repositories or repeated intentionally. The post argues semantic caching breaks down on context-specific requests, multi-turn agentic conversations, and near-miss queries such as "Convert 100 USD to EUR" versus "Convert 100 EUR to USD," and warns of false sharing that could expose one user's results to another. This is part one of a series. Overhyped AI Gateway Features Part 1: Semantic Caching this post - Overhyped AI Gateway Features Part 2: Prompt Compression coming soon - Overhyped AI Gateway Features Part 3: coming soon Over the past few years of working on an AI/LLM Gateway https://agentgateway.dev/ , I've seen a lot of features go through the hype cycle, treated as magic silver-bullets to cut costs or improve performance, pared with benchmarks that are either outright fabricated, hallucinated, or excessively cherry-picked. In this series I wanted to cover some of the most overhyped features in the space, what they promise, what they deliver, and where the fall short. The pitch the-pitch First up is semantic caching. Unlike traditional caching, which relies on an exact match of data, semantic caching attempts to cache results for similar queries. For example, "What is the capital of France?" and "Which city is the capital of France?" are semantically similar queries, and a semantic cache could return the cached "Paris" result for both. The benefit here is clear - a cached result is ~free, both in latency and cost. Back when we were first looking into semantic caching in ~2023, we gave a killer demo showing theoretical million-dollar savings just caching similar "Hello" requests. Unfortunately, the real-world falls short. Where it breaks down where-it-breaks-down While in theory this is great, in practice there are severe limitations in most cases. Context: in most real LLM usages, the model is provided context that is specific to the current query. For example, the logged in user, the date, the working directory, or other session-specific information. This inherently limits the effectiveness of semantic caching hopefully see False sharing below . Agentic requests: when using "agents" in this case, simply meaning multi-turn requests , semantic caching essentially cannot work. Either you use the entire conversation as the cache key incredibly unlikely to have multiple turns and LLM responses repeated or you look only at the last message which loses all of the real semantic context . Similar is not the same as identical: subtle differences that are obvious to humans may be missed by semantic similarity algorithms, leading to incorrect cache hits. For example, Convert 100 USD to EUR and Convert 100 EUR to USD have completely different meanings, but are likely to trigger a semantic cache hit. False sharing: can occur if caching doesn't take into account user context. For example, if two different users make similar queries, a semantic cache might return one user's result to the other, potentially exposing sensitive information from their conversation. Real world data real-world-data To put this to the test, I analyzed 15,000 prompts from 2,500 Codex sessions analyzing which prompts could be a cache hit had they run through a semantic caching engine. I took a few different approaches on what was actually considered for the cache lookup. I ran across a .90 and .99 similarity threshold. Each prompt just looking at the most recent prompt : 5-17% hit rate. Sounds great, right? Wrong Every hit was a false positive. Common examples include "wdyt", "fix it", "keep going", and "review the local change" -- none of these can be correctly cached as they all depend on prior context. Just the first prompt of a session : 8-20% hit rate. Unlike checking each prompt, which has obvious missing context from prior messages, just caching the first prompt seems intuitively more likely to succeed albeit at minimal cost savings . However, again all cache hits would have been harmful. Many prompts were identical, but to different repos, or intentionally repeating the same prompt "Ralph Loop" . Close matches like "fix issue 1234" and "fix issue 1243" are semantically close but completely different in reality. The case where true hits were plausible was 'hello' prompts - but these were all me testing connectivity/model availability/etc where a cache hit would obscure the result. Caching the entire prompt ignoring system prompts and model responses : considering the SAME conversation the hit rate is 16-68%. This is extremely high and for a good reason: