LLM inference spend tripled in a quarter as usage grew. The CFO wants it halved within two quarters without hurting the product. Plan it.
Answer
Model answer, written in a candidate's voice
In short
- Measure cost per successful task by feature and customer; rank top spenders and failure modes
- Quick wins: prompt and semantic caching, trimming prompts, output limits, batch APIs for asynchronous work
- Model routing or cascades: cheap model first, escalate when needed
- Distil or fine-tune small models for narrow high-volume tasks; assess self-hosting against realistic utilisation
- Commercial levers: committed-use discounts, renegotiation
- Protect quality with a regression eval suite; ship behind feature flags; leave sustainable cost ownership in place (ongoing cost budgets and dashboards per team)
In full
I would treat this as a measurement-and-routing problem, not a blunt cut: first instrument cost per successful task by feature and customer, so we can see which flows and accounts drive the spend and whether failures are causing retries or oversized outputs. Then I would take the quick wins in parallel: prompt and semantic caching, trimming prompts, output limits, and batch APIs for asynchronous work, while routing most requests to a cheap model and escalating only when confidence or task complexity warrants it. For narrow high-volume tasks, I would distil or fine-tune small models, and only self-host where utilisation is realistic enough to beat managed pricing. In parallel, I would use committed-use discounts and renegotiate commercial terms, and I would protect quality with a regression eval suite, feature flags, and per-team cost budgets and dashboards so the savings are sustainable rather than a one-off squeeze.
What a strong answer covers
- Measure cost per successful task by feature and customer, and find the top spenders
- Quick wins: prompt and semantic caching, trimming prompts, output limits, batch APIs for asynchronous work
- Model routing or cascades: a cheap model first, escalating when needed
- Distil or fine-tune small models for narrow high-volume tasks; assess self-hosting against realistic utilisation
- Commercial levers: committed-use discounts, renegotiation
- Protect quality with a regression eval suite; ship behind feature flags; leave sustainable cost ownership in place (ongoing cost budgets and dashboards per team)
Common mistakes
- Downgrading models blindly
- A one-off fix with no ongoing cost visibility