Skip to content

Prompt caching: prove reuse before changing your AI workflow

7 min read
AI Strategy
Prompt caching: prove reuse before changing your AI workflow

Key Takeaways

  • 1Choose a workflow with repeated, approved context before changing request construction
  • 2Confirm cache reads in provider usage data and account for cache writes separately
  • 3Compare cost per accepted answer and user waiting time while preserving quality
  • 4Keep policy selection, permissions and document updates under application control

Prompt caching can look attractive when your AI feature repeatedly sends the same company guidance, but rearranging requests without measuring the result gives you another configuration to maintain. The useful decision is whether a specific change improves the cost or responsiveness of a useful answer.

Our recommendation is to choose a workflow with genuinely repeated context, identify where reuse stops, and test a narrow change against acceptance criteria. Keep the model and task unchanged while you investigate. If you are still mapping the integration, start with the request structure in our practical guide to using AI through an API.

Identify what prompt caching actually reuses

Provider prompt caching reuses processing of an eligible input prefix: the unchanged beginning of a request. OpenAI’s prompt caching guide describes cached key-value states and a newly generated response, rather than a saved answer. That distinction determines what you should measure.

An application answer cache might return yesterday’s completed explanation without another generation. Prompt caching still asks the model to answer today’s question. Neither mechanism decides whether the employee may see a document or whether the document remains current; make those application checks explicit.

For an internal policy assistant, ask your technical owner to identify the material that recurs unchanged across eligible requests. A shared policy and approved examples might qualify. Personal case notes and live account information should follow their actual permissions and update requirements. Do not broaden access or freeze changing data to manufacture repetition.

If almost every request contains different source material, first investigate whether the application sends unnecessary context. A small reusable instruction block alone may offer too little benefit to justify an additional configuration.

Put the approved policy before the changing question

Consider a hypothetical assistant answering staff questions about travel expenses. The same approved policy supports different questions, but the application currently puts a request identifier and timestamp before it. This is a design example, not a measured deployment.

Sketch the candidate layout before editing the integration:

Stable instructions and approved tool definitions Current, authorised travel policy and its version Provider-specific cache boundary after reusable material Employee question and permitted current case information

Anthropic’s guide documents block-level cache_control markers and requires matching content through the selected boundary. OpenAI’s guide distinguishes model generations and supports explicit boundaries on newer models. Check the exact model, endpoint and minimum eligible prefix before implementing either pattern; the settings are not interchangeable.

For the OpenAI candidate, put reusable guidance in an initial developer message and confirm how your model treats top-level instructions. Do not assume this field behaves identically across models.

Move incidental metadata out of the reusable passage only when its position has no behavioural purpose. Preserve policy wording and the answer requirements during the comparison. If moving text changes the answer, you are testing a prompt redesign as well as caching and need to evaluate both effects.

Collect evidence from requests with different questions

Repeating an identical question immediately can demonstrate a favourable condition while telling you little about normal usage. For the travel assistant, include questions about different expense categories, realistic gaps between requests, and the tool configuration the application normally supplies. Include the first request after a policy update.

Capture the request layout version, policy version, model, relevant settings, input usage, output usage, cache reads, cache writes where reported, latency and acceptance result. Use identifiers rather than copying private prompts into a diagnostic log. Compare the original layout and candidate with the same representative question set, and retain unsuccessful attempts in the comparison.

For supported OpenAI Responses API models, prompt cache diagnostics can compare a request with a recent baseline using comparison_response_id. Read cached_tokens for reported reuse; a diagnostic cache_hit alone does not quantify it. The diagnostic comparison does not load the earlier conversation. Anthropic reports reads and creation separately as cache_read_input_tokens and cache_creation_input_tokens.

When reuse falls unexpectedly, inspect the constructed request before changing cache settings. A timestamp inserted early, a reordered tool list or a changed policy version gives the owner a concrete hypothesis. For example, compare the stable passage before and after the request builder runs, without logging its confidential contents. Fix the suspected difference and repeat the same comparison.

Price the whole task when cache reads appear

A successful read is a technical observation. To decide whether the change deserves rollout, calculate the cost of producing an accepted answer across the comparison period.

Both providers’ guides describe separate cache write and read pricing. Use the selected model’s current rates and applicable lifetime; do not import a discount from another model. Count ordinary input, cache writes, cache reads and output according to that provider’s usage definitions, then add retries and other task charges without counting tokens twice.

For the hypothetical assistant, a policy that changes before meaningful reuse may generate writes without enough subsequent reads. A frequently reused policy may still make little difference to the total if expensive generation or tool work dominates. These are hypotheses to check against your own usage, not forecasts of savings.

Compare user waiting time alongside cost. Faster input processing matters most when it improves the wait users actually experience. Keep the change only if its measured benefit warrants its maintenance burden.

Separate a busy spell from a quiet one in the review. A lunchtime burst of policy questions might support reuse while isolated requests do not. If your comparison covers only the burst, label that limitation and collect the missing usage pattern before extrapolating to a monthly budget.

Decide whether to ship, investigate or stop

Agree on acceptable answer quality and the benefit required before seeing the results. This decision table is our suggested review aid, not a provider benchmark.

What your comparison shows Decision for the technical owner
Reuse is reported, accepted answers remain reliable, and cost or waiting time improves enough Roll out the request change gradually and monitor the same measures.
Shared material exists but expected reads are absent Investigate boundaries, eligibility, settings and request differences before adding complexity.
Reads occur but writes, retries or output erase the benefit Keep the simpler design or address the larger cost driver.
The workflow rarely repeats eligible context Defer additional caching configuration and revisit when usage changes.
Answers use outdated policy or expose unauthorised material Stop the candidate rollout and correct application correctness before optimisation.

Treat a policy update as a correctness check

When finance replaces the travel policy, the application must select the newly approved version even if the previous passage produced excellent cache reuse. Never keep an obsolete rule merely to preserve a favourable metric. Route a policy update through the same approval and retrieval process as other content changes.

Before rollout, have the owner confirm:

  • The request contains the policy version the employee is entitled to use.
  • Tests cover changed rules, unrelated questions and requests that should be refused.
  • Usage records distinguish initial writes from later reuse where the provider exposes them.
  • Quality, cost and waiting time have been compared with the original layout.
  • The previous request construction can be restored if the candidate regresses.

Prompt caching earns its place through repeated useful work and an observable benefit. Pick a shared policy workflow, document its acceptance criteria, and ask the technical owner for that comparison before rollout. Then update your AI feature cost estimate with measured usage, keeping cache writes and reads visible.

Sources

Share this article

Need expert guidance?

Let's discuss how our experience can help solve your biggest challenges.