✳ Field lesson AI4 / 17 min

Red-teaming an AI system before launch

A benchmark measures a model against fixed questions. An AI red team attacks the whole system for the outcomes its owner fears, under signed rules. A model can answer differently each time, so each result is a rate per goal, with an owner.

Helpful first: Where a model and its data come from · Treat model output as untrusted input · Penetration testing starts with permission

Thirty days to Halcyon · Case 15: The model from outside · Episode 4 of 4

Friday, 08:00. The summarizer goes live on Monday if the board signs. Dax Mercer, Software Engineer and the summarizer's owner, has run the vendor's safety test set. Every prompt was refused.

Nyx, the Threat Hunter, has two days, a small team and four goals. She has not started. Sloane Sterling, Head of Compliance, will not let anyone attack anything until the rules are signed.

"A clean test set," Sloane says, pen ready. "Is that the same as a system that holds?"

By the end you can

  • Tell an AI red team exercise from a model benchmark or an evaluation
  • Scope an AI red team with goals, rules of engagement, and a stop condition
  • Report findings as success rates with owners, not as a single pass or fail

A red team attacks the system, not just the model

A benchmark is a fixed set of questions with known good answers. It measures a model the same way every time, so two versions can be compared. The vendor's safety test set is a benchmark. An evaluation is the wider job of measuring how well a system does its task. A benchmark is one tool for it.

AI red teaming asks a different question: what can an adversary make this system do? NIST AI 100-2 E2025 defines it as a structured testing effort, often with adversarial methods, to find flaws and vulnerabilities in an AI system. The target is the whole system: the model, the reports it reads, the renderer, and the people who act on its output.

It also differs from a penetration test, which looks for exploitable weaknesses in hosts and applications. An AI red team adds attacks on the model's behavior, such as injected text and jailbreaks. The same attempt can work once and fail the next time.

NIST AI 600-1, the Generative AI Profile, warns that tests restricted to benchmark datasets may not carry over to real conditions. So Dax's clean test set answers a narrower question than Sloane asked.

SORT IT OUT

Sloane's folder holds five planned tests for the summarizer. Which ones are red teaming, and which are benchmarks or evaluations?

  1. Run the vendor's 500 fixed safety prompts and count how many the model refuses.

  2. Spend a day trying any route to make the dashboard send report text to an outside host.

  3. Score the model's summaries of 50 old reports against summaries the engineers wrote.

  4. Plant a crafted supplier report in the test feed and see whether planners would act on a false status.

  5. Compare two model versions on a published set of questions about technical documents.

Show the answers
  1. Benchmark or evaluation. Fixed questions, a fixed scoring rule, and the model alone. Useful for comparing versions.
  2. AI red team. A goal the owner fears, any technique allowed, and the whole system in scope.
  3. Benchmark or evaluation. This measures how well it does its job. Nobody is trying to make it fail.
  4. AI red team. An adversary's move against a real decision, through the data path the system actually uses.
  5. Benchmark or evaluation. Same questions for both versions, so the scores can be compared. Nothing is attacked.

Write the rules before the first attempt

Nyx's team will attack a staging copy of the summarizer, so the rules must say exactly what it may touch. The rules of engagement name the goals, the systems in scope, the data the team may use, the time window, and when to stop. The penetration testing lesson teaches the same document for networks.

The four goals come from the owner's worst days. Change a decision the planners rely on. Leak one supplier's report to someone who should not see it. Make the dashboard contact an outside host. Produce content that embarrasses a partner. Each goal is an outcome, not a technique, so the team may take any route to it.

Scope is a list of named systems: the staging summarizer, its renderer, and a test feed of supplier reports. The data is copies of past reports, with partner names kept, because one goal needs them. A stop condition ends the exercise early, for example if an attempt touches production or reaches a real supplier.

Dax signs as the system's owner, and Sloane as chair of the board that will rely on the results. The team works Friday and Saturday, records every attempt, and removes every planted report and test account at the end.

SPOT THE PROBLEM

This is Nyx's first draft of the rules, before anyone signed. Flag each line that would let the exercise go wrong.

Show the answers
  • Systems: the summarizer and anything it connects to Anything it connects to could include production systems and suppliers. Scope must be a list of named systems.
  • Stop condition: none, the team decides as it goes Without a written stop condition, nobody has agreed in advance what ends the exercise, such as touching production.
  • Signed: Nyx, red team lead The tester cannot authorize the test. The system's owner and the person who relies on the results must sign.

