Lessons from Red Teaming 100+ Generative AI Products

microsoft · Tech · 2024 · source Agentic: no · promotional bias: low · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Generative AI red teaming and security evaluation

Microsoft's AI Red Team needed a practical operating model for probing safety and security risks across many generative AI products. The work had to cover both adversarial and benign actors, security and responsible-AI harms, model and system-level weaknesses, automation at scale, and human judgment for novel or subjective harms.

Constraints:

Architecture

Microsoft AIRT formalized an internal threat model ontology covering systems, actors, tactics/techniques/procedures, weaknesses, and impacts, then applied it through red-team operations across generative AI products. PyRIT provides automated prompt datasets, converters, attack strategies, and scorers, while human experts handle domain-specific, cultural, emotional, and novel-harm judgments. The operating model combines system-level attack thinking, automation, case studies, break-fix cycles, and purple-team style improvement.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  system["System under test"] --> ontology["Threat model ontology"]
  ontology --> operation["Red-team operation"]
  operation --> pyrit["PyRIT automation"]
  pyrit --> attacks["Automated attack strategies"]
  attacks --> system
  pyrit --> scorers["Output scorers"]
  scorers --> humans["Human expert review"]
  humans --> mitigation["Mitigation cycle"]
  ontology --> impacts["Impact taxonomy"]
  impacts --> mitigation
  mitigation --> operation
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
System under test Standalone model or integrated generative AI product, copilot, plugin, or application being assessed. Threat model ontology, Red-team operation
Threat model ontology Structured model of system, actor, tactics, techniques, weaknesses, and impacts. System under test, Red-team operation, Impact taxonomy
Red-team operation Coordinated testing process for adversarial and benign failure modes across safety and security. Threat model ontology, PyRIT automation, Human expert review, Mitigation cycle
PyRIT automation Python Risk Identification Tool for prompt datasets, transformations, automated attacks, and output scoring. Red-team operation, Automated attack strategies, Output scorers
Automated attack strategies Automated jailbreak and attack flows such as TAP, PAIR, and Crescendo referenced in the summary. PyRIT automation, System under test
Output scorers Automated and multimodal scoring functions for judging generated outputs during risk testing. PyRIT automation, Human expert review
Human expert review Subject-matter, cultural, emotional, and contextual judgment for novel harms and sensitive domains. Red-team operation, Output scorers, Mitigation cycle
Impact taxonomy Categorizes security impacts such as data exfiltration and safety impacts such as harmful content generation. Threat model ontology, Mitigation cycle
Mitigation cycle Break-fix and purple-team style improvement loop for applying and retesting defenses. Red-team operation, Human expert review

Data flow

A red-team operation starts by defining the system under test and actor being emulated, including malicious and benign users. The team chooses tactics and techniques, probes for weaknesses, and records impacts across security and safety categories. Automated PyRIT workflows can generate transformed prompts, run attack strategies, and score outputs across more risk areas than manual testing alone. Human red teamers and subject-matter experts then judge ambiguous harms, assess context, and feed findings into mitigations and repeated break-fix cycles.

4 supporting quotes
“we present our internal threat model ontology and eight main lessons we have learned”article, stated
“Automation can help cover more of the risk landscape”article, stated
“The human element of AI red teaming is crucial”article, stated
“The work of securing AI systems will never be complete”article, stated

Why this architecture

The ontology makes red teaming repeatable across systems, actors, weaknesses, and impacts. PyRIT extends coverage because fully manual testing cannot span the risk landscape. Human review remains necessary because novel harms, cultural context, medical/cyber/CBRN content, and distress scenarios require judgment that benchmark scores alone cannot provide. Break-fix cycles recognize that defenses raise attack cost rather than permanently solving AI security.

4 supporting quotes
“Based on our experience red teaming over 100 generative AI products at Microsoft”article, stated
“AI red teaming is not safety benchmarking”article, stated
“By sharing these insights alongside case studies from our operations, we offer practical recommendations aimed at aligning red teaming efforts with real world risks.”article, stated
“AI security requires continuous improvement rather than one-time solutions”summary, stated

Models used: generative AI products · LLMs · PyRIT · uncensored models for automated red teaming · multimodal output scorers

Scale

Alternatives considered (roads not taken)

Treat safety benchmarking as sufficient

Rejected because: The paper distinguishes red teaming from benchmarks because red teaming explores unfamiliar scenarios and novel harms.

“AI red teaming is not safety benchmarking”article, stated
“red teaming explores unfamiliar scenarios and helps define novel harm categories.”summary, stated

Prioritize gradient-based adversarial methods

Rejected because: The paper says real attackers prompt engineer, and simple jailbreaks can be more practical than gradient attacks.

“You don't have to compute gradients to break an AI system”article, stated
“real attackers don't compute gradients, they prompt engineer.”summary, stated

Test only the base model

Rejected because: A system-level adversarial mindset is required because deployed products include infrastructure, filters, databases, plugins, and cloud resources.

“The paper advocates for a system-level adversarial mindset.”summary, stated
“AI models are deployed within broader systems including infrastructure, input filters, databases, and cloud resources.”summary, stated

Rely on automation without human judgment

Rejected because: Automation improves coverage, but subject-matter, cultural, and emotional judgments remain crucial.

“Automation can help cover more of the risk landscape”article, stated
“The human element of AI red teaming is crucial”article, stated

Patterns

eval-driven-development (security-testing)

