LearnQuestion bank

Estimate the monthly LLM cost of an email-triage feature handling 200k emails a day at about 1,500 input and 200 output tokens each. Then cut it five-fold. Follow-up: next month the bill doubles while traffic grows 10% — what do you check?

Applied LLMTechnicalMedium

Answer it yourself first, out loud or on paper, then compare.

Answer

Model answer, written in a candidate's voice

In short

  • Volume math: 200k/day × 1,500 in + 200 out = 300M in + 40M out per day → ~9B in + 1.2B out per month (30-day month)
  • Prices are explicit assumptions, not verified current list prices: at $3/M in and $15/M out ≈ $27k + $18k ≈ $45k/month; at $0.25/M in and $1.25/M out ≈ $3.75k/month — verify against current provider pricing
  • Five-fold cut: small/fine-tuned model first with escalation to a larger model, shorter prompts and fewer examples, prompt caching for the static prefix, batch discounts for non-urgent work, short structured outputs, rules to skip auto-replies
  • Include retries, judge/eval traffic and peaks in the estimate, not just the happy path
  • Follow-up: bill doubles with only 10% traffic growth — attribute cost by feature/model/tenant, then check prompt growth, unbounded history, agent loops/retries, broken cache hits, routing changes, eval jobs on prod keys, and abuse

In full

At 200k emails a day with 1,500 input and 200 output tokens each, that’s 300M input and 40M output tokens per day, or roughly 9B input and 1.2B output per month. Prices are assumptions I’d verify against current list prices, but at $3/M input and $15/M output it’s about $27k + $18k ≈ $45k/month, while at $0.25/M and $1.25/M it’s roughly $3.75k — so the real number depends entirely on the model tier and pricing I pick. To cut it five-fold I’d route most emails to a small or fine-tuned model with escalation to a larger model only when confidence is low, shorten prompts and examples, cache the static prefix, use batch discounts for non-urgent work, keep outputs short and structured, and skip auto-replies with rules — and I’d add retries, judge/eval traffic and peak-hour spikes on top of the base estimate. If next month the bill doubles while traffic grows only 10%, I’d first attribute cost by feature, model and tenant, then hunt for prompt growth, unbounded conversation history, agent loops or retries, broken cache hits, routing changes, eval jobs running on production keys, and abuse — a 2x bill on 1.1x traffic almost always means a unit-cost or volume-of-calls problem, not a traffic problem.

Checked against sources by an independent AI reviewer.

What a strong answer covers

  • 300M input + 40M output tokens/day → ≈9B input + 1.2B output/month
  • Prices as explicit assumptions: at $3/M in and $15/M out ≈ $27k + $18k ≈ $45k/month; at $0.25/M in and $1.25/M out ≈ $3.75k. (Check current list prices.)
  • Levers: small or fine-tuned model first with escalation; shorter prompts and fewer examples; prompt caching for the static prefix; batch discounts for non-urgent work; short structured outputs; rules to skip auto-replies
  • Includes retries, judge/eval traffic and peaks
  • Follow-up: attribute cost by feature/model/tenant; look for prompt growth, unbounded history, agent loops/retries, broken cache hits, routing changes, eval jobs on prod keys, abuse

Common mistakes

  • Forgetting output tokens cost more
  • no sensitivity to price assumptions

Follow-ups

  • next month the bill doubles while traffic grows 10% — what do you check?