The Ridgeline Huts trail-conditions assistant answers hikers from the latest trail reports. Now the trust that runs the huts wants it on its public website, where some hikers will try to break it.
For a first taste, one line pasted into a trail report says the Pas de la Mule is open. No real report covers that path. In ten recorded runs on December 2, 2026, with one model, the assistant passed it on every time. Your runs will differ. A check you’ll build in your own code blocks that answer.
Before launch, the hut wardens who file those reports list what must never happen:
- A closure reported as open
- A go/no-go verdict
- Weather it wasn’t given
- An emergency answered with anything but the rescue number
- Another hiker’s booking shown
- The free assistant used as a general chatbot
No guardrail makes a feature safe, so every lesson ends in a number you produced, like attacks that got through and real questions wrongly blocked.
What You’ll Learn
By the end of this course, you’ll be able to:
- Moderate input and output
- Wrap the model in guardrails your code enforces (scope, grounding, safety-critical rules)
- Handle jailbreaks and cost abuse
- Hand over to a person when the feature shouldn’t answer
- Test all of it against attacks before release
The Project: Ready the Assistant for Launch
In the project, you’ll turn the wardens’ list into guardrails, each with an eval case. You’ll attack the assistant with a red-team set and count the attacks that got through and the real questions wrongly blocked, before and after your guardrails. Then you’ll explain your choices to the wardens, played by your AI mentor.
Before You Start
You should already know how to call a model through a small module, check structured output, and guard against prompt injection. You should also be able to read eval results and keep cost within a budget.
The project needs Node 26, one model provider’s API key, and an estimated $36 in API calls. That’s an estimate on one provider in December 2026. Others can cost more, so set a spend limit first.
How the Course Works
Lessons are text and video, and coding exercises run in your browser and need no key. A project, a quiz, and a summary close the course.
This is the fourth of five courses in Evaluating and Shipping AI Features, but you can start here. Below this video are the slides and the code download, which holds the assistant at the end of Keeping AI Features Fast, Affordable and Running in its starting-project folder. The first lesson, Moderate Questions and Answers, sets it up and recaps the parts of it you’ll build on.