Loading video player…

Keeping AI Features Fast, Affordable and Running (Overview)

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.

Download

Course Slides (.pdf)

641.7 KB
Download

Sample Code (.zip)

5.2 KB

00:00 Welcome to Keeping AI Features Fast, Affordable and Running. 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.

00:15 For a first taste, watch the Ridgeline Huts trail-conditions assistant on a simulated stand-in model, one call in twenty timing out at random. A fallback chain you’ll build still serves all thousand hikers’ questions, five of them only the latest reports, no model.

00:31 Real outages come in bursts.

00:35 Ridgeline Huts is a non-profit whose hut wardens file trail reports. The code download holds its assistant, traces and reports included, so you can start here.

00:46 August brings the busiest week, those timeouts, and a half-spent budget.

00:52 Every lesson ends with a before-and-after number. It’s pass rate, p95 latency, cost per thousand questions, or share of questions served. Ninety-five answers in a hundred arrive within p95 latency.

01:08 You’ll pin and upgrade the model with evals, and give every request a time budget with fallbacks. Then you’ll cache what can be cached, keep cost within a budget, and make answers feel fast.

01:20 You start with the model: a provider can swap the model behind a name, and every later fix needs one that holds still. Timeouts and fallbacks come straight after.

01:32 In the project, you’ll combine all five, plus per-hiker quotas, in a simulated August week. Then you’ll show the wardens’ targets hold on your model and the provider’s next one, and explain your numbers to an AI mentor.

01:48 You should already stream answers from Express and read evals, traces, cost and latency reports. The project needs Node 26 and one provider’s API key. Replaying its busy week costs about thirty-five dollars in API calls, more if fallbacks fire often.

02:08 Lessons are text and video, and exercises run in your browser with no key. A project, a mentor conversation, a quiz and a summary close the course. Below are the slides and the code download, whose traffic simulator plays hikers’ questions.

02:24 You’ll set up the download in the first lesson, Pin the Model You Ship.

Become a Member to join the conversation.