Count the Cost

Lecture 7: Count the Cost

Lecture 07: Count the Cost

Lecture 6 closed by teaching you to evaluate AI systems formally: ground truth, benchmarks, LLM-as-judge. Lecture 7 turns that same evaluative eye on what AI costs. We start concrete: reading a real Claude Code usage report line by line, and seeing exactly how caching saves money by reusing the calculations of the attention mechanism from Lecture 1. We also look at cost estimates for AI’s electricity and water use, and how they vary based on task and context size. From there we cover model selection — why bigger isn’t always better, especially once latency compounds across a multi-step agentic workflow — and API keys: what they are, why they matter for billing and security, and a hands-on demonstration of exactly how one leaks. We close with a current-events look at how the real-world costs of AI became an important factor in the 2026 midterm elections.