CimulinkEngineering field noteAll writing

A Cimulink field note / Following an AI bill

I helped a client cut agent LLM costs by 50%.
How far could caching take us?

A simple caching configuration change reduced the LLM cost of their conversation flow. I can’t share their data, so a separate chatbot demo follows two tests—and explains why a 90% input discount didn’t mean a 90% cheaper conversation.

Cimulink engineering lab31 October 2026~7 min read

I helped a client reduce the LLM cost of an agentic conversation flow by 50% with a simple caching configuration change. Why could that change make such a difference?

Start with what happens when someone asks a follow-up. An individual model call is stateless: the model needs the relevant earlier context supplied for that call. In a flow that sends the conversation history each time, the instructions, previous questions, and earlier answers become input again. Without caching, that repeated input has to be processed again at the ordinary input price.

Prompt caching, also called prefix caching, lets the provider reuse work already done on an eligible, unchanged beginning of the request. It preserves the model’s intermediate key-value (KV) state for that prefix. The model still has the context, but a cache hit avoids recomputing that part. New input and newly generated answers still require work. The provider’s prompt-caching guide ↗ explains the mechanism; its conversation-state guide ↗ covers how earlier context is supplied or managed.

I can’t share the client’s data, so I put together a separate support-chatbot demo with ten scripted questions. The customer asks whether an opened device can be returned, then follows up about identity checks, shipping, and damage reporting. The numbers below belong to this demo.

At the demo’s recorded prices, cached input was 90% cheaper than ordinary input. We initially thought that might make a 90% cut in the conversation’s LLM bill possible. We were wrong. To see why, start with the part that seemed easiest to reuse: the opening instructions and policy material.

01 / REUSE THE OPENING

The first test saved 22.3%. What was still being charged?

In test one, caching covered the fixed opening. I ran the same ten questions with and without that configuration, using the same limit on answer length.

The cached run cost 22.3% less overall. The generated answers differed in length, so this is the observed difference between two completed runs, including that variation.

USD per 1,000 equivalent requests · test 1, recorded pair
No.No cacheWith cacheCost change
1$0.380$0.3974.4% higher
2$0.319$0.22928.2% lower
3$0.394$0.31420.3% lower
4$0.388$0.30122.6% lower
5$0.379$0.25831.8% lower
6$0.427$0.37811.4% lower
7$0.496$0.39620.1% lower
8$0.525$0.37229.1% lower
9$0.348$0.24928.5% lower
10$0.536$0.36532.0% lower
Total$0.419$0.32622.3% lower

Each row scales one request to 1,000 equivalent copies. The combined row preserves the question mix and scales it to 1,000 requests. Percentages use unrounded costs.

Why wasn’t the saving closer to 90%? Only the opening received the cheaper read price. The earlier chat messages still entered later requests as ordinary input, and every generated answer had its own charge.

That suggested the next test: could we reuse the earlier conversation too?

02 / REUSE MORE OF THE CONVERSATION

Let the reusable part grow with each follow-up.

In test two, I allowed caching to extend beyond the opening. Earlier messages stayed unchanged, and each new question was added at the end. This gave the provider more repeated material to reuse.

Follow this second test in the chat below. Read the answer, then its receipt: input first, reused input next, and cost last. Watch how the cheaper portion grows.

The “no cache” price here is calculated for the exact same input and output tokens. That isolates the pricing difference; it is not a second measured run.

Recorded conversation / 10 callsRun 48cacc87

Watch the conversation. Follow the money.

Each reply gets a small receipt: input first, reuse next, then cost. Dollar amounts are scaled to 1,000 equivalent calls so the differences are easier to see.

THE CONVERSATION / CALL 1Return eligibility
Customer message
Writing a message…
Conversation so far · 0 calls
USD / 1,000 equivalent requests so far
With cache $0.000No cache* $0.000
Waiting for the first receipt
*No cache is a calculated comparison using identical input and output tokens, not a separate measured run. Scaling makes the recorded amounts readable; it is not a forecast for 1,000 real calls. Questions and shortened answers replay in sequence with illustrative timing. Later requests used fixed scripted prior replies rather than these displayed generated answers.
Token counts and costs per 1,000 equivalent requests

