Glossary

Semantic Caching

Semantic caching serves a stored response to a request that means the same thing as an earlier one, matching on meaning rather than on an exact string.

Semantic caching serves a stored response to a request that means the same thing as an earlier one, rather than only to a request that is character-for-character identical. Each incoming prompt is converted to an embedding — a numeric vector representing its meaning — and compared against the vectors of cached prompts, usually by cosine similarity. Above a configured similarity threshold, the cached response is returned and no model call is made.

The economics are the reason it exists. Enterprise AI traffic is far more repetitive than it looks: the same policy question, the same summary of the same document, the same lookup, phrased a hundred ways by a hundred people. Exact-match caching catches almost none of it. Semantic matching catches the repetition that natural language hides.

How it differs from a traditional cache. A conventional cache keys on an exact string. It is deterministic and safe, and on natural-language traffic it almost never hits. A semantic cache keys on meaning, which means the threshold is now a real decision: too loose and it answers a question nobody asked, too tight and it behaves like an exact-match cache. The threshold is a governance setting, not a tuning detail.

How it differs from fine-tuning or RAG. Both change what the model knows. A cache changes whether the model is called at all. They are complementary, and the cache is the only one of the three that reduces spend directly.

Smartflow's MetaCache is a four-phase semantic caching engine using BERT-based similarity matching. Hit rates and token savings are workload-dependent.

AI cost optimization

Ready to govern your AI infrastructure?

See how Smartflow gives regulated industries complete AI sovereignty.

Request a Demo View Documentation