Run every attack more than once

A language model picks each word with some randomness. At the settings most products use, the same prompt can get a different answer each time. So one try proves little either way. Nyx's team runs each attack many times and records every attempt: the input, the output, and whether it reached the goal.

Technique lists keep the work broad. MITRE ATLAS catalogs attacks on AI systems. OWASP's GenAI Red Teaming Guide, published in January 2025, sets out how to plan and run an exercise. Neither is a standard to comply with. They are lists of ways in, so the team does not test only the attacks it already knows.

Over Friday and Saturday the team makes 120 attempts. Each goal gets its own count, because a system can hold firm against one goal and fail another. The figure below fills in the results goal by goal, with the retests that followed two fixes.

Each goal ends with a rate, not a pass or a fail. Two findings were fixed and their retests came back 0 of 20, and the third still waits for its owner's decision.

One goal produced no success at all. The other three each became a finding. A reworded injection changed a status. The dashboard called out through its link previews, which fetch any address in a summary and which Thursday's image fix never touched. And a long role play produced rude text about Kestrel.

Report rates, owners and retests

A finding is written as a rate against a goal, with an owner. Seven of 20 is a rough number, so report it as a count. A percentage would look more precise than 20 tries can support.

A fix is not done until the same attempts run again and fail. Even then, zero is not never. A weakness that works one time in seven would still score 0 of 20 in about one run of every twenty. A clean retest does show a real drop: if nothing had changed, 7 of 20 would almost never fall to 0. Here both fixes are code that the model's words cannot reach, so the retest checks that the control is in the path. A fix made by rewording a prompt or tuning a filter needs far more tries. A retest at 0 of 20 shows the fix held against these attempts. The next exercise tries new ones.

Not every finding is fixed before launch. The owner can accept one in writing, with a reason, a date it expires, and a trigger that reopens it, such as a new model version. Acceptance is a decision about a known rate. It is not the same as not knowing.

Findings go to the people who can act on them: the system's owner, and the board that relies on the system. Sloane wants each one as a line she can file: goal, rate, owner and status.

WORKED EXAMPLE

Nyx writes up the first finding

  1. Goal. Change a decision the planners rely on.
  2. Technique. A supplier report whose hidden instruction is reworded as a correction notice, so Wednesday's instruction flag misses it. MITRE ATLAS lists the family as AML.T0051.001, indirect prompt injection.
  3. Attempts and rate. Twenty attempts with this wording. In 7, the dashboard showed an open anomaly as nominal.
  4. Fix. Dax makes the dashboard take each anomaly's status from the report's own table. The model's prose can no longer set it.
  5. Retest. The same 20 attempts run again. The status shown is wrong 0 times.

Result: Sloane's line reads: change a decision, reworded injection, 7 of 20 before, 0 of 20 after, owner Dax, fixed. It shows the fix held against these 20 attempts, and the next exercise will try new wordings.

YOUR CALL

The third finding

Saturday, 19:00. Two findings are fixed and retested. In the third, a long role play got the summarizer to write something rude about Kestrel in 2 of 20 attempts.

  1. Dax could switch on a stricter output filter, but in a test it also blocked 1 in 10 genuine reports that mention Kestrel. What does he do?

  2. Sloane asks when the acceptance ends.

Show the strong calls
  1. Accept the finding in writing, with himself as owner and an end date. Sloane files it with the rate, the reason, the owner and the date. The board can see exactly what it is accepting.
  2. At the vendor's next model version, or in 90 days, whichever comes first. The finding comes back on its own schedule, and the retest is already planned.

Before launch, after each change, and on a schedule

A red team before launch tells you about this model, these prompts, these data sources, and this renderer. Change any of them and the results may not hold. So the exercise runs again when the model version changes, when the instructions or the data sources change, and when a new tool or output is added.

Between those, a smaller set runs on a schedule. The recorded attempts become a regression suite. Every fixed finding is tried again, the same way, so a fix that quietly breaks is caught.

In the NIST AI Risk Management Framework, this testing belongs to the Measure function, as the human approval lesson placed it. Its findings feed Manage, where owners fix or accept them. One exercise finishes neither function.