Token counts below are per recorded request; dollar columns scale each request’s cost to 1,000 equivalent requests. Recorded rate snapshot per million tokens: reads $0.01, writes $0.125, ordinary input $0.10, output $0.50. With-cache cost = read + write + ordinary input + output charges. No-cache comparison = all input at the ordinary rate + the identical output charge.

CallInputReadWriteOrdinaryOutputWith cache · $ / 1,000No cache* · $ / 1,000
12069020663373$0.445$0.393
2226320661943176$0.133$0.314
323492260863397$0.232$0.433
424322346833295$0.182$0.391
525162429843285$0.178$0.394
626042513883421$0.247$0.471
726862601823591$0.332$0.564
827702683843454$0.265$0.504
9295627671863110$0.106$0.351
10321929532633239$0.182$0.441

The later requests can show much larger savings than test one. They are reusing more information. Their percentages still vary because each request has a different mix of cached input, new input, writes, and generated output.

03 / ADD UP THE SECOND TEST

Broader reuse brought the calculated saving to 45.9%.

Here are the same requests you just watched. Each price is scaled to 1,000 equivalent copies of that request, so you can read the dollars without a string of leading zeros.

USD per 1,000 equivalent requests · test 2, calculated comparison
No.No cache*With cacheCost change
1$0.393$0.44513.1% higher
2$0.314$0.13357.6% lower
3$0.433$0.23246.4% lower
4$0.391$0.18253.5% lower
5$0.394$0.17854.9% lower
6$0.471$0.24747.6% lower
7$0.564$0.33241.1% lower
8$0.504$0.26547.5% lower
9$0.351$0.10669.7% lower
10$0.441$0.18258.7% lower
Total$0.426$0.23045.9% lower

*The no-cache column prices the recorded input at the ordinary rate and keeps the output charge identical. The combined row keeps the same mix of ten questions and scales it to 1,000 requests. Add the bills first to calculate the total saving; do not average the row percentages.

That is roughly 46%. It supports the idea that reusing more context can reduce more of the bill. It does not prove a production improvement from 22.3% to 45.9%: test one compared two generated runs; test two uses an identical-token calculation. The tests also had different answer limits.

Now the interesting question changes: with more successful reuse, could this same demo workload eventually reach 90%?

04 / WHAT WOULD THE MAXIMUM BE?

Where does the roughly 55% ceiling come from?

Before assuming more reuse could take us to 90%, we need to know how much of the original bill paid for input. Caching can reduce that part. It does not discount the generated answers.

Start with what test two actually used.

The provider reported the token counts below. To create the same no-cache baseline used in test two’s comparison, price all input at the ordinary rate and keep the recorded answers unchanged. These are the experiment’s saved prices.

Recorded tokens across ten requests. Costs scaled to 1,000 equivalent requests.
Part and rateRecorded tokensCost per 1,000 requests
Input
$0.10 / million
25,864$0.25864
Answers
$0.50 / million
3,341$0.16705
No-cache total$0.42569

For example, the input line is 25,864 tokens × $0.10 per million. We then multiply that ten-request cost by 100 to display it per 1,000 equivalent requests. The answer line uses the same calculation with its own token count and price.

Now divide the input charge by the total: $0.25864 ÷ $0.42569 = 60.76%. The remaining 39.24% pays for answers. This split comes from test two’s recorded tokens and prices. It is not a standard ratio for every chatbot, and it is not the split of the already-discounted bill.

Make that bill easier to picture: call it $100.

Using rounded shares, about $61 pays for input and $39 pays for answers. This rescales the same cost split; the experiment did not spend $100.

Our saved rates priced ordinary input at $0.10 per million tokens and cached reads at $0.01. A cached read therefore costs one-tenth as much. If every input token qualified, that $61 input charge would fall to about $6. The $39 answer charge would stay.

