Guide
How AI Red Teaming Works From Scope to Regression
Design an authorized AI red-team exercise that connects a threat model to controlled testing, reproducible findings, mitigations, regression tests, and owners.
How AI Red Teaming Works
AI red teaming is a structured, authorized effort to discover how a specific AI system can fail or be misused, then turn those findings into mitigations, regression tests, monitoring, and owned residual risk.
It is not a prompt contest. The exercise matters when discovery changes the system.
flowchart LR
A["Authorize and define system"] --> B["Model threats and impacts"]
B --> C["Design controlled tests"]
C --> D["Capture reproducible evidence"]
D --> E["Triage and assign owners"]
E --> F["Mitigate and monitor"]
F --> G["Retest and add regressions"]
G --> H["Record residual risk"]
H --> B
Define the system before the attacks
A model is only one part of an AI application.
Record the model and version, system prompts, retrieval sources, memory, tools, identities, permissions, filters, code execution, external services, user interface, logs, human reviewers, and downstream actions.
Then name the decision boundary. A conversational response has different consequences from a generated command that can modify a customer account.
NIST defines AI red teaming as a structured adversarial testing effort that searches for flaws, undesirable behavior, and misuse risks. The word "structured" matters. Without an inspectable system boundary, one surprising output says little about the exposure or the fix.
Freeze the tested version. If prompts, retrieval, tools, policies, or models change during the exercise, record the change as a new test state.
Establish authority and safe handling
The exercise needs written authorization from the system owner.
Define which environments, accounts, data, tools, and actions are in scope. Set stop conditions for possible harm, privacy exposure, unauthorized access, service instability, legal risk, or unsafe physical effects.
Use synthetic or approved data where possible. Isolate tools and execution. Decide how sensitive findings and generated content will be stored, shared, retained, and deleted.
The team also needs a disclosure path if testing finds a vulnerability in a third-party product or service.
Public red-team guidance should explain the method without publishing detailed bypass recipes that make harmful behavior easier.
Begin with a threat model
Identify the actors who could interact with the system and what access they have.
An ordinary user, malicious user, external content author, compromised integration, insider, operator, and downstream consumer create different preconditions.
Name the assets and consequences. These can include sensitive data, system instructions, model availability, account authority, money, reputation, regulated decisions, physical safety, intellectual property, or trust in an operational record.
The OWASP Top 10 for LLM applications is one source for application threats. It should start a conversation, not become the entire threat model.
Include foreseeable misuse and ordinary failure. A system can cause harm without an adversary when it uses stale data, applies the wrong identity, invents a source, or sends an action to the wrong destination.
Build a test matrix
Translate each material threat into cases that have a precondition, controlled input, expected control, observable signal, prohibited impact, and evidence requirement.
Cover representative use, boundary conditions, missing context, conflicting instructions, untrusted retrieved content, permission failures, tool errors, repeated attempts, and recovery.
Test the paths users actually have. A model evaluated in a chat window may behave differently when the application supplies hidden prompts, documents, conversation history, function schemas, or tool results.
Include supported languages and modalities. If a control claims multilingual or image coverage, use qualified reviewers and content that actually exercises those claims.
MLCommons' current jailbreak methodology work shows why a scoped taxonomy and reproducible setting matter. Its stated single-turn, prompt-only boundary also illustrates what one benchmark does not cover.
Execute without losing evidence
For every test, record the system version, model, prompt template, input, retrieved context, conversation state, tools, permissions, generation settings, control results, final output, action, time, and observed impact.
Preserve failed attempts as well as successful ones. Adaptive testing often teaches the team which control changed behavior before a visible failure occurred.
Separate the tester's interpretation from the raw record. A concerning answer may not create an exploitable path. A polite refusal may still leak sensitive context or leave a tool action available.
Use automation for breadth and repeatability. Use human testers for adaptive reasoning, ambiguous impact, social context, and emerging failure modes. Neither replaces the other.
NIST's ARIA evaluation program separates model testing, red teaming, and field testing. That layered view helps a team decide what evidence the current exercise can support.
Triage the finding
A useful finding explains what happened, how to reproduce it, which boundary failed, what impact is plausible, which preconditions are required, how certain the result is, and who owns the affected control.
Severity should reflect consequence and practical reach, not merely how surprising the output looks.
Consider the sensitivity of the affected asset, available privileges, repeatability, required expertise, user population, detectability, scale, reversibility, and existing recovery.
Duplicate outputs may share a root cause. Grouping them can help the team fix the underlying trust or authorization boundary instead of adding many brittle prompt patches.
Choose layered mitigations
The fix may belong outside the model.
Possible control layers include data minimization, content provenance, retrieval isolation, input validation, prompt and content classifiers, policy tuning, least-privilege tools, typed arguments, allowlists, approval, output validation, sandboxing, rate limits, monitoring, and rollback.
Every mitigation can create side effects. A stricter classifier may block legitimate use. A human approval step can become ceremonial. A prompt patch can move the attack to another channel.
Record the expected effect and the new failure mode.
Meta's Purple Llama repository contains examples of safeguards and evaluation resources. Those artifacts can contribute to a system. They do not replace the threat model or establish effectiveness in another architecture.
Retest and create regression coverage
Run the original case against the fixed system. Confirm that the mitigation affects the intended path and preserves required behavior.
Then add a safe regression case to the release suite. Include nearby variants when the root cause could appear in different language, modality, tool, or context.
Regression coverage turns a discovered failure into a durable engineering signal. It also makes later model, prompt, retrieval, and tool changes easier to evaluate.
Some risks cannot be eliminated. Record the remaining exposure, monitoring, response, acceptance owner, and review trigger.
Red teaming is complete only for the stated exercise. New models, data, tools, users, attacks, and consequences reopen the work.
Use [[How to Design Layered Controls for an Open Model System]] to convert the threat model into an architecture. Use [[Llama 3.1 Safety Tooling Record]] for examples of versioned model and system safeguards.
This method guide was developed with AI assistance from E031, NIST, OWASP, MLCommons, Meta's official repository, and the linked exercise framework. Dalton Anderson remains the author. Security, safety, legal, privacy, technical, harmful-detail, current-source, and founder review are mandatory before publication or operational use. Publication is not authorized.
Sources
Follow the evidence.
- ai.meta.com: the llama 3 herd of modelsai.meta.com
- ai-challenges.nist.gov: genaiai-challenges.nist.gov
- owasp.org: www project top 10 for large language model applicationsowasp.org
- youtu.be: 1KNOcY e9Tsyoutu.be
- github.com: PurpleLlamagithub.com
- crfm.stanford.edu: indexcrfm.stanford.edu
- NIST AI Risk Management Frameworknist.gov
- mlcommons.org: jailbreak 0 7mlcommons.org
- mlcommons.org: safety faqmlcommons.org
- github.com: MODEL CARDgithub.com
- ai-challenges.nist.gov: ariaai-challenges.nist.gov
- github.com: MODEL CARDgithub.com
- daltonanderson.ghost.io: metas llama 3 safety scaling and simple solutionsdaltonanderson.ghost.io
- ai.meta.com: meta llama 3 1 ai responsibilityai.meta.com
- NIST Generative AI Profilenvlpubs.nist.gov
- mlcommons.org: safety methodologymlcommons.org
- huggingface.co: concept guidehuggingface.co
- github.com: MODEL CARDgithub.com
- csrc.nist.gov: red teamingcsrc.nist.gov
- open.spotify.com: 44o5OPSumaZJcvRkXutorBopen.spotify.com