Key Terms
| Term | In one line |
|---|---|
| Model routing | Classify by complexity, send each query to the cheapest adequate tier |
| Semantic caching | Embed the query, serve a cached answer on a near-duplicate hit |
| Token optimization | Shorter system prompts, trimmed context, output-length control per query type |
| Dynamic batching | Batch concurrent requests for GPU utilization on self-hosted models |
| TCO | Infrastructure + licences + engineering time + ops + opportunity cost, over 3 years |
| Revisit trigger | A pre-agreed condition that reopens an ADR — the antidote to a decision calcifying |
Numbers That Matter
| Lever | Saving | Timeline |
|---|---|---|
| Semantic caching | 30–40% | 1–2 weeks |
| Prompt optimization | 10–20% | 1–2 weeks |
| Output length control | 5–15% | 1–2 weeks |
| Model routing | 30–50% blended | 2–4 weeks |
| Batch / async APIs | ~50% per call | Non-real-time work only |
| Reserved / committed capacity | 30–60% off on-demand | 1–3 year commitment |
| Combined, typical | 60–75% total reduction | While holding or improving quality |
| Figure | Value |
|---|---|
| Traffic mix | ~70% simple · ~25% medium · ~5% complex |
| Tier cost spread | 10–30× between cheapest and strongest |
| Scaling phases | ~1K → ~50K → ~500K → 1M+ queries/day |
| GPU cost ladder | On-prem capital → reserved → on-demand → spot → serverless per-inference |
Decision Rules
- Analyze spend composition before optimizing anything. Categorize queries by type and complexity and measure actual token usage per category — otherwise you optimize the 5% that doesn’t matter.
- Sequence by time-to-value: quick wins (caching, prompt trimming, output limits) in 1–2 weeks → model routing in 2–4 weeks → architecture changes (precomputed FAQ answers, batch APIs, self-hosting) in 1–2 months.
- Routing works because the tier spread is 10–30×. Moving even a modest majority of traffic to the cheapest adequate tier dominates every other lever — but it needs a quality gate on the golden set, or you’ve bought cheap wrong answers.
- Build vs buy: buy managed for stateful infrastructure you’d rather not operate (vector DB, observability, embedding APIs at low volume). Build the orchestration, evaluation and prompt layers — that’s where the domain differentiation lives and what a competitor can’t buy.
- Self-host when volume justifies it, not before. The crossover is real but later than people expect once you price GPU ops, on-call and utilization.
- Every AI ADR needs a revisit trigger. “Revisit this model choice if a new model class shows >10% quality improvement on our golden set at equal or lower cost.” Without one, a reasonable decision quietly becomes a legacy constraint.
Say This Out Loud
“Before I optimize anything I analyze spend composition — categorize queries by type and complexity, and measure actual token usage per category. Cost reduction has to target where the money actually goes, and it’s routinely not where people assume. I’ve seen teams spend a sprint shaving a system prompt that accounted for four percent of spend.”
“Then I sequence by time to value. Quick wins in a fortnight — semantic caching at thirty to forty percent, prompt trimming at ten to twenty, output length control on top. Model routing over the next month, which is the big one because the per-token spread between tiers is ten to thirty times. Architecture work after that. Combined, sixty to seventy-five percent reduction is a realistic target, and much of it comes from routing away from unnecessary frontier-model use rather than from degrading anything.”
“I won’t ship routing without a quality gate on the golden dataset, per category. Cheap answers that are wrong cost more than the model ever did — in trust, in escalations, and in the credibility of the whole programme.”
“Every AI architecture decision record I write has an explicit revisit trigger — for example, revisit this model choice if a new model class shows more than ten percent quality improvement on our golden set at equal or lower cost. This field moves fast enough that a decision without an expiry condition becomes a legacy constraint inside a year, and nobody remembers it was ever a choice.”