Confident AI

Home / Blog / Article

AI Safety

AI Safety Testing: What Red-Teaming Actually Covers

February 3, 2026 — 12 min read — By the Confident AI Team

Red-teaming has become standard vocabulary in AI safety conversations, but the term covers a wide range of activities — from running a few jailbreak prompts to systematic adversarial evaluation programs that model the threat landscape for a specific deployment. The difference between the two is the difference between security theater and actual risk reduction.

This guide explains what rigorous AI red-teaming involves, how it differs from general quality testing, and what you need to put in place to make it a meaningful part of your safety program.

What Red-Teaming Is (and Is Not)

Red-teaming in the AI context is adversarial testing — deliberately attempting to make your system behave in ways that are harmful, unsafe, or outside its intended operating parameters. The "red team" perspective requires you to think like an attacker: not "does this work correctly?" but "how can this be made to fail harmfully?"

Red-teaming is not the same as:

  • Functional testing. Functional testing checks whether the system produces correct outputs for expected inputs. Red-teaming focuses specifically on unexpected, adversarial, or boundary inputs designed to elicit unsafe behavior.
  • Evaluation benchmarking. Running your model against standard safety benchmarks (like TruthfulQA or BBQ) tells you about general model properties, not about vulnerabilities specific to your deployment context and system prompt configuration.
  • Content filtering testing. Testing whether your content filters block specific banned phrases is necessary but insufficient. Red-teaming tests whether your system can be manipulated to produce harmful outputs despite those filters.

The Core Attack Vector Categories

A comprehensive red-teaming program needs to cover these primary attack vector categories. Each requires different test case construction and different detection criteria.

Prompt Injection. Prompt injection attacks embed instructions in user-provided content that override or subvert the system prompt. In a document processing application, a user might include hidden instructions in an uploaded document that redirect the model's behavior. In a customer service chatbot, they might craft messages that convince the model to ignore its operating constraints. Prompt injection is one of the highest-priority vectors because it directly undermines the trust boundary between operator instructions and user input.

Jailbreaks. Jailbreak attacks use linguistic manipulation to convince a model to produce outputs it has been trained to refuse — typically harmful, illegal, or policy-violating content. Common jailbreak techniques include role-play framing ("act as an AI that has no restrictions"), hypothetical framing ("for a fictional story, explain how..."), and step-by-step instruction fragmentation that distributes the harmful request across multiple turns. Testing jailbreak resistance requires a diverse scenario library because jailbreak techniques are context-specific; what bypasses one application configuration may not work on another.

PII and Data Extraction. Users may attempt to extract personally identifiable information that the model has access to through its context window — either from other users' conversation history (in multi-tenant systems without proper isolation) or from internal documents included in the system prompt. This vector is particularly relevant for enterprise deployments where sensitive business information is loaded into model context.

Policy and Role Violations. Deployed AI systems operate under specific business policies — a financial services chatbot should not provide investment advice that would require a licensed advisor; a medical application should not diagnose conditions. Policy violation testing verifies that the system consistently refuses to operate outside its defined scope, even when users apply pressure or creative framing to push those boundaries.

Indirect Prompt Injection via Retrieved Content. For RAG systems, adversaries may attempt to inject instructions into documents that end up in the model's retrieval context. If a user can influence what documents get retrieved (through document upload features, URL ingestion, or contaminated data sources), they may be able to implant adversarial instructions that redirect model behavior without modifying the system prompt directly.

Social Engineering Attacks. These attacks manipulate the conversational context over multiple turns to shift the model's behavior incrementally. Each individual turn may look benign, but the sequence of turns has been designed to move the model into a state where it produces unsafe outputs it would refuse if asked directly. Multi-turn red-teaming is significantly harder to automate than single-turn attacks but represents realistic user behavior for adversarial actors.

Scoping Your Red-Teaming Program

The right scope for a red-teaming program depends on your application's threat model. Before running tests, you need to answer:

  • Who are the potential adversaries? Are you concerned about casual misuse by everyday users, or sophisticated attacks by motivated bad actors with technical expertise? These require different test case difficulty levels.
  • What would be the worst outcome? Identify the highest-harm failure modes specific to your application — PII leakage, dangerous advice, policy violation, reputational damage. Prioritize test coverage around those scenarios.
  • What is your system's trust architecture? The attack surface for a single-user internal tool differs substantially from a public-facing consumer application. Multi-tenant systems have additional isolation requirements.

Automated vs. Human Red-Teaming

Automated red-teaming — running large scenario libraries through your system systematically — provides coverage and repeatability. You can run hundreds of test scenarios in minutes, track which scenarios pass and fail over time, and catch regressions when model updates change vulnerability profiles.

The limitation is that automated red-teaming is bounded by the scenarios in your library. Novel attack techniques — especially those that exploit semantic reasoning in subtle ways or leverage current events as framing — require human red-teamers who can improvise and adapt their approach based on model responses. For high-stakes applications in regulated industries, human red-teaming should supplement automated testing rather than being replaced by it.

A practical hybrid approach: automated red-teaming for continuous regression detection and coverage of known attack vector categories, combined with periodic manual red-teaming exercises by people who were not involved in building the system (to bring genuine outside-perspective adversarial creativity).

What to Do With Red-Teaming Findings

Red-teaming that produces a list of vulnerabilities without a remediation process does not improve safety — it just documents risk. For each identified vulnerability, you need to decide:

  • Is this an acceptable residual risk? Not all vulnerabilities require remediation. Some attack scenarios require such significant sophistication that the likelihood of real-world exploitation is low enough to accept.
  • Is this a system prompt issue or a model issue? System prompt and guardrail updates fix many policy violation vulnerabilities without requiring model retraining. Model-level issues (fundamental alignment failures) are harder to address.
  • Does this need a blocking fix before the next release? High-severity vulnerabilities — PII extraction, prompt injection with data exfiltration potential — should block deployment. Lower-severity issues can be tracked and addressed over time.

Add every identified vulnerability to your automated test suite as a regression test case. The goal is that once you have discovered and fixed a vulnerability, you will automatically detect if a future model update or system prompt change re-introduces it.

Confident AI's red-teaming engine runs 150+ adversarial scenarios automatically.

Industry-specific scenario packs for customer service, legal, medical, and financial applications. Every vulnerability gets severity scoring and remediation guidance. See the red-teaming engine →

← Back to Blog

Test Your AI Before Attackers Do

Confident AI's automated red-teaming finds vulnerabilities before they reach production.

Start Free Trial Explore Platform