Advanced course for engineers

AI safety guardrails course: add controls to an AI system and test them

You have an AI assistant that reads user input and can call tools. This course is for the person who has to make it safe to ship: you decide where each control sits, build it and test it.

Open the courseSee the layers

Chapter 1

Put several controls around the model

In the intro video, two assistants are compared. One takes any prompt and leaks personal data. The other filters the prompt and redacts the data. Chapter 1 maps the risks and shows where each control sits.

Still from the intro video for the course AI Safety, Guardrails & Human Oversight
Intro video, 1 min 18 s. Transcript below.
Read the transcript

You have an AI assistant that reads user input and can call tools. This course is for the person who must make it safe to ship. You decide where the controls sit, you build them, and you prove they work. Compare two assistants. On input, one takes any prompt and the other filters it. On personal data, one leaks it and the other redacts it. On tools, permissions follow risk. On a risky action, a human approves first. On failure, it falls back and escalates. The course builds each control in turn. You filter inputs and outputs. You enforce policy and refusals. You route risky actions to human approval. Then the capstone runs a safety evaluation on your guarded assistant. If you are responsible for an AI system that acts on real users and real data, start with chapter one. You will leave with a guarded assistant and the tests that show its controls hold.

Filters on input and outputChapters 2 and 4

Policy and refusalsChapter 3

Tool permissionsChapter 5

Human approvalChapter 6

Safe fallbacksChapter 7

The model

  • A map of what can go wrong

    A lesson on mapping what can go wrong.

  • Where controls sit: defence in depth

    A lesson on where controls sit, called defence in depth.

  • Prompt or code?

    A lesson on choosing between a prompt and code.

  • Filters have two kinds of error

    A lesson on the two kinds of error a filter has.

  • Risk-based control tiers

    A lesson on risk-based control tiers.

The course intro video with its transcript, then five kinds of control drawn around the model, named after the chapter titles.

EU AI Act course: the rules behind human oversight →

Chapter 2

Filter what goes in and what comes out, and count both kinds of mistake

Chapter 2 covers input limits, pattern filters, normalizing text, output checks and thresholds.

  1. User message
  2. Input check
  3. Model
  4. Output check
  5. Answer
What a check can do with a message
Check blocks itCheck lets it through
The message is harmfulCaught: rightMissed: a mistake that lets harm through
The message is harmlessWrongly blocked: a mistake that fails a real userPassed: right
  • Input limits

    A lesson on input limits.

  • Pattern filters

    A lesson on pattern filters.

  • Normalise first

    A lesson on normalizing text first.

  • Output checks and latency

    A lesson on output checks and latency.

  • Thresholds

    A lesson on thresholds.

A message passes an input check, the model and an output check. Below, a general picture of the four outcomes of a check: two right, two wrong.

Chapter 3

Write policy as data and decide which rule wins

Chapter 3 covers policy as data, refusals, conflicting rules and testing with attack families.

A policy as data (invented example)
IDWhenThen
R1The request asks for another person's account detailsRefuse
R2The user is a signed-in support agentAllow the account lookup

A support agent asks for a customer's details: both rules match

A refusal that offers what it can do

I can't share another person's account details. I can help with your own account.
  • Policy as data

    A lesson on policy as data.

  • Writing a refusal

    A lesson on writing a refusal.

  • Conflicting rules

    A lesson on conflicting rules.

  • Over-refusal

    A lesson on over-refusal.

  • Testing with attack families

    A lesson on testing with attack families.

Two invented rules as table rows. A request from a signed-in support agent matches both, so the policy has to say which one wins. Under the table, a refusal that says what the assistant can do instead.

Chapter 4

Find personal data with patterns, then see what patterns miss

Chapter 4 covers detecting and redacting personal data. This example scans one invented support message.

Redact one message

Invented message and numbers, for teaching. Nothing is sent anywhere.

How to redact

Check digit

The message

Hi, I am Maria Berg. My card **** **** **** 1111 was declined, and order number 4111 1111 1111 1112 never arrived. Please write to m***@example.com.

Maria Berg stays in the text: names need a model, not a pattern.

Redacted
2
Look-alikes left alone
1

Method Mask, check digit on. 2 matches handled, 1 look-alike numbers left alone.

  • What is personal data

    A lesson on what personal data is.

  • Pattern detectors with check digits

    A lesson on pattern detectors with check digits.

  • Names and addresses need a model

    Names and addresses need a model, as the lesson title says.

  • Redaction methods

    A lesson on redaction methods.

  • Where to redact and what leaks

    A lesson on where to redact and what leaks.

