Your AI feature costs $4,800/day. How do you cut costs by 80% without hurting quality?
Think first
Think about: caching, model routing, prompt compression, budget enforcement.
Strong answer
Three levers that compound: (1) Semantic caching — cache responses keyed by prompt hash + semantic similarity (0.95 threshold). Hit rates of 40-60% are a commonly quoted rule of thumb; yours depends on how repetitive your traffic is, so measure it. (2) Model routing — classify query complexity, route simple queries to a cheap model (gpt-4o-mini is ~17x cheaper than gpt-4o), fall back to frontier only on low confidence. 80% of traffic can use the small model. (3) Prompt/context compression — summarise conversation history instead of sending full history; a prompt growing from 450 to 8,200 input tokens (with 200 output tokens) makes each call about 7x more expensive. Combined: the cache leaves 40% of requests reaching the model, routing leaves 25% of their cost, and compression halves what remains: 0.4 × 0.25 × 0.5 = 0.05 of the original, about a 95% reduction (prices as of 26 October 2026; check /pricing). Add per-user cost budgets and anomaly alerts to prevent regression.
Weak-answer indicators
- Only suggests 'use a cheaper model'
- Doesn't mention caching
- Ignores prompt/context size as a cost driver
- Doesn't quantify the savings
Likely follow-up questions
- How do you handle cache invalidation?
- What's a good similarity threshold for semantic caching?
- How do you route queries without adding latency?