Interactive online edition: Open the article with region zoom controls.
Why pay more for AI calls, and why pay before the user asks?
Optimize the cache; put Human-AI estimates behind Calculate so the model comes first.
Synopsis
In our JarviSIM process optimization product, a user reused the same document from their library to build a process model, and we were billed for AI work every time. The cache was on and configured correctly. We analyzed the problem and found two causes: (1) unintended gold-plating inserted by AI agents: four identifiers in the request that nobody had asked for, so the cache never matched; and (2) a Human-AI estimate that ran inside every BPMN model build, so the user paid for it and waited for it whether they wanted it or not.
Two fixes, two savings. We removed the identifiers, and the cache now answers a reused document. We moved the Human-AI estimate behind a Calculate button: the user gets the finished BPMN model first and decides when, and whether, to spend on the Human-AI estimate. We show how our jSwarm AI devops methods and tools found and fixed both, how /jRightSize prevents gold-plating and over-assurance that nobody asked for, and how a UX decision can cut cost and latency at the same time. JarviSIM is the product that supplies the real example.
Audience: AI Solution Product Managers · CIOs and CTOs · AI Developers
The business story
JarviSIM turns a written procedure into a process model. Users keep their documents in a library and reuse them: the same purchasing procedure, built again later the same day in a new session. The AI work is the same, so the answer should come from the cache and the bill should be close to nothing. It was not. Every reuse was billed as if it were new, and the largest single cost was a Human-AI estimate that ran inside every BPMN model build, so the user paid for it and waited for it whether or not they wanted it. Paying again for the same AI work looks like pennies in a demo and becomes the budget in production.
COST · IN FOCUS · PRODUCT RUNTIME
Two ways to spend less
Before: every reuse of a document paid for two things again. The BPMN model build missed the cache every time, about $0.14 a run. A Human-AI estimate ran inside every build, wanted or not, about $0.19 a run. Together that is $0.33 a run, or about $396,000 a year at our modeled volume.
SPEED · IN FOCUS · PRODUCT RUNTIME
The model first, in under a minute
Before: after pressing Build, the user waited about 6 minutes for the finished model. That was about 5 minutes (304 s) for a BPMN model build that missed the cache on every AI request, plus about 1 more minute for a Human-AI estimate they had not asked for (best guess).
QUALITY · HELD CONSTANT
Same information, before and after
The user gets the same BPMN model, and the same Human-AI estimate when they ask for it, before and after the changes. Testing required quality to stay the same, so this case study measures only two non-functional requirements (NFRs): cost and speed.
Terms used in this article
| Term | What it means here |
|---|---|
| BPMN model build | The JarviSIM capability that turns the user's document into a BPMN process model, including the correction pass and the follow-on AI steps that take the model as input. |
| Human-AI estimate | The JarviSIM capability that estimates the human effort and AI tokens the modeled process would take, shown as Process Metrics on the revision card. |
| Cause1/Cache · Cause2/Estimate | Shorthand for the two causes of the bill. Cause 1 (cache miss): four identifiers made every BPMN model build request new, so the cache missed. Cause 2 (forced Human-AI estimate): the Human-AI estimate ran inside every BPMN model build, whether the user wanted it or not. |
more terms
| Term | What it means here |
|---|---|
| Cache | A store of recent AI requests and their answers, reused instead of running the model again. This article has two layers of it. Our AI gateway's response cache answers an exact repeat of a request (same model, same instructions, same content) for free. The AI provider's prompt cache reuses the unchanged beginning of a request at a low rate, even when the rest of the request is new. |
| Cache hit | A request the cache could reuse. At our gateway: an exact repeat of a stored request, answered without a new model run. At the provider: a request whose beginning matches a stored one; that beginning is billed at the low rate and the rest runs normally. |
| Test run | One reuse of the same library document: the user sends it to a BPMN model build, and the product does everything that follows. The before figures come from six test runs. |
| On-demand calculation | The Calculate button on the revision card runs the Human-AI estimate only when the user presses calculate, not automatically after every BPMN model build. |
| jSwarm · JarviSIM | jSwarm is our method: the loop, principles, practices, skills and scripts. JarviSIM is our product. It supplies the real development example in this article. |
| BPMN | Business Process Model and Notation: a standard way to draw a process diagram. |
| LLM | Large language model: the AI model that reads and generates text. |
| Schema · nonce · request-local handles | A schema defines the required data shape; a nonce is a one-time value; request-local handles are short names valid only inside one request. |
| Billed call | A request that did not match, so the model ran and we paid for it. |
| AI gateway | A proxy we run in front of the AI provider. It records every request and its spend, and keeps the response cache. |
| GWT | Given/When/Then acceptance scenario. |
| NFR (non-functional requirement) | A written rule about how the product must behave, such as "repeated builds reuse the cache". Part of what we call intent. |
| Given/When/Then scenario | An acceptance test written in the architect's own words: the starting state, the action, and what must be true afterwards. |
| Agent Acceptance Test | A walk through the real product by an AI agent, judged against the Given/When/Then scenario. |
| jQATester | The agent that walks the product like a user and judges each step against the acceptance scenario. |
/jRightSize | Our jSwarm skill that controls gold-plating and over-assurance. It asks of every added mechanism what outcome or failure warrants it, and what smaller alternative works. |
| Modeled volume | Our stated assumption for scale figures: 1,000 users × 10 documents × 10 reuses a month × 12 months = 1,200,000 document reuses a year; 80% of reuses hit the cache within one day (assumed); the user presses calculate after 50% of reuses, because some users do not care about the process's Human-AI estimate (assumed). Ours, not a JarviSIM forecast. |
| jTestEngineer | The agent that designs and runs measured tests, such as the rebuild measurement in this article. |
Part I · Introduction
Two causes, one expensive miss.
We are taking a multi-prong approach to solving the problem: LLM cache optimization techniques, as well as UX trade-off - creating calculation button instead of doing it automatically, incurring the AI cost when the user wants the information. LLM cache optimization is important, but cannot solve everything.
Those are the (human) architect's words. This is a real JarviSIM development example, used to illustrate jSwarm principles, practices, skills and scripts. The before figures come from our AI gateway's records of six test runs, each reusing the same library document before the fix; the after figures come from measured rebuilds of that same document after it.
- Part I · IntroductionThe two JarviSIM screens this case study uses, the two causes, and how they combined into one expensive miss.
- Part II · Cache conceptsThe two cache layers and their three prices, which kind of repeat each layer fits, how each cause meets the cache, how six test runs add up to a bill, and what we assume about cache hits.
- Part III · BeforeCost and speed before the changes, and each cause in detail.
- Part IV · AfterCost and speed after the changes, the same measures side by side, and what it saves at our modeled volume.
The two JarviSIM screens in this case study
The Document Repository: where a document is reused. The library keeps uploaded source files so they can be reused across processes. The user picks the same purchasing procedure they built from before and sends it to a BPMN model build, with no new upload. Same document, same intent: the AI work should be the same as last time.
Nothing on this screen shows Cause1/Cache. The reuse looks free; only the AI bill showed otherwise.
The revision card: where the Human-AI estimate appears. After a BPMN model build, the revision card shows Process Metrics: the human time and AI tokens the modeled process would take. Before the change, the product filled these in automatically, inside the BPMN model build.

