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

Tools, Guardrails and Evals for AI Features (Summary)

In this video, you looked back at how the ferry booking assistant came together: the model’s tool calls, the guards around them, the booking note whose calls they blocked, and the eval comparison that decided a change.

What You Can Do Now

You can now let a model call your own functions and keep it safe (arguments checked, actions confirmed, permissions limited, injected instructions limited in what they can do), then measure a feature with an eval set before and after a change.

How You Got Here

Each part of the assistant came from a step of the course:

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 Tools, Guardrails and Evals for AI Features.

00:06 You can now let a model call your own functions and keep those calls safe, then measure the feature with an eval set before and after a change.

00:16 At first, the model only asked for a tool call. Your loop ran every call, sent each result back by its ID, and stopped at an answer or a cap. Then came the guards.

00:28 Each tool acts only for the session’s passenger. A change runs only after Amara sees exactly what will change and says yes. And each feature gets only its own tools, with caps.

00:41 Then a booking note told the assistant to cancel everything. Tags around the note make that less likely, but they can’t prevent it. So when a stand-in model obeyed the note, the other passenger’s booking was refused, Amara said no each time, and nothing was canceled.

01:00 Last, you measured it with real cases, each run several times, and a judge checked against your grades. One new line in the prompt took the Heron Island case from 3 in 10 to 10 in 10.

01:13 But one case got worse. You read that run: its first request hit a timeout, with no sign the new line caused it. A timeout still counts, but one miss in ten can be chance, so both versions ran again.

01:26 Nothing got worse, and the new prompt stayed.

01:30 Things to remember. The model asks, and your code decides. Take the passenger from the session. Run a change only after a yes. Limit what an injection can do with your tools, not your prompt.

01:44 Keep secrets out of the prompt. Run each case several times, and read what got worse before you switch.

01:53 This is the last of five courses, and the end of the path. Your next step is the feature you planned in Build an AI Feature of Your Own: build it, guard it, and keep its evals running.

02:06 Thanks for following along.

Become a Member to join the conversation.