Locked learning resources

Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Locked learning resources

This lesson is for members only. Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Guardrails for AI Features With Real Users (Summary)

In this course, you put guardrails around the Ridgeline Huts assistant before it went on the trust’s public site, and gave the wardens evidence instead of impressions.

What You Can Do Now

  • 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

What Each Rung Measured

These are the course’s recorded runs and rehearsal of December 2, 2026. Yours will differ.

Locked learning resources

Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Already a member? Sign-In

Locked learning resources

The full lesson is for members only. Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Already a member? Sign-In

00:00 You’ve reached the end of this course. The wardens wanted evidence before the assistant went public, and now you have it. You can moderate input and output.

00:11 You can wrap the model in guardrails your code enforces: scope, grounding and safety-critical rules. You can handle jailbreaks and cost abuse, and hand over to a person when the feature shouldn’t answer.

00:23 And you can test all of it against attacks before release.

00:29 Each rung ended in a number. These are the course’s recorded runs, and yours will differ. The moderation endpoint’s default flag turned away eleven of twelve rescue questions.

00:42 Thresholds set on those same questions turned away none, but caught one fewer harmful question. The grounding guardrail let none of twelve wrong answers through, in three runs.

00:54 A three-second judge limit blocked 88 of 120 right answers. Six seconds blocked 19, but the p95 wait rose to seven seconds.

01:06 In a rehearsal, a scripted user cost up to $14.65 a week under the quota alone. Your limits stopped its long pastes, but trimmed ones still cost $2.55, and 23 honest questions were refused instead of two.

01:25 A teammate’s pull request changed the prompt and the model, and a closed attack came back. It got through three times in nine, so the check failed before merge.

01:37 Your own numbers are the handoff rate from your simulated week, and the project’s before-and-after counts of attacks that got through and real questions wrongly blocked.

01:49 A guardrail is code around the model, not a longer prompt. Measure what each guardrail wrongly blocks, not only what it stops. Safety-critical checks fail closed, and the emergency check runs first.

02:07 Hand over on code signals, never the model’s confidence. Keep attacks in the eval set, and rerun them on every change.

02:18 None of these numbers makes the assistant safe. If no attack got through in your after runs, none has worked yet, not that none will. Real hikers ask in other seasons and languages, and attackers adapt.

02:33 So you keep measuring after launch.

02:37 In the path’s last course, you’ll roll a change out to a small share of hikers first, watch the numbers, and roll it back when they get worse. Below this video are the finished project and a related RealJS course.

02:53 Thanks for working through this course, and for holding the assistant to the wardens’ list.

Become a Member to join the conversation.