The two causes
- Cause 1 (cache miss), Cause1/Cache for short: four identifiers, so the cache never matched. The BPMN model build request carried four identifiers that changed every session. Nobody had asked for them. Each reuse therefore looked like a new request, and the cache could not answer it.
- Cause 2 (forced Human-AI estimate), Cause2/Estimate for short: the Human-AI estimate inside every BPMN model build. The Human-AI estimate ran inside every BPMN model build, whether or not the user wanted it, and the user waited for it before seeing the model.
They call for two different kinds of fix. A cache hit makes repeated work free: the request is the same as before, so a stored answer is returned, and the user sees nothing different except speed. A UX improvement changes when work runs: work the user does not ask for never runs, and that saves money even when the work would have been new. Cause1/Cache needs a cache fix. Cause2/Estimate needs a UX fix, because a cache can only answer work it has seen before, and a Human-AI estimate of a model the user has just edited is new work.
In the cost tables and charts of Parts III and IV, one color marks Cause1/Cache and another marks Cause2/Estimate, so each saving can be traced back to its cause.
Part II
Cache concepts.
The cache was switched on and configured correctly, yet a reused document was billed almost as if it were new. To see why, it helps to know that our AI requests pass through two caches, that each answers a different kind of repeat, and that the two causes meet them in different ways.
What a cache does here. Our AI requests pass through two caches before any model runs.
- Layer 1: our AI gateway, a proxy we run in front of the AI provider, keeps a response cache. When a request is an exact repeat of a recent one (same model, same instructions, same content), it is answered from the stored answer, with no new request to the provider and no token charge. Free means no new provider request and no token charge; running the gateway still uses some resources, but that is negligible compared to AI LLM costs.
- Layer 2: the AI provider's own prompt cache. When a request is new but its beginning is unchanged from a recent one, the provider reuses that beginning and bills it at a low rate, up to a 95% discount from the normal input price. The rest of the request is billed at the normal input price, and the answer at the output price.
So a request that misses at both layers runs in full at the high price. To simplify, we represent this as free, low and high.
More: Which cache fits which kind of repeat
The two layers are not a better and a worse version of the same thing. Each fits a different shape of repeat, and a good design matches each AI step to the layer its repeats fit.
| Kind of work | How it repeats | Layer that fits | Why |
|---|---|---|---|
| Chatbot conversation | Every turn resends the whole transcript plus one new message, seconds to minutes apart | Provider prompt cache | The history is an unchanged beginning, billed at the low rate; only the new message and the answer pay in full. No two turns are exact repeats, so the gateway never hits. |
| Many steps inside one task | The same instructions and tools are sent many times within seconds | Provider prompt cache | The shared instructions are reused every time; each step's own content is new. |
| Same document, same intent, rebuilt later the same day (our case) | The exact same request, hours apart, and the right answer has not changed | Gateway response cache | The whole answer is reused for free for a day. A 30-minute window would usually expire before the user comes back. |
| "Latest news", today's prices, a live calendar | The same request, but the right answer changes over time | Neither, for the answer | A stored answer would be stale. The fixed instructions can still use the provider's low rate. |
| "Try again": the user wants a different attempt | The same request, but the user asks for a new answer | Must skip the gateway cache | Serving the stored answer would ignore the request. That is the one place a "fresh draw" marker belongs. |
| A one-time request | Never repeats | Neither | Writing a provider prefix costs about 1.25 times normal input on current models and is never read back. |
Why our case fits the gateway cache. A BPMN model build reads a library document that does not change, for an intent that does not change, and nothing it depends on changes during the day. So the right answer for a repeat is the stored answer, and serving it is also more consistent: the same document gives the same model. That makes the gateway's free, one-day, whole-answer reuse the layer to design for. The provider's cache is the complement inside a run, where many requests share the same instructions; that is where the 1 in 8 discounted prompt tokens in Part III came from. For the gateway layer to work, the request must contain everything that should change the answer (model, instructions, document, intent) and nothing that should not, such as a session identifier. That is exactly what Cause1/Cache broke.
How each cause meets the cache
Cause1/Cache. A cache answers a request only if it matches a stored one. An identifier that changes every session makes every BPMN model build request different, so it misses the free layer; and because the identifiers sat inside the request, the low layer could reuse only the part before the first one. Worse, every step after the first BPMN model build request takes its answer as input. Once that request is new, everything after it is new too, so one stray identifier makes a whole chain of requests miss.
Cause2/Estimate. The Human-AI estimate takes the built model as its input. Before the fix it missed because the BPMN model build missed (Cause1/Cache). With Cause1/Cache fixed, the Human-AI estimate of an unchanged model can be answered by the cache, but once the user edits the model, the Human-AI estimate is new work that no cache has seen. The cache cannot remove that cost; only not running the Human-AI estimate until the user asks for it can.
How six test runs add up to a bill
Every test run reused the same document, so every run asked for the same AI work and was billed about the same. Add the six runs together and you get the billed total our gateway recorded. Divide that total among the six runs and you get the cost of one average run. Part III shows both: the billed total of six runs, and one run as the total's sixth share, so that six times one run comes back to the total. A run is not a cache hit: before the fix, every run missed the cache and paid in full, which is exactly why the six runs cost six times one.
Not every request hits the cache
Even with the design fixed, our gateway's response cache answers only a request it has seen recently. A user can come back to the same session hours or days later and ask for another AI operation on earlier AI output; by then the stored answer may be gone, and that request pays full price again. A single miss costs cents, which is why cost is easy to ignore in a demo and hard to ignore in production: many AI demos never become economically feasible in production because they are priced per request, and nobody counted the requests. So the after state needs a volume and assumptions about how often the cache answers. We use these, each labeled:
- Volume: 1,000 users each reuse 10 documents 10 times a month: 1.2 million runs a year (modeled).
- 80% of runs repeat an identical request within one day and are answered free by our AI gateway's response cache (assumed, one-day cache life). The rest miss and pay full price.
- 50% of runs are followed by a calculate press (assumed). The other 50% have no press: the user does not need the process's Human-AI estimate on that occasion. We assume the same press rate in cached and uncached runs.
- A calculate press after a BPMN model build the cache answered is answered too, because we assume a previous identical calculation is already present in the warm cache (assumed). A press after a BPMN model build that missed pays full price.
Part III · Before
What one run cost, and why.
No product screen shows cache hits or dollars, so the cost figures come from our AI gateway's spend records for the six test runs. Here is every stage, grouped by cause.
Cost and speed, before the changes
Cause1/Cache, four identifiersCause2/Estimate, forced Human-AI estimategrey = not affected by either cause
| Stage | Cause | Billed calls, 6 test runs | Free-cache hits (AI gateway), 6 test runs | Billed $, 6 test runs | One run (billed ÷ 6) |
|---|---|---|---|---|---|
| User document extraction | — | 5 | 38 | $0.00 | $0.00 |
| BPMN model build: synthesis | 1 | 11 | 0 | $0.07 | |
| BPMN model build: document evidence ledger | 1 | 6 | 0 | $0.00 | |
| BPMN model build: correction pass | 1 | 3 | 0 | $0.69 | |
| BPMN model build: other (model-revision advice, chat and enrichment) | 1 | 9 | 0 | $0.09 | |
| Cause1/Cache: BPMN model build | 1 | 29 | 0 | $0.86 | $0.14 |
| Human-AI estimate: human effort | 2 | 13 | 0 | $0.92 | |
| Human-AI estimate: AI tokens | 2 | 15 | 0 | $0.19 | |
| Cause2/Estimate: Human-AI estimate | 2 | 28 | 0 | $1.11 | $0.19 |
| Total | 62 | 38 | $1.97 | $0.33 |
The math, one run × 6 test runs ≈ billed
| Group | One run | × 6 test runs | Billed |
|---|---|---|---|
| Cause1/Cache: BPMN model build | $0.14 | 6 × $0.14 | ≈ $0.86 |
| Cause2/Estimate: Human-AI estimate | $0.19 | 6 × $0.19 | ≈ $1.11 |
| Total | $0.33 | 6 × $0.33 | ≈ $1.97 |
One run is rounded to the cent, so six times it lands within a few cents of the recorded billed amount (for example, 6 × $0.19 = $1.14 against $1.11 billed). Stage rows are rounded to the cent; subtotals and the total are the recorded values. The Human-AI estimate ran more than once in some runs, so $0.19 is an average per run, not the price of one Human-AI estimate.
One average run cost $0.33: $0.14 for Cause1/Cache in the BPMN model build plus $0.19 for Cause2/Estimate.
Speed, from the user's point of view: Build pressed → finished model shown
| Before the changes | Wait |
|---|---|
| BPMN model build, every request missing the cache (Cause1/Cache) | about 5 minutes (304 s), measured |
| Human-AI estimate inside the BPMN model build (Cause2/Estimate) | about 1 more minute, best guess |
| Total wait | about 6 minutes |
Read against the cache concepts in Part II, four things stand out:
- The free cache worked for document extraction. The stages that read the document did not change between reuses, so they hit the free layer 38 times.
- The BPMN model build missed the free cache, and everything after it missed too. Cause1/Cache: the BPMN model build request carried four identifiers that changed every session. Every later step takes the model as its input, so once the request differed, nothing after it could hit: 0 hits in every Cause1/Cache and Cause2/Estimate row.
- The provider's prompt cache took a little off the bill. About 1 in 8 prompt tokens were read from the provider's cache at the low rate. They came from requests inside a run that share the same instructions, the kind of repeat that cache fits (Part II). That discount is already inside the billed dollars above; the free-cache hits column counts only our gateway's cache.
- The largest single cost was the Human-AI estimate. Cause2/Estimate: it ran inside every BPMN model build, whether or not the user wanted it: $0.19 of every $0.33.
Cause1/Cache: four identifiers nobody asked for
We compared two BPMN model build requests for the same document from two sessions, byte by byte. The instructions to the model, its tools, options and output format were identical. Every difference was an identifier that nobody had asked for:
- A per-session value mixed into the task and lane identifiers.
- The session's source-artifact identifier, copied into 24 lineage references.
- The BPMN model build job identifier, which included the session identifier.
- A one-time “fresh draw” (another model attempt) marker on the first attempt of the evidence ledger.
Mask those four, and the two requests are identical. The identifiers were accidental, so this is a defect, not a trade-off.
Cause2/Estimate: inside every BPMN model build
The other half of the bill was a design choice. Inside the same BPMN model build, the product automatically ran the Human-AI estimate of the modeled process, and the BPMN model build waited for it before it was done. That is useful when the user wants it and expensive when they do not: it was the largest single cost, $0.19 of the $0.33 per run. This was a deliberate design choice, not unintended gold-plating. Part IV shows the UX improvement that changed it.
More: how we found them, and how each became a defect
We decrypted the two requests and compared every field. The system prompt, tools, options, schema and message count were identical. Every difference sat in the user message. Each identifier was recorded as its own cost defect under a written non-functional requirement: repeated builds reuse the cache unless there is a good reason not to. The requirement and its acceptance scenario are the worked example in Article 02. The fix removed each identifier from the request bytes rather than moving it elsewhere.
/jRightSize and /jFix: our skills, methods & tools preventing and removing gold-plating and over-assurance. Nobody asked for the four identifiers, which is what we mean by gold plating / over-assurance. Each addition felt reasonable to the human or AI agent adding it, but nobody weighed it against what the user needed.
Two jSwarm skills now do that weighing. /jRightSize decides how much to build. It asks of every added mechanism what outcome or failure warrants it, and what smaller alternative would do.
/jFix does the work to build/improve the feature. It diagnoses the problem, then checks GWT and NFR catalogs for intended product behavior. It writes a contract for the fix, makes the repair and proves it. The two work together: every /jFix contract carries a "necessity" section written with the /jRightSize method, and the contract check refuses a contract whose section is incomplete.
The Calculate button was a UX improvement delivered through /jFix: the acceptance scenario came first, then the change, then the judged walk in Part IV.
So now, the question “who asked for this?” is answered before the code is written, not after the bill arrives. Article 09 (coming) gives /jRightSize its worked example.
More: where /jRightSize acts in the jSwarm cycle
- In the fix cycle. The
/jFixcontract template has a necessity section bound to the/jRightSizemethod. The contract check runs before any reviewer sees the contract, and fails it when that section is missing or incomplete. - At check-in. The orchestrator's three-hourly review runs one necessity pass over the in-flight items. It records keep, narrow or cut, with one concrete cut or keep per flagged item.
- In a commander's lane. The commander runs the method at each slice's contract point, and again whenever a change reaches its second repair or review round. It reuses the existing record rather than adding a gate.
- Six questions it asks of any addition:
- What wrong behavior would defeat it?
- Which real caller uses the result?
- Would a do-nothing version still pass?
- Can the outcome be stated without naming the machinery?
- Does it test the rule, or freeze today's shape?
- Do its edits, false alarms and upkeep outweigh the protection?
Part IV · After
Identical requests, and a Human-AI estimate on request.
Two fixes, one for each cause. Cause1/Cache: with the four identifiers gone, the rebuilt request is identical, so our gateway answers it. Cause2/Estimate: the one long task is split in two, so the user gets the finished BPMN model first, and the Human-AI estimate runs only when they press Calculate.
Cause1/Cache fixed: identical requests
We removed each identifier from the request. The BPMN model build completes with four lanes and ten tasks from the one reused document.
Measured run after the fix: two rebuilds of the same document
Gateway cache hits
26 of 26Before: noneBilled for the BPMN model build
$0.00Before: $0.14 a runMeasured by jTestEngineer in the development environment: the same document rebuilt twice, 13 requests each time, all answered at the first layer, our gateway. The requests never reached the provider, so there was nothing to bill.
This is a run the cache answers. Not every run will be: Part IV assumes the cache answers 80% of runs, and the other 20% pay the full $0.14. Averaged with the Calculate presses, that comes to $0.05 a run.
Cause2/Estimate fixed: a Calculate button
Before the change, the Human-AI estimate ran inside the same BPMN model build, and the BPMN model build waited for it before it was done. The architect made a product decision, not a caching one: deliver the finished model first, show Not calculated, and let the user press Calculate when they want the Human-AI estimate. A Human-AI estimate of a model the user has changed is a new request by design; caching alone cannot remove that work.

