Skip to content
AI Skills Central

Type to search Agent Skills, workflows, tutorials, tools and the glossary.

Safety and governance

AI red teaming

Attacking your own AI application to find unsafe or insecure behaviour before others do.

Intermediate
Bookmark

Bookmarks are kept in your free account, so you can find this page again on any device.

Sign in to bookmark
On this page

Overview

AI red teaming is deliberately attacking an AI system you are responsible for, using adversarial inputs to find where it can be made to leak data, ignore its instructions, misuse its tools or produce harmful content. Chatbots and agents now read untrusted web pages, documents and tool results, so the attack surface is far wider than a chat box, and the OWASP Top 10 for LLM Applications gives a starting list of what to test.

Practitioners start from what the application can do and who could abuse it, then generate attacks for that purpose: direct and indirect prompt injection, jailbreaks, requests for other users' data, tool calls with dangerous arguments. Tools such as promptfoo, garak and PyRIT produce and score attacks at scale, and people confirm each finding by hand, fix it, and keep the attack as a regression test that runs on every change.

What you will practise

  • Write a threat list for one application: its data, its tools and who might abuse them
  • Generate prompt injection and jailbreak attacks for that application with a red-team tool
  • Confirm each reported failure by hand before you count it as a finding
  • Plant an instruction in a document or web page the agent reads and check whether it obeys
  • Keep confirmed attacks as regression tests and re-run them after every prompt or model change

Workflow recipes

Articles

Tools for this skill

  • garak

    Scanner that probes LLMs for vulnerabilities such as prompt injection.

    Safety and securityOpen sourceNVIDIA

  • promptfoo

    CLI for YAML-defined prompt and model evals, plus red-team scans for injection.

    Evals and observabilityOpen sourceOpenAI

  • PyRIT

    Microsoft toolkit for red-teaming generative AI systems.

    Safety and securityOpen sourceMicrosoft

Key terms

Words you will meet while learning this, defined in the glossary.

Full glossary
  • Jailbreak

    A prompt crafted to get a model to bypass its safety training and produce content it would normally refuse to write, often by role-play.

  • Red-teaming

    Deliberately attacking an AI system to find harmful, insecure or embarrassing behaviour before real users or attackers can find it.