Cost Control
Choose models with evidence, then measure and reduce the cost and latency of LLM features with token budgets, caching, model routing and batching, without hidden quality loss.
5 objectives 6 steps about 120 min
Learn it step by step
Read the lessons in order, try the practice checks, then prove the skill with the knowledge check.
This skill page is a public outline. Its lessons and knowledge check appear here as subject-matter experts approve them.
Learning objectives
- Attribute token usage, cost and latency per request, user and feature from logged usage data.
- Apply prompt caching and response caching and measure their hit rates and savings.
- Route requests between a smaller and a larger model and confirm with an evaluation that quality stays within a set threshold.
- Use batch processing for offline workloads and enforce budget alerts and per-user limits.
- Select a model for a feature by comparing closed and open-weight, reasoning and non-reasoning candidates on an evaluation set, cost, latency, context limits, licence and data-handling terms, including a self-hosting break-even estimate.
Lesson plan
6 steps, about 120 min · 5 of 5 lessons available so far
- Where LLM Money Goes Concept · 15 min
- A Cost Report from Usage Logs Worked example · 20 min
- Lab: Prompt and Response Caching Lab · 25 min
- Lab: Choosing and Routing Models Behind an Evaluation Lab · 30 min
- Batch Jobs, Budgets and Limits Concept · 15 min
- Check: Cut Cost Without Breaking Quality Knowledge check · 10 questions
Practise it
Compare one closed and one open-weight model for your RAG API on the same evaluation set, cost and latency, and record the choice with a self-hosting break-even estimate. Then instrument the API to log tokens and cost per request, enable prompt caching for the static prompt prefix, route easy queries to a cheaper model, and report cost per 1,000 queries and evaluation pass rate before and after. Set a one-call quota and issue two concurrent requests; reserve budget before the provider call, settle actual usage and reconcile a timed-out call without double-counting or granting a second unreserved call.
References
Hard prerequisites
None.
Unlocks
Nothing depends on this skill yet.
On these roadmaps
Progress and evidence for this skill are shared across all of them.