Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
AI Security: Prompt Injection, Red Teaming & AI Guardrail
New
60 students

AI Security: Prompt Injection, Red Teaming & AI Guardrail

Defend, attack and test LLM apps: Llama Guard, Presidio, Bedrock Guardrails, Garak red teaming, AI agents, NeMo and MCP
Created bySachin Kafle
Last updated 11/2026
English
English [Auto],

What you'll learn

  • Detect and block prompt injection and jailbreak attempts with Meta's Prompt Guard and Llama Guard
  • Moderate unsafe text and images with Llama Guard 3 Vision and its safety categories
  • Find and anonymize personal data (PII) with Microsoft Presidio, including custom recognizers
  • Catch hallucinations in LLM answers with judge models and hallucination evaluation models
  • Configure Amazon Bedrock Guardrails: content filters, denied topics, sensitive information and image rules
  • Red team LLMs with Garak using encoding, data exfiltration and profanity probes
  • Build CrewAI agents that run ZAP penetration tests and write the security report for you
  • Evaluate RAG and LLM quality with faithfulness, context relevance and model-as-a-judge evaluators
  • Write your own guardrails with Guardrails AI validators and NVIDIA NeMo Guardrails (Colang)
  • Explain the Model Context Protocol (MCP) architecture and the security risks it brings

Coding Exercises

This course includes our updated coding exercises so you can practice your skills as you learn.

See a demo
Image of coding exercise example

Course content

15 sections • 86 lectures • 8h 4m total length
  • Course Introduction2:08
  • Welcome to AI Guardrails6:44
  • Course Roadmap6:37

Requirements

  • Basic Python: writing functions, installing packages with pip and running Jupyter or Colab notebooks
  • A computer with internet access, plus free Google Colab and Hugging Face accounts
  • An AWS account for the Amazon Bedrock sections (optional, all other sections work without it)
  • No prior security or machine learning experience needed: every concept is explained visually first

Description

One clever prompt can make a chatbot sell a car for $1, leak customer data, or run a command it should never touch. As companies race to put large language models in front of real users, real data and real money, the people who know how to defend, attack and test AI systems are in short supply. This course makes you one of them.

This is a practical, hands-on course on AI security and guardrails. Every idea is explained visually first, then you build it yourself in code with the tools used in production today. You will work through 49 concept lessons and 36 hands-on labs, more than 8 hours of content.

What you will build and break

  • Stop prompt injection and jailbreaks with Meta's Prompt Guard, and moderate text and images with Llama Guard and Llama Guard 3 Vision (OWASP LLM01).

  • Protect personal data: detect and anonymize PII with Microsoft Presidio, including your own custom recognizers.

  • Catch hallucinations before they reach users with judge models and evaluation models.

  • Configure managed guardrails in Amazon Bedrock: content filters, denied topics, sensitive information rules and image guardrails, tested live against a real model.

  • Switch sides and red team your own models with Garak: encoding attacks, data exfiltration through Markdown, and profanity probes.

  • Build AI agents for cybersecurity with CrewAI that drive the ZAP proxy, run a penetration test and write the report for you, plus multimodal ReAct agents that reason and use tools.

  • Measure quality with evaluators: faithfulness, RAG, semantic similarity and context relevance, plus Amazon Bedrock model-as-a-judge evaluations.

  • Write your own rails with Guardrails AI validators and NVIDIA NeMo Guardrails (Colang).

  • Understand the Model Context Protocol (MCP): hosts, clients, servers, tools, resources and prompts, and the security questions it raises.

Why this course is different

  • Concepts first, then code: short visual lessons followed by real walkthroughs, not slides read aloud.

  • Both sides of the fight: you learn to defend AI apps and to attack them the way a real adversary would.

  • Real tools only: Hugging Face models, Microsoft Presidio, Amazon Bedrock, Garak, ZAP, CrewAI, Haystack, Guardrails AI and NeMo Guardrails.

  • Mapped to the OWASP Top 10 for LLM Applications, so you know which risk each defense addresses.

By the end, you will be able to look at any LLM application, see where it can fail, put the right guardrails in place, and prove with tests and red teaming that they actually work.

Let's make AI powerful, and safe. Enroll now and start with the first lesson.

Who this course is for:

  • Software developers building chatbots, RAG apps or AI agents who need to make them safe
  • Security engineers and penetration testers who want to test and red team LLM applications
  • ML and AI engineers responsible for model safety, evaluation and guardrails
  • Tech leads and architects deciding how to secure generative AI in production
  • Students and career switchers who want an in-demand AI security skill set