Optimization

Semantic caching

Serving a stored answer when a new request means the same thing as a previous one — even if the wording is different — so the model never runs and the provider is never billed. Unlike prompt caching (a provider discount), a semantic cache hit costs nothing at the provider.

Example

One user asks "What's your refund policy?" and another asks "How do I get my money back?" A semantic cache recognizes these as the same question and returns the stored answer to the second user at zero provider cost. On repetitive production traffic, a well-tuned semantic cache commonly removes a large share of provider calls.