Your AI feature works on your laptop, and you can trace its cost and latency. This course keeps it fast, affordable, and running for real users.
For a first taste, watch the Ridgeline Huts trail-conditions assistant run on a simulated stand-in model, where one call in twenty times out at random. A fallback chain you’ll build still serves all 1,000 hikers’ questions, five of them with only the latest reports and no model. Real outages come in bursts.
Ridgeline Huts is a non-profit whose hut wardens file trail reports. The code download holds its assistant along with its traces and its cost and latency reports, so you can start here.
August brings the busiest week, those timeouts, and a half-spent budget. Every lesson ends with a before-and-after number for pass rate, p95 latency, cost per thousand questions, or share of questions served. Ninety-five answers in a hundred arrive within p95 latency.
What You’ll Learn
By the end of this course, you’ll be able to:
- Pin and upgrade the model with evals
- Give every request a time budget, with fallbacks
- Cache what can be cached
- Keep cost within a budget
- Make answers feel fast, measuring each change
You start with the model because a provider can swap the model behind a name, and every later fix needs one that holds still. Timeouts and fallbacks come straight after.
The Project: Get Through the August Rush
In the project, you’ll combine all five, plus per-hiker quotas, in a simulated August week. Then you’ll show with traces and evals that the wardens’ targets for p95 latency, cost per thousand questions, and pass rate hold on your model and the provider’s next one. Finally, you’ll explain your numbers to an AI mentor.
Before You Start
You should already stream answers from Express and read evals, traces, and cost and latency reports.
The project needs Node 26 and one model provider’s API key. Replaying its busy week costs about thirty-five dollars in API calls (measured on one provider in December 2026), more if fallbacks fire often.
How the Course Works
Lessons are text and video, and coding exercises run in your browser with no key. A project, a mentor conversation, a quiz, and a summary close the course.
Below this video are the slides and the code download, whose traffic simulator plays hikers’ questions. You’ll set up the download in the first lesson, Pin the Model You Ship.