At DEF CON in August, the AI Village hosted the largest public red-teaming exercise of AI systems yet: thousands of participants spent time trying to make large language models from several leading AI companies misbehave. They attempted to extract data, bypass safety rules, produce misinformation and expose biases. The event had backing from the White House. In July, the administration also announced voluntary commitments from leading AI companies that include internal and external red-teaming of their models before release.
Microsoft and Google have both published descriptions of their dedicated AI red teams this summer. AI red teaming has become a recognised practice. What does it involve, and how should an organisation that is deploying LLMs, rather than building them, approach it?
What AI red teaming covers
Traditional red teams emulate attackers to test an organisation's defences. AI red teaming borrows the term but covers a broader set of failures:
Security failures:
- prompt injection, direct and indirect,
- data leakage, such as system prompts, training data or other users' data,
- abuse of tools and plugins the model can use,
- insecure handling of model output by the surrounding application, and
- denial of service and cost abuse.
Harmful or unreliable behaviour:
- generating dangerous, illegal or abusive content,
- confidently wrong answers in high-stakes domains,
- biased or discriminatory output, and
- behaviour that contradicts the organisation's policies or brand.
For most deploying organisations, both matter. A support assistant that can be tricked into offering unauthorised refunds is a security problem and a business problem.
What is different about testing LLMs
Results are probabilistic. The same prompt can succeed on one attempt and fail on the next. Testers need to run attacks many times and report success rates, not just "found / not found".
The attack surface is language. There are effectively infinite ways to phrase an attack. Creativity, persistence and knowledge of how models behave matter as much as tooling.
Fixes are often mitigations. Changing a prompt or adding a filter may reduce a problem without eliminating it. Retesting after every change is essential.
Models change. A provider's model update can reopen issues you thought were fixed, or close ones you were relying on as test cases.
How to run an AI red team exercise
flowchart LR S[Scope & threat model<br/>who, what harm, which paths] --> P[Plan test cases<br/>security + harm categories] P --> E[Execute<br/>manual creativity +<br/>automated variations] E --> M[Measure<br/>success rates,<br/>severity] M --> F[Fix & mitigate<br/>architecture first] F --> R[Retest &<br/>add to regression suite] R --> E
1. Scope and threat-model the application. Who uses it? What data and tools can it reach? What would a serious failure look like: data exposure, fraud, harmful advice, reputational damage?
2. Assemble the right team. Combine offensive security testers with domain experts (a clinician for a health assistant, a lawyer for a legal tool) and people with diverse backgrounds who can spot biased or harmful outputs others miss.
3. Test the whole system, not just the model. Most serious findings involve the application around the model: retrieval that ignores permissions, tools with excessive privileges, or output rendered unsafely.
4. Combine manual and automated testing. Humans find novel attacks; automation runs many variations and repeats tests to measure success rates.
# Measuring an attack's success rate rather than a single pass/fail
def attack_success_rate(app, attack_prompt, judge, trials=20):
successes = 0
for _ in range(trials):
reply = app.chat(attack_prompt)
if judge(reply): # e.g. did it reveal the system prompt / call a forbidden tool?
successes += 1
return successes / trials5. Prioritise architectural fixes. Removing a tool's delete permission beats a prompt that says "never delete anything".
6. Build a regression suite. Every successful attack becomes a test case that runs whenever the prompt, model or tools change.
Common findings in deployed applications
In the LLM applications we have tested this year, the most frequent issues are:
- system prompts containing information that should not be public,
- retrieval that returns documents the user is not entitled to,
- assistants that can be talked into policy violations (discounts, refunds, commitments),
- indirect injection through uploaded documents or retrieved web content, and
- model output rendered as HTML without encoding.
The bottom line
AI red teaming extends security testing to a new kind of component, one that is probabilistic, language-driven and capable of harms beyond classic breaches. Organisations deploying LLMs should red-team the whole application before launch, measure success rates rather than single results, fix problems architecturally where they can, and retest continuously as models and prompts change.
Our red teaming and application security testing services now include AI red teaming for LLM-powered applications.