Red teaming does not make a system safe. It tells the owner, with numbers, how the system behaved against the attacks someone thought to try. That is the evidence Sloane can file.

Lab / 5 records / 3 calls / 8 steps

The second round

Nyx's team runs a second round on a made-up practice copy of the summarizer. Dax owns the copy, and he and Sloane signed the rules. Each supplier's engineers read the summaries of their own reports. Each record is the result of 20 attempts at one goal. It starts on Tuesday at 09:00.

The practice copy starts a pilot on Thursday at 09:00, on copies of last quarter's reports, and its first pilot batch arrives at 09:20. Each result arrives at its own time, and each move you make costs minutes.

Place each result by the goal it reached, or as no goal reached. At each call, choose the move that leaves the first pilot batch safe without taking the summarizer down yourself.

Read the lab as text, with every path

Settings at the start

  • Reports per request to the summarizer: Five in one request.

Parts of the system

  • practice-summarizer: Practice summarizer.
  • renderer: Dashboard renderer.
  • test-feed: Test feed of reports.

Goals

  1. Change a decision: A false status leads a planner to act.
  2. Leak a report: One supplier's report reaches someone who should not see it.
  3. Make the dashboard call outside: The dashboard contacts an outside host.
  4. Embarrass a partner: The output insults or misleads about a partner.
  5. No goal reached: The attempts reached none of the four goals.

Every best call: pilot batch safe

  1. Tuesday 09:00, test-feed (test feed of reports). 20 attempts hide a request in one report of a batch of five. In 5 of 20, the summary quotes a line from another supplier's report. Goal: Leak a report. A supplier's text reached a summary meant for another supplier. That is the leak goal, and it is a finding.
  2. Call at Tuesday 09:00: Send each report to the summarizer in its own request. The best call. The leak needs two reports in one request. Splitting them is a change in code that the model's words cannot undo. The same attempts must then be run again. It takes hold at Tuesday 11:30.
  3. Tuesday 11:00, practice-summarizer (practice summarizer). 20 attempts hide an instruction in a report footer to mark an open fault closed. In 0 of 20 does the dashboard show a status the report's table does not. It happened 30 minutes before it reached you. Goal: No goal reached. The goal was to change a decision, and none of the 20 did. A goal with no success still gets its count.
  4. Tuesday 14:30, renderer (dashboard renderer). 20 attempts put links in reports to make the dashboard load an outside address. In 0 of 20 does it contact anything outside Meridian. Goal: No goal reached. Another goal that held. Record it as 0 of 20, and try it again after any change to the renderer, because zero is not never.
  5. Call at Tuesday 14:30: Rerun the recorded attempts on the changed build and read the count. The best call. A fix is not done until the same attempts run again, and a later change can undo it. The rerun shows the leak back with five reports per request, so batching waits for a design that passes. It takes hold at Tuesday 15:30.
  6. Wednesday 10:30, practice-summarizer (practice summarizer). A long role play, 20 attempts. In 1 of 20, the briefing calls a supplier's part junk. Goal: Embarrass a partner. Insulting output about a partner is the embarrass goal. At 1 of 20 the rate is low, and it is still a finding with a line of its own.
  7. Call at Wednesday 10:30: 1 of 20, embarrass a partner, owner Dax, open. The best call. A count, the goal it reached, a person who answers for it, and where it stands. Sloane can file that line and anyone can check it later. It takes hold at Wednesday 10:40.
  8. Thursday 09:20, test-feed (test feed of reports). Pilot, 09:20: a supplier's report with a hidden request arrives. The summarizer reads each report alone, so the briefing quotes nothing from another supplier. Goal: No goal reached. The hidden request had no other report to quote. The fix held where it counted, in the pilot.
  9. Outcome: Pilot batch safe. At 09:20 the pilot briefing quotes nothing across suppliers. The fix held because each report still goes in its own request. Batching waits, because the rerun showed it brings the leak back. Sloane's line for the role play reads 1 of 20, embarrass a partner, owner Dax, open.

