AI Guardrails: Secure Generative AI and AI Agents
Create OWASP-aligned controls to address prompt injection, sensitive data, and AI agents, complemented by practical labs.
What you'll learn
- Map the workflow, trust boundaries, and consequential actions of an AI application prior to selecting safeguards.
- Translate business policies into rules that can be tested, creating a decision table that enables tangible controls.
- Protect against both direct and indirect prompt injections, including instructions concealed in documents and images.
- Prevent sensitive data from being accessed by the model and enforce permission checks before data retrieval, ensuring restricted content isn't exposed.
- Separate AI output validation from factual support and business authorization.
- Limit AI agents through controlled access to tools, credentials, connectors, MCP servers, meaningful approval channels, and spending constraints.
- Develop a layered guardrail system that fails safely and aligns with OWASP’s LLM and Agentic Top 10 and MITRE ATLAS standards.
- Conduct red-team exercises on your assistant to evaluate missed attacks, unnecessary restrictions, and successful task completions.
- Examine failures in guardrails, manage containment strategies, and validate fixes through regression tests.
Course outline
10 sections · 56 lessons · 7h 31m total
What Are We Trying to Keep Under Control?
- When a Helpful AI Becomes a Business Problem Free preview 09:56
- Safety, Security, Reliability, and Business Rules 07:36
- What Guardrails Can—and Cannot—Do 07:18
- Meet HarborPoint Services 07:31
- Exercise: Define Acceptable Behavior 08:45
Map the Application Before Choosing Controls
- Follow a Request Through an AI Application Free preview 07:21
- Where Instructions End and Untrusted Content Begins 07:24
- The Difference Between Reading and Acting 07:25
- Identify What Needs Protection 07:26
- Workshop: Create a Guardrail Placement Map 08:40
Convert Policies into Enforceable Rules
- From Policy Statements to Testable Requirements Free preview 07:38
- Choose the Right Response to a Violation 07:44
- Match the Control to the Consequence 07:33
- Define Exceptions and Human Review 07:34
- Lab: Build a Guardrail Decision Table 08:55
Handle Hostile and Manipulative Inputs
- Recognize Direct Prompt Injection and Jailbreak Attempts Free preview 07:44
- Find Instructions Hidden in Useful Content 07:52
- Understand the Limits of Input Screening 07:42
- Combine Screening with Application Controls 07:37
- Case Exercise: The Contaminated Service Ticket 08:22
Protect Sensitive Information and Retrieval Access
- Distinguish Personal Data, Secrets, and Confidential Information Free preview 07:55
- Minimize What the Model Receives 07:43
- Apply User Permissions Before Retrieval 07:54
- Keep the Knowledge Base Trustworthy 08:05
- Prevent Leakage Through Responses, Logs, and Prompts 08:11
- Lab: Answer Without Exposing the Record 08:36
Control Answers and Business Commitments
- Separate a Plausible Answer from a Supported Answer Free preview 07:49
- Decide When the Assistant Should Abstain 07:44
- Validate Response Structure and Required Fields 08:04
- Enforce Business Limits Outside the Model 08:06
- Case Exercise: The Assistant Invents an Exception 08:02
Keep AI Agents Within Their Authority
- Define an Agent's Permitted Actions Free preview 07:55
- Restrict Tool Access and Credentials 07:51
- Secure What the Agent Connects To 08:07
- Validate Tool Calls Before Execution 07:54
- Design Meaningful Approval Gates 07:52
- Control Repetition, Spending, and Cascading Actions 07:47
- Case Exercise: A Routine Request Becomes an Unauthorized Change 08:24
Assemble a Practical Guardrail Architecture
- Choose Between Rules, Classifiers, Model Evaluators, and Human Review Free preview 08:24
- Sequence Controls Around the Workflow 08:20
- Handle Timeouts and Unavailable Guardrail Services 08:06
- Compare Framework and Managed-Service Approaches 08:07
- Map Your Guardrails to OWASP and MITRE ATLAS 08:25
- Lab: Run a Request Through the Complete Control Stack 08:47
Test Whether the Guardrails Work
- Build a Representative Evaluation Set Free preview 07:51
- Measure Missed Violations and Unnecessary Blocks 07:58
- Test Multi-Turn Conversations and Indirect Attacks 08:04
- Red-Team the Assistant 08:14
- Use Automated Evaluators Carefully 07:39
- Run Regression Tests After Changes 07:58
- Workshop: Is HarborPoint Ready to Launch? 08:52
Operate, Investigate, and Improve
- Monitor Guardrail Decisions in Production Free preview 08:08
- Investigate an AI Control Failure 08:25
- Contain Problems and Restore Service 08:12
- Assign Ownership and Manage Changes 08:19
- Capstone: Present a Defensible Guardrail Plan 08:52
About this course
This course focuses on the implementation of artificial intelligence.
Imagine your AI assistant informing a customer that their water damage claim is valid. It isn't. In another instance, a chat leaked an address to an incorrect recipient, a refund was processed without proper authorization, and the assistant assured an exception that was nonexistent. Each scenario began with a helpful AI lacking essential guardrails.
You will learn to design, construct, and validate the safeguards necessary to keep generative AI applications and AI agents in check. This course goes beyond just defining prompt injection; it also teaches you where each safeguard should be implemented in a real-world application, what each control evaluates, the consequences of its failure, and how to demonstrate its effectiveness to those managing the associated risks.
One comprehensive case study provides a complete view: HarborPoint Services, a home services company, is launching a customer service assistant that addresses policy inquiries, accesses accounts, schedules visits, and processes refunds. Each lesson builds upon the previous one, leading from application mapping to a defensible release decision.
Here is what you will cover:
- Mapping before implementing controls: track a request through retrieval, generation, validation, and execution to identify trust boundaries.
- Translating policy into actionable rules: convert "ensure safety" into a decision table to guide real controls, including exceptions and human oversight.
- Countering hostile inputs: manage both direct and indirect prompt injection, which includes concealed instructions in documents and images, recognizing that screening alone is insufficient.
- Handling sensitive data and retrieval: restrict the model’s visibility, enforce permissions prior to retrieval, and maintain a reliable knowledge base.
- Distinguishing between plausible and validated answers, and enforcing business parameters beyond the model’s understanding.
- Managing AI agents: limit access to tools, credentials, connectors, and MCP servers, establish meaningful approval gates, and impose spending restrictions.
- Establishing a multi-layered architecture for guardrails, ensuring safe failure, and aligning them with the OWASP Top 10 for LLM Applications, the OWASP Top 10 for Agentic Applications, and MITRE ATLAS.
- Conducting testing: develop evaluation sets, assess missed violations and unnecessary blocks, red-team the assistant, and perform regression testing following changes.
- Managing operations: oversee decisions made in production, investigate control failures, contain issues, restore functionality, and designate responsibility.
Engage through hands-on experiences. Each lesson includes pause-and-decide exercises, and the capstone project involves correcting a flawed release configuration and presenting a comprehensive guardrail strategy alongside its evidence, constraints, and responsible parties. Practical labs utilize synthetic data and provided code within Jupyter or Google Colab, requiring no AI models, API keys, subscriptions, or specialized hardware.
This course is geared towards defenders. It does not serve as an introduction to a single product or a compilation of attack strategies. Instead, it prioritizes controls that are enforced by the application, maintained through honest measurements over time, ensuring that the assistant remains beneficial to genuine customers while safety measures function effectively.
Real-life, publicly documented incidents are included where relevant, all backed by verification. By course completion, you will be equipped to evaluate any AI assistant or agent, clearly identifying what keeps it under control and what remains unaddressed.
Who this course is for
- IT professionals and security experts involved with AI-integrated applications.
- Application owners, AI project managers, and technology-minded leaders interested in governance of AI assistants.
- Developers seeking a practical and accessible introduction to implementing application guardrails.
- Individuals tasked with launching a customer-facing AI assistant or agent, responsible for its oversight.