Spend tokens and latency on primary outcome first. Let users ask for the extra features.
When the user presses calculate, the revision card is marked AMENDED and the action shows a check. The metrics now read Human time 134 min · AI tokens 53.4k, the product's displayed Human-AI estimate for the modeled process. The canvas is unchanged: nothing was rebuilt to answer the question.
More: how we develop and test the UX change
Why this picture: the acceptance scenario for the change was written first, in the architect's own words, and an agent walk then judged the product against it. The capture below is from that walk on an earlier build.
The same rule at task level (an earlier build). This capture was taken during an Agent Acceptance Test walk run by jQATester. It shows the same rule for each task: AI token estimate: Not assessed and Human effort estimate: Not estimated, each telling the user to press calculate. The dark strip at the top is the test-harness overlay that drives and judges the walk. It is not part of the product.
The acceptance scenario for this behavior was written in the architect's own words first: the Human-AI estimate runs only when the user presses calculate, and until then the affected tasks show that metrics are not yet calculated instead of stale values. That sentence became the test. jQATester judged each step of the walk above against it.
Cost and speed, after the changes
The same measures as Part III, side by side. Before is one measured average run; after applies the Part II assumptions to it: the cache answers 80% of runs, and the Human-AI estimate runs on 50% of runs.
Cause1/Cache, four identifiersCause2/Estimate, forced Human-AI estimategrey = not affected by either cause
| Group | Cause | Free-cache hits (AI gateway), before | Free-cache hits (AI gateway), after | One run, before | One run, after | How the after figure is worked out |
|---|---|---|---|---|---|---|
| User document extraction | — | hit | hit | $0.00 | $0.00 | Unchanged. |
| BPMN model build | 1 | none | 26 of 26 measured; 80% of runs assumed | $0.14 | $0.03 | The cache misses 20% of runs: 20% × $0.14. |
| Human-AI estimate | 2 | none | 80% of presses assumed | $0.19 | $0.02 | Runs on 50% of runs, and the cache misses 20% of those: 50% × 20% × $0.19. |
| Total | $0.33 | $0.05 |
Speed, from the user's point of view: Build pressed → finished model shown
| Stage | Before | After |
|---|---|---|
| BPMN model build (Cause1/Cache) | about 5 minutes (304 s), every request missing the cache, measured | about 47 s, with the cache on, measured |
| Human-AI estimate (Cause2/Estimate) | about 1 more minute inside the wait, best guess | not in the wait; runs only when the user presses Calculate |
| Total wait | about 6 minutes | about 47 s |
At our modeled volume: what it saves
The same groups, for a year at our modeled volume of 1.2 million runs. Start with what a year of runs cost before, take away each saving in turn, and see what is still billed.
| Step | Cause | How it is worked out | Yearly AI cost |
|---|---|---|---|
| BPMN model build | 1 | 1.2 million runs × $0.14 each. | $168,000 |
| Human-AI estimate, run automatically on every run | 2 | 1.2 million × $0.19 each. | + $228,000 |
| Before: total | $168,000 + $228,000. | $396,000 | |
| The user decidesHuman-AI estimates users don't ask for | 2 | Half of runs have no calculate press: 50% × $228,000. | − $114,000 |
| The cacheBPMN model builds it answers | 1 | The cache answers 80% of BPMN model builds: 80% × $168,000. | − $134,400 |
| The cacheHuman-AI estimates it answers | 2 | The cache answers 80% of the presses: 80% × ($228,000 − $114,000). | − $91,200 |
| After: what is still billed | BPMN model builds the cache misses, $33,600, plus presses it misses, $22,800. | $56,400 |
Total saving: $396,000 − $56,400 = $339,600 a year (modeled).
- Cause1/Cache, fixed by the cache: $134,400.
- Cause2/Estimate, fixed by the user deciding and the cache: $205,200, the Human-AI estimates users don't ask for ($114,000) plus the presses the cache answers ($91,200).
- Check: $134,400 + $205,200 = $339,600.
More: assumptions behind these figures
One-run costs: the six test runs cost $1.97 in total, $0.33 per run on average. The two Human-AI estimate stages cost $1.11 of that, about $0.19 a run; the BPMN model build and the rest cost $0.86, about $0.14 a run (derived averages from the six test runs). The Human-AI estimate ran more than once in some runs, so $0.19 is an average per run, not a measured price per press; we assume a press costs what the automatic Human-AI estimate cost on average, on GPT-6 Sol as configured at the time (list price at the time, per million tokens: $2.00 input, $0.20 cached input, $10.00 output). Volume: 1,000 users × 10 documents × 10 reuses a month × 12 months (modeled), with calculate pressed after 50% of runs (assumed).
Cache: with the four identifiers gone, the same document sent to the BPMN model build produces the same AI requests (measured: 26 of 26 hits across two rebuilds). We assume 80% of runs repeat within the gateway's one-day cache life and hit; the other 20% miss and pay full price, with no credit for the provider's prompt cache, which keeps the figures conservative. A calculate press on a rebuilt model the user has not changed sends the same request as an earlier press on that model, so a press after a BPMN model build the cache answered is assumed to hit too; a press after a BPMN model build that missed is a new request and pays full price. The same press rate applies in cached and uncached runs. The on-demand saving is counted first, then the cache saving on what remains. After figures per run are rounded to the cent: $0.028 and $0.019, $0.047 in total. Users can choose a smaller model; one measured press on GPT-6 Luna cost about one cent (measured, one press).
Speed: the before and after BPMN model build waits are one measured run each of the same build of the same document. The before run had the cache switched off to stand in for the pre-fix misses; it did not include the Human-AI estimate, so the before wait adds a best-guess minute for it.
In plain terms: before the fix, every reuse of a document paid for the whole BPMN model build again and for a Human-AI estimate nobody had asked for. After the fix, most BPMN model builds cost nothing, because the cache answers them, and the Human-AI estimate is paid for only when a user presses calculate and the cache has no answer for it. The user gets the model in under a minute instead of about six, and the Human-AI estimate when they want it. Human judgment was redirected rather than removed: the architect decided what the user should pay for and when, and the user, not the pipeline, now decides when the Human-AI estimate runs.
Optimized caching saves time and money –
/jFixbefore you ship (and before you get the bill)
The design lesson. Article 01 argued for using the model for judgment and planning, and deterministic tools for execution. This is the cost side of the same rule. A cache is a deterministic tool, and each layer pays only for what it can reuse: our gateway's response cache needs an exact repeat of the request; the provider's prompt cache needs only an unchanged beginning. Run-unique identifiers, correlation ids and nonces stay out of prompt bytes unless a stated reason needs them there. And when a stage is expensive by nature, make it the user’s choice: deliver the outcome they came for first, and put the rest behind an action. That is a product decision that saves both money and waiting.
Catching a defective request before it costs money. /jFix before you ship means running the fix cycle, diagnose, contract, repair, prove, before release rather than after the bill. For a defect in the request itself, the diagnosis starts with the request. The four identifiers were found by a byte diff of two requests after the bill arrived. Our DevOps practice now looks earlier. /jDebug --prompt evaluates the assembled first request, the "effective prompt" that the product actually sends, before another model attempt or a point fix. It reads the whole request in order, including the system message, tools, schema and options, and reports what in it is wrong, missing or accidentally variable, with the exact spans as evidence. It makes no model call to do so.
More: what /jDebug --prompt checks
The check scores the assembled request on nine questions, each from 0 (clear) to 3 (a demonstrated contradiction or impossibility), and a 3 must point at the exact conflicting text: Who has authority when two instructions disagree? Can every mandatory, forbidden and schema rule be obeyed at once? Are the facts a decision needs usable where the decision is made? Does what the prompt teaches match what the consuming check accepts? Are examples kept separate from live identities? Is every required fact supplied, or owned by code? Is the model being asked for something code can derive, such as identifiers and counts? Does the request fit its allowance without truncating an obligation? Do corrections and variants keep the original obligations?
Two habits matter for cost. First, code derives identity, counts and coupled fields; the model is never asked to restate a fact code already knows, and long opaque identifiers are replaced by short request-local handles that code resolves afterwards. Second, every finding at the top severity becomes a test in the fixing contract, shown failing on the real pre-fix request and passing after the change, so the fix is proved on the request that was actually sent rather than on a template. The record is appended to the existing debugging receipt; no provider call, repair or retry is part of the check.
For Claude Certified Architect–Professional readers
Anthropic's guidance on prompt caching explains that a cache hit needs a prompt prefix identical to one recently cached, and that varying content such as timestamps and per-request context belongs after the static prefix. We apply this on a real product. In JarviSIM the varying parts were inside the body of the BPMN model build request, so we removed them, and we let our own AI gateway answer an exact repeat before the provider is asked at all. We answered the cache question with per-stage hit and billed rows plus a byte diff of two misses, never with configuration alone. And where a stage is new work by design, we made it a product decision: run it when the user asks.