Microsoft AIRT uses red-team operations, threat models, case studies, and break-fix cycles to evaluate AI systems against real risks.

“AI red teaming has emerged as a practice for probing the safety and security of generative AI systems.”article, stated
“break-fix cycles—multiple rounds of red teaming and mitigation”summary, stated

safety-policy-enforcement (security)

The red-team ontology and operations examine security impacts, responsible-AI harms, jailbreaks, prompt injection, data exfiltration, and unsafe content.

“probing the safety and security of generative AI systems”article, stated
“Impact: Downstream effects categorized into security impacts (data exfiltration, credential dumping, remote code execution) and safety impacts”summary, stated

tool-use-orchestration (red-team-automation)

PyRIT orchestrates prompt datasets, converters, attack strategies, and output scorers to automate portions of AI red teaming.

“PyRIT provides several key components”summary, stated
“Prompt datasets for testing various harm categories”summary, stated

human-in-the-loop-gate (review)

Human experts judge specialized domains, cultural context, distress scenarios, and novel harms that automated tools cannot fully assess.

“Subject matter experts are needed for specialized domains like medicine, cybersecurity, and CBRN”summary, stated
“Emotional intelligence is perhaps the most uniquely human contribution”summary, stated

observability-tracing (security-operations)

The ontology records actors, techniques, weaknesses, and impacts so findings can be communicated and mitigated systematically.

“The team developed a threat model ontology covering actors, TTPs, weaknesses, and impacts”summary, stated

Tradeoffs

Red-team coverage strategy

Chose automation plus expert review over fully manual testing or fully automated scoring.

Rationale: Automation covers more risk surface, while humans remain necessary for novel and contextual harm judgments.

“The framework enables coverage of the risk landscape that would be impossible with fully manual testing”summary, stated
“Despite automation capabilities, human judgment remains essential in AI red teaming.”summary, stated

Testing focus

Chose system-level adversarial testing over model-only vulnerability testing.

Rationale: Integrated products include filters, infrastructure, databases, plugins, and cloud resources that create attack paths beyond the model.

“The paper advocates for a system-level adversarial mindset.”summary, stated
“Attacks that combine multiple techniques across the system stack are often most effective.”summary, stated

Security goal

Chose raise attacker cost through defense-in-depth and repeated mitigation over treating AI safety as a solved technical problem.

Rationale: The paper argues that sufficiently long prompts can elicit non-zero-probability outputs, so practical defense is continuous improvement.

“The paper pushes back against the notion that AI safety is a solvable technical problem.”summary, stated
“the goal is to increase the cost required to successfully attack a system beyond the value an attacker would gain.”summary, stated

Gotchas (what bit them)

Academic attacks can distract from the attacks real users attempt.

Root cause: Gradient methods often require model access and compute, while practical attackers use prompts and simple transformations.

Resolution: Prioritize realistic, simple jailbreaks and system-level attacks in red-team coverage.

“real attackers don't compute gradients, they prompt engineer.”summary, stated
“Simple techniques like manually crafted jailbreaks (Skeleton Key, Crescendo) and basic image manipulations often work better in practice.”summary, stated

RAG and plugins create cross-prompt injection paths.

Root cause: Untrusted retrieved content can carry hidden instructions that alter model behavior or exfiltrate data.

Resolution: Combine system-level mitigations, input sanitization, instruction hierarchy, and an assumption that untrusted input can produce arbitrary output.

“AI-specific vulnerabilities include cross-prompt injection attacks (XPIA) in RAG architectures”summary, stated
“malicious instructions hidden in retrieved documents can alter model behavior or exfiltrate data.”summary, stated

Responsible-AI harms are hard to measure like conventional bugs.

Root cause: Outputs are probabilistic, causal explanations are limited, and harm definitions are subjective and policy-dependent.

Resolution: Use human review, policy detail, and culturally aware evaluation in addition to automated scoring.

“Responsible AI harms are pervasive but difficult to measure”article, stated
“The notion of harm requires detailed policy covering a wide range of scenarios.”summary, stated

Traditional appsec still matters inside AI products.

Root cause: AI systems are deployed as software systems with dependencies, transmission methods, video processing components, and APIs.

Resolution: Continue traditional security testing alongside AI-specific red teaming.

“LLMs amplify existing security risks and introduce new ones”article, stated
“SSRF in Video Processing: Found a server-side request forgery vulnerability in a GenAI video processing system due to an outdated FFmpeg component”summary, stated

Evaluation

Evaluation is red-team based: define system and actor, select tactics and techniques, use PyRIT automation for prompt transformations and scorers, review impacts with human experts, and repeat break-fix mitigation cycles.

Metrics: number of products red-teamed · number of operations · security impact categories · safety impact categories · successful jailbreak/prompt-injection paths · automated scorer outcomes · human expert harm assessment

3 supporting quotes
“Since 2021, AIRT has conducted over 80 operations covering more than 100 products.”summary, stated
“PyRIT (Python Risk Identification Tool), an open-source framework for AI red teaming.”summary, stated
“Despite automation capabilities, human judgment remains essential in AI red teaming.”summary, stated

Outcomes

The work spans more than 100 Microsoft generative AI products and over 80 operations since 2021, according to the project summary.

3 supporting quotes
“Based on our experience red teaming over 100 generative AI products at Microsoft”article, stated
“we present our internal threat model ontology and eight main lessons we have learned”article, stated
“we offer practical recommendations aimed at aligning red teaming efforts with real world risks.”article, stated