What are we assuming to reach that limit?

  • Every input token receives the cheap cache-read price, including tokens that were ordinary input or writes in the real run.
  • There are no cache-write charges to recover.
  • The input quantity, generated answers, and recorded prices stay unchanged.

These are ideal assumptions for a mathematical bound. Real conversations introduce new text and require writes, so we have not demonstrated that this limit can be reached.

Using the unrounded cost split, the calculation is 60.76% of the original bill × a 90% input discount ≈ 54.7% saved. That is the precise version of the rounded $100 example. In the actual run, ordinary input and cache writes still had charges, leaving the calculated saving at 45.9%.

Could another workload get close to 90%? Yes, if almost all of its original cost is reusable input and new input, writes, and generated answers contribute very little. Our roughly 55% ceiling belongs to this workload at these rates. It is not a universal limit for AI caching.

05 / WOULD MORE TRAFFIC HELP?

Scale helps when it creates more successful reuse.

More requests can spread an initial write cost over more reads. Shared instructions and policy material may be reused across many requests, while conversation-specific history is useful mainly to matching follow-ups.

But a thousand unrelated requests do not automatically share a reusable beginning. Changing earlier text or request settings can prevent a match. Cache availability and retention also matter. The provider’s prompt-caching guide ↗ explains these conditions.

Repeating the same traffic mix with the same reuse rate multiplies both bills; it does not improve the percentage saved. To lift that percentage, more of the original bill must qualify for the cheaper read price, or another charge must shrink.

For your own product, inspect four things: how much of the bill is input, how much input can stay identical, how often it is actually reused before another write is needed, and how much you spend generating answers. Add tool calls, retries, and other service costs if your budget includes them. Charges untouched by caching reduce its share of the saving.

06 / YOUR NEXT COST REVIEW

Find the ceiling before chasing the discount.

The first test showed what a narrow caching configuration saved. The second showed how broader reuse changed the calculation. The ceiling explained why neither result had to reach the headline discount.

Ask your team to price one representative completed task, show the input-and-output split, and estimate how much can genuinely be reused. Then measure the proposed change on matched tasks with equal answer limits and a review of answer quality. Use repeated representative cases before taking a saving into your budget.

Method, calculations, and sources

The opening client result describes separate work; client data and billing records are not included here. The public demo uses local experiments with scripted questions and policy fixtures, recorded on 19 October 2026 with GPT-6 Luna through the Responses API. Demo costs are derived from provider-reported usage and that date’s rate snapshot, not invoice totals or customer savings. Each model call is one request. Scaling to 1,000 equivalent requests makes the amounts readable; it is not a traffic forecast.

Test one: one completed ten-call run per mode, with a shared 500-token answer cap. No-cache run 56a906bf cost $0.004193400; fixed-opening cache run 1a469ec1 cost $0.003259695. The 22.3% difference includes generated-answer variation. Some of the saving came from the cached run producing less output.

Test two: growing-cache run 48cacc87 used a 1,000-token answer cap. Its 25,864 input tokens included 22,618 cache reads, 3,216 writes, and 30 ordinary input tokens; output was 3,341 tokens. At the recorded rates per million tokens (ordinary input $0.10, read $0.01, write $0.125, output $0.50), its cost was $0.002301680. Pricing all the same input at the ordinary rate while keeping output identical gives $0.004256900. The reduction is 45.9%.

The 54.7% ideal ceiling assumes all 25,864 input tokens cost $0.01 per million, with no write charges and unchanged output. That gives $0.001929140, compared with the same $0.004256900 baseline. The displayed formula uses a rounded input share; percentages are calculated before rounding.

The chat replays shortened recorded answers with illustrative timing. Later requests used fixed scripted prior replies, rather than the displayed generated answers. These short experiments do not establish typical production savings or prove answer quality.

The broader project repository ↗ is public; the runner and saved ledger for these cost tests remain local, so that link does not yet reproduce them. Provider references: pricing ↗, prompt caching ↗, and conversation state ↗. Historical calculations retain the run’s rates; check current model terms before budgeting.

Congratulations.

~7 min read
When you arrivedNow

You can now estimate how much of an AI bill caching can actually reduce.