One invented support message with two number candidates and an email address. Choose how to redact and whether to use the check digit, and the message and the counts update.
  • The rule in this example: a card candidate is 13 to 19 digits, with single spaces or dashes allowed between them. With the check on, it counts only if it passes the Luhn check: from the right, double every second digit, subtract 9 from any result above 9, and the sum must end in zero. An email address needs no check digit. No pattern here finds names.
  • Mask keeps the last four digits of a card and the first letter of an email. Tag replaces each match with a label. Turning the check off redacts look-alike numbers too, which is over-redaction.

Chapter 5

Grant each tool the least it needs and the autonomy its risk allows

Chapter 5 covers tool permissions and how much autonomy the assistant gets.

(invented example)
ToolAutonomy
Look up an orderRuns on its own
Draft a replyRuns on its own
Send the replyAsks a person first
Issue a refundAsks a person first
Delete an accountNot granted

Action budget for one session

  • Least privilege and tool types

    A lesson on least privilege and tool types.

  • Argument validation

    A lesson on argument validation.

  • Autonomy levels

    A lesson on autonomy levels.

  • Acting for a user

    A lesson on acting for a user.

  • Action budgets

    A lesson on action budgets.

An invented permission table: five tools, each with one autonomy setting. Under it, a budget meter for the number of actions one session may take.

Chapter 6

Show an approver what they need, and keep the record

Chapter 6 covers when to ask a person, what the approver sees, queues, rubber-stamping and the audit trail.

Approval request(invented example)

Action
Issue a refund
Asked by
The support assistant
Why
The customer wrote that the item arrived broken
What will run
Refund tool, order and amount shown in full
Risk tier
High, so a person must decide

A person decides: approve or reject

Waiting in the queue

The audit trail

  1. The assistant asks
  2. A person decides
  3. The tool runs, or does not
  • When to ask a person

    A lesson on when to ask a person.

  • What the approver sees

    A lesson on what the approver sees.

  • Queues and service targets

    A lesson on queues and service targets.

  • Rubber-stamping

    A lesson on rubber-stamping.

  • The audit trail

    A lesson on the audit trail.

An invented approval request as an approver would read it, a queue of waiting requests, and the audit trail the decision leaves behind.

Chapters 7 and 8

Fall back in steps, then pass the release gate

Chapter 7 covers fallbacks and escalation, from a fallback ladder to a kill switch. The capstone, a guarded AI assistant with a safety evaluation, ends with a release gate.

Chapter 7: safe fallbacks and escalation

  1. A fallback ladder
  2. Confidence bands
  3. Safe default messages
  4. Escalation to people
  5. Kill switch and degraded modes

Capstone: a guarded AI assistant with a safety evaluation

  1. 1Scope and tiers

    Step one of the capstone.

  2. 2The layer plan

    Step two of the capstone.

  3. 3The safety evaluation

    Step three of the capstone.

  4. 4Reading the bypass table

    Step four of the capstone.

  5. 5Release gate

    The last step of the capstone.

ShipHold

Open the course: AI Safety, Guardrails & Human Oversight

Left, the five lessons of the fallback chapter as steps going down. Right, the five steps of the capstone, ending at a release gate drawn with a ship and a hold mark as an example.

Model Context Protocol guide: tools an assistant can call →

Questions about the course

  • What is the AI safety guardrails course about?

    Putting controls around AI systems: filters, policies, permissions, approvals and safe fallbacks, and testing that they work, according to the course description.

  • Who is the AI safety guardrails course for?

    The catalogue's audience line reads: software engineers and technical product people who build AI features.

  • What level is it?

    It sits at the advanced level in the catalogue.

  • What can I do to keep an AI feature safe afterward?

    The course lists six outcomes: why guardrails and where controls sit, input and output filtering, policy enforcement and refusals, PII detection and redaction, tool permissions and risk-based autonomy, and human approval workflows.

  • What do I build?

    The capstone is a guarded AI assistant with a safety evaluation: scope and tiers, a layer plan, the evaluation, a reading of the bypass table, and a release gate.

  • How is the course organized?

    Forty lessons are grouped into eight chapters, and the capstone makes up the eighth.

  • Is there a certificate for the guardrails course?

    Certificates exist in the Academy. The app's legal text says that, depending on the course and on how you went through it, you get a certificate or a confirmation of participation, and a certificate can be downloaded as a PDF.

  • Can the AI coach tell me whether I will be certified?

    It cannot. Fixed rules set your levels from your graded work, so the coach talks a lesson through with you and does not rate you for the certificate.