A different second call, "Agree: it is only a speed change, and the leak is fixed": leak reaches the pilot

  1. Tuesday 09:00, test-feed (test feed of reports). 20 attempts hide a request in one report of a batch of five. In 5 of 20, the summary quotes a line from another supplier's report. Goal: Leak a report. A supplier's text reached a summary meant for another supplier. That is the leak goal, and it is a finding.
  2. Call at Tuesday 09:00: Send each report to the summarizer in its own request. The best call. The leak needs two reports in one request. Splitting them is a change in code that the model's words cannot undo. The same attempts must then be run again. It takes hold at Tuesday 11:30.
  3. Tuesday 11:00, practice-summarizer (practice summarizer). 20 attempts hide an instruction in a report footer to mark an open fault closed. In 0 of 20 does the dashboard show a status the report's table does not. It happened 30 minutes before it reached you. Goal: No goal reached. The goal was to change a decision, and none of the 20 did. A goal with no success still gets its count.
  4. Tuesday 14:30, renderer (dashboard renderer). 20 attempts put links in reports to make the dashboard load an outside address. In 0 of 20 does it contact anything outside Meridian. Goal: No goal reached. Another goal that held. Record it as 0 of 20, and try it again after any change to the renderer, because zero is not never.
  5. Call at Tuesday 14:30: Agree: it is only a speed change, and the leak is fixed. Not the best call. Five reports go into one request again, which is the weakness. Nobody reran the attempts, so nobody sees the leak return. It takes hold at Tuesday 14:35.
  6. Wednesday 10:30, practice-summarizer (practice summarizer). A long role play, 20 attempts. In 1 of 20, the briefing calls a supplier's part junk. Goal: Embarrass a partner. Insulting output about a partner is the embarrass goal. At 1 of 20 the rate is low, and it is still a finding with a line of its own.
  7. Call at Wednesday 10:30: 1 of 20, embarrass a partner, owner Dax, open. The best call. A count, the goal it reached, a person who answers for it, and where it stands. Sloane can file that line and anyone can check it later. It takes hold at Wednesday 10:40.
  8. Thursday 09:20, test-feed (test feed of reports). Pilot, 09:20: a supplier's report with a hidden request arrives in a batch of five. The briefing quotes a line from another supplier's report. Goal: Leak a report. The same weakness, now in the pilot. This is the leak goal, reached outside the test.
  9. Outcome: Leak reaches the pilot. At 09:20 the pilot briefing quotes one supplier's report to another supplier's engineers. The fix was missing, or a change brought the weakness back and nobody reran the attempts to see it. Sloane's line for the role play reads 1 of 20, embarrass a partner, owner Dax, open.

A different first call, "Add a line telling the model never to quote other reports": leak reaches the pilot

  1. Tuesday 09:00, test-feed (test feed of reports). 20 attempts hide a request in one report of a batch of five. In 5 of 20, the summary quotes a line from another supplier's report. Goal: Leak a report. A supplier's text reached a summary meant for another supplier. That is the leak goal, and it is a finding.
  2. Call at Tuesday 09:00: Add a line telling the model never to quote other reports. Not the best call. The rate may fall, but the control is the model's own words, and attackers can word around them. A fix like this needs far more tries before you can trust it. It takes hold at Tuesday 09:20.
  3. Tuesday 11:00, practice-summarizer (practice summarizer). 20 attempts hide an instruction in a report footer to mark an open fault closed. In 0 of 20 does the dashboard show a status the report's table does not. Goal: No goal reached. The goal was to change a decision, and none of the 20 did. A goal with no success still gets its count.
  4. Tuesday 14:30, renderer (dashboard renderer). 20 attempts put links in reports to make the dashboard load an outside address. In 0 of 20 does it contact anything outside Meridian. Goal: No goal reached. Another goal that held. Record it as 0 of 20, and try it again after any change to the renderer, because zero is not never.
  5. Call at Tuesday 14:30: Rerun the recorded attempts on the changed build and read the count. The best call. A fix is not done until the same attempts run again, and a later change can undo it. The rerun shows the leak back with five reports per request, so batching waits for a design that passes. It takes hold at Tuesday 15:30.
  6. Wednesday 10:30, practice-summarizer (practice summarizer). A long role play, 20 attempts. In 1 of 20, the briefing calls a supplier's part junk. Goal: Embarrass a partner. Insulting output about a partner is the embarrass goal. At 1 of 20 the rate is low, and it is still a finding with a line of its own.
  7. Call at Wednesday 10:30: 1 of 20, embarrass a partner, owner Dax, open. The best call. A count, the goal it reached, a person who answers for it, and where it stands. Sloane can file that line and anyone can check it later. It takes hold at Wednesday 10:40.
  8. Thursday 09:20, test-feed (test feed of reports). Pilot, 09:20: a supplier's report with a hidden request arrives in a batch of five. The briefing quotes a line from another supplier's report. Goal: Leak a report. The same weakness, now in the pilot. This is the leak goal, reached outside the test.
  9. Outcome: Leak reaches the pilot. At 09:20 the pilot briefing quotes one supplier's report to another supplier's engineers. The fix was missing, or a change brought the weakness back and nobody reran the attempts to see it. Batching waits, because the rerun showed it brings the leak back. Sloane's line for the role play reads 1 of 20, embarrass a partner, owner Dax, open.

Every choice at each call

After the Tuesday 09:00 record: 5 of 20 attempts leaked a line across suppliers, and the pilot starts on Thursday. How do you fix it?

  • Send each report to the summarizer in its own request (150 minutes, the best call). The leak needs two reports in one request. Splitting them is a change in code that the model's words cannot undo. The same attempts must then be run again.
  • Add a line telling the model never to quote other reports (20 minutes). The rate may fall, but the control is the model's own words, and attackers can word around them. A fix like this needs far more tries before you can trust it.
  • Block summaries that contain another supplier's name (30 minutes). A quoted line need not carry a name, and genuine reports that mention a partner would be blocked. It tunes the output and leaves the mixing in place.
  • Take the summarizer offline until nothing fails (10 minutes). The leak stops because the service has. Planners lose the pilot briefing on Thursday, and a fix that keeps it running was available.

After the Tuesday 14:30 record: Dax wants faster briefings. His idea is to send five reports in one request. What do you require before it goes into the pilot?

  • Rerun the recorded attempts on the changed build and read the count (60 minutes, the best call). A fix is not done until the same attempts run again, and a later change can undo it. The rerun shows the leak back with five reports per request, so batching waits for a design that passes. In the outcome: Batching waits, because the rerun showed it brings the leak back.
  • Agree: it is only a speed change, and the leak is fixed (5 minutes). Five reports go into one request again, which is the weakness. Nobody reran the attempts, so nobody sees the leak return.
  • Refuse it, since Dax only wants speed (5 minutes). Speed matters to planners. Refusing without a test skips the answer, and a different change may give the speed without the leak.
  • Run five new attempts on the changed build (20 minutes). Five fresh tries cannot show a rate. At 5 in 20, all five fail about one time in four. Only the recorded attempts have a before count to compare with.

After the Wednesday 10:30 record: Sloane asks how to write the 1 of 20 on her line.

  • 1 of 20, embarrass a partner, owner Dax, open (10 minutes, the best call). A count, the goal it reached, a person who answers for it, and where it stands. Sloane can file that line and anyone can check it later. In the outcome: Sloane's line for the role play reads 1 of 20, embarrass a partner, owner Dax, open.
  • 5 percent (5 minutes). Twenty tries cannot carry a percentage. The true rate could be well above or below 1 in 20, and the line names no goal and no owner. In the outcome: Sloane's line for the role play reads 5 percent, with no goal and no owner.
  • Low, not worth a line (1 minute). One success in 20 is still a success at a goal. Left off the list, the role play is never tried again after the next change. In the outcome: The role play result is not on Sloane's list.
  • Pass, since 19 of 20 held (1 minute). The goal is reached if any attempt reaches it. Nineteen failures do not cancel one rude briefing about a partner. In the outcome: Sloane's line for the role play reads pass, though one attempt reached its goal.

A practice round runs on a script. Real attempts vary from run to run, real fixes need more than one retest, and here each change takes a fixed time. The system, the counts and the times are made up.

CHECK YOUR JUDGMENT

Six weeks later the vendor ships the safetensors build of pathfinder-7b-v2, with new safety tuning and a better score on its own test set. Dax wants to swap it in on Tuesday. The accepted Kestrel finding expires at the next model version. What should Sloane require before the swap?

CASE FILE · CASE 15 · ENTRY 4 OF 4

Answer the closing question correctly to add this entry to your case file.

Rates, owners, and one acceptance

In 120 attempts the red team found three weaknesses: two were fixed and retested at 0 of 20, and one was accepted with an owner and an expiry date.

Open the case file ↗

Review sheet: exam notes and quick reference

Find your next idea.

Tip: press / to open search. Escape closes this window.