Intermediate

Best Practices: The Token Optimization Playbook

The whole course as an actionable playbook - a maturity model, a 30-day plan, and the checklist to run before anyone proposes cancelling anything.

✍️ AI School Editorial Team · Lilly Tech Systems 📅 Published Jun 3, 2026 · Reviewed Jun 4, 2026

The Token Optimization Maturity Model

LevelDescriptionTypical State
0 - BlindNo token visibility; the bill is a surpriseMost orgs at first invoice shock
1 - AwareUsage dashboards per feature and teamKnows where the money goes
2 - OptimizedCaching, routing, output control deployed50-80% below the naïve baseline
3 - GovernedBudgets, alerts, review-time cost checksCosts stay optimized
4 - Self-sustainingChargeback; teams own their billsOptimization is cultural

The 30-Day Optimization Plan

  1. Week 1 - See. Instrument the gateway; capture per-call usage; build the top-10-features-by-spend view. No optimization yet - optimize blind and you will cut the wrong thing.
  2. Week 2 - Quick wins. Set max_tokens everywhere; add output-brevity instructions; kill inherited thinking budgets on trivial calls; move everything non-interactive to batch. Typically 20-40% savings for days of work.
  3. Week 3 - Structure. Restructure top routes for cache stability (static prefix first); enable caching; compress the top-3 bloated prompts; fix history management on chat features.
  4. Week 4 - Route & govern. Static model routing by endpoint; per-run agent budgets; spend alerts; schedule the monthly token review.

The Pre-Cancellation Checklist

Before any "cancel the AI subscription / kill the AI feature" decision, verify:

  • ☐ Do we know cost per successful task (not per seat / per call)?
  • ☐ Has a caching pass been done? (Cache hit rate under 50% on top routes = no.)
  • ☐ Is anything still defaulting to the frontier model that doesn't need it?
  • ☐ Are outputs tuned, or still model-default verbose?
  • ☐ Are agents bounded with per-run token budgets?
  • ☐ Is non-interactive volume on batch pricing?
If three or more boxes are unchecked, the organization doesn't have an AI cost problem - it has an AI engineering gap. Most "AI is too expensive" stories end here: the spend was real, but it was never engineered.

Anti-Patterns to Avoid

  • Optimizing before measuring - the week-1 instinct, and the wrong order. You will compress a prompt that accounts for 0.5% of spend while the real 40% sits unmeasured.
  • Cost-per-token tunnel vision - cheap models that fail and retry cost more end-to-end. Cost per successful task, always.
  • One-time heroics - a cleanup without governance decays within two quarters as new features ship unoptimized.
  • Over-compression - squeezing prompts until quality drops, then paying it back in retries and user churn. The goal is efficient, not minimal.
  • Blocking adoption to save tokens - the point of optimization is to make MORE AI affordable, not less. Cheap tokens should accelerate adoption, not gate it.

Ten Rules to Remember

  1. Output tokens cost 3-5× input - tune the talkative side first.
  2. Cache what repeats; structure prompts so more repeats.
  3. The smallest model that reliably does the task is the right model.
  4. Context is a budget, not a bin.
  5. Batch anything a human doesn't wait for.
  6. Agents need token budgets like loops need exit conditions.
  7. Measure cost per successful task, never per token.
  8. Stable prefix, volatile suffix.
  9. A cost regression is a bug - review it like one.
  10. Optimization's purpose is more AI per dollar, not less AI.

💡 Try It: Score Your Organization

Rate your organization on the maturity model (0-4), then run the pre-cancellation checklist against your highest-spend AI feature. Write down the three unchecked boxes that would save the most.

If you scored Level 0-1: start with Week 1 of the 30-day plan - visibility first. If Level 2+: your next win is governance (Lesson 7), because optimization that isn't governed decays.

Where to Go Next

📚
The hands-on companions to this course: AI Token Efficiency (prompt-level techniques), Prompt Caching (vendor cache mechanics), Tokens in AI (tokenizer fundamentals), and AI Cost Management (budgeting practices).

Ready to Go Deeper?

Live instructor-led courses from our partners. Affiliate disclosure.