AI red teaming
Deliberately attacking your own AI feature with harmful, tricky and injected inputs to find failures before users or attackers do.
AI red teaming is deliberately attacking your own AI feature with harmful, tricky and injected inputs to find failures before users or attackers do. A red team writes prompts that try jailbreaks, injections hidden in documents, requests for other users’ data, and tool calls with dangerous arguments, then records what got through.
Unlike a classic pentest, results vary between runs, so the useful output is a set of attack cases that become permanent evals run after every model or prompt change. People find new attack ideas; tools scale the known ones. Promptfoo generates attacks from a description of the app, and Microsoft’s open-source PyRIT automates multi-turn attacks. OWASP’s GenAI Red Teaming Guide (January 2025) spreads the work across four areas: the model, the implementation, the infrastructure and behavior at runtime.
Scope it to what the feature can actually do. An agent with tools needs attacks on the tools and the lethal trifecta; a public chatbot needs attacks on brand and data leaks. The OWASP Top 10 for LLM applications is a useful checklist of categories, and the findings give concrete answers for the AI section of a security questionnaire.
Sources
- GitHub: microsoft/PyRIT github.com
- OWASP GenAI: GenAI Red Teaming Guide genai.owasp.org
Related terms
- Jailbreak (LLM): A prompt written to make a model ignore its safety rules or its system prompt, sent by the user themselves.
- Prompt injection: Instructions hidden in data (a web page, an email, a file) that the model follows as if they came from you.
- Evals: A repeatable test set that scores an AI feature, so changes can be measured instead of guessed.
- Penetration test (pentest): An authorized, time-boxed attack on your app by security testers, ending in a report of what they could break and how badly.
- Promptfoo: An open-source command-line tool for testing prompts and models against test cases defined in a config file, including security red teaming.
- OWASP Top 10 for LLM applications: OWASP’s list of the most important security risks in applications built on language models, with a separate list for AI agents.
- Security questionnaire (vendor risk assessment, SIG, CAIQ): A list of security and privacy questions a company sends a vendor before buying, to judge the risk of trusting it with data and access.
