Testing generative AI and red teaming
See why a text or image generator is hard to test, how a second model and benchmark suites help, and how a red team attacks a system on purpose in five steps.
L1–L4 are part of the Pro pass
L0 Explain simply
Analogy: a game of capture the flag. One team guards a flag. A second team tries on purpose to take it. The attackers find the weak spots before a stranger does. Then the guards fix them.
Daily List is a to-do list app. Leo, the developer, adds a helper that writes friendly reminders. Tom, the tester, cannot check each possible request. People can type anything, in any order, with any mood.
So Tom does two jobs. First he tests the helper the usual way, with prompts and checks. Second he asks a small team to attack it. The attack is called . Its aim is to uncover harmful capabilities, unsafe outputs and system weaknesses before users encounter them and as the system changes.
The picture has limits. In the game, the flag is clear. In the app, no one can list each harmful thing the helper might say.
(SYNTHETIC / TRAINING ONLY: Daily List and every person named in this lesson are invented.)
PICTURE IT
The picture is the one the lesson above opens with. The table below shows how each part of it matches the software.
THE REAL JOB Planning and running a red team on a GenAI feature, and testing it on the other days.
- Assemble a team
- Give safe access
- Prompt the system
- Analyse the failures
- Build datasets
HOW THE PICTURE MAPS
| In the picture | In the software |
|---|---|
| The guards of the flag | The blue team that defends a live system |
| The team that tries to take the flag | The red team |
| Weak spots found in the game | Harmful behaviours found by prompts |
| Fixing the fence after the game | Datasets and fixes built from the failures |
| All the ways to cross the field | The attack space and the input explosion |
WHERE THIS PICTURE STOPS
- In the game the flag is clear, but nobody can list every harmful output.
- A game ends, while a live system needs defending all the time.
HOOK
Team, access, prompt, analyse, datasets.
REMEMBER IT THIS WAY
A sequence: the real steps, in order.
TAPAD: the first letters of the five steps.
| In the trick | What it stands for |
|---|---|
| Team | assemble a diverse team |
| Access | safe test access |
| Prompt | prompt the system |
| Analyse | analyse the failures |
| Datasets | build datasets |
TELL A FRIEND
A red team attacks your own system on purpose, in five steps, so you find the weak spots before users do. A defends the live one.
OFTEN MIXED UP WITH Safety, prompt injection, monitoring and human oversight. That lesson covers safety, injection and live monitoring in a product. This lesson covers the planned five-step attack and how GenAI testing works as a whole.
PRACTISE AND KEEP
Sources for this topic — 3 sources
- Market practice
Certified Tester Artificial Intelligence Testing Syllabus v2.0 (International Software Testing Qualifications Board) ↗ — International Software Testing Qualifications Board (ISTQB) · Section 4.2.1: testing generative AI: black-box prompts, input explosion problem, parameters, context window, a second model as checker, non-functional measures, benchmark suites; version 2.0 GA (17 April 2026), mirror copy of the publisher PDF, version checked against front matter, opened
Actual iSQI-hosted publisher PDF and version front matter inspected. Exact section/page coverage and limits are recorded in the v35 Specialist analysis ledger. Simplified source statements are contextualised separately in lessons, not silently represented as universal technical laws. No source figure or extended copyrighted extract copied.
- Market practice
Certified Tester Artificial Intelligence Testing Syllabus v2.0 (International Software Testing Qualifications Board) ↗ — International Software Testing Qualifications Board (ISTQB) · Section 4.2.2: red teaming of AI-based systems: five-step approach, manual and automated strategies, comparison with blue teaming; version 2.0 GA (17 April 2026), mirror copy of the publisher PDF, version checked against front matter, opened
Actual iSQI-hosted publisher PDF and version front matter inspected. Exact section/page coverage and limits are recorded in the v35 Specialist analysis ledger. Simplified source statements are contextualised separately in lessons, not silently represented as universal technical laws. No source figure or extended copyrighted extract copied.
- Simplified educational illustration
Payments Signal editorial teaching models — Payments Signal
What this simplifies: Daily List, Sam, Nina, Tom, Mei, Leo and Lily are invented, and so are the numbers and examples in this lesson. The lesson is a simplified teaching view; the syllabus and the standards it names go into more detail. This lesson is not a certification of the International Software Testing Qualifications Board (ISTQB) and is not accredited exam preparation.
Used wherever diagrams, scenarios, figures, or example values are didactic constructions rather than sourced facts; every such use carries a simplifications disclosure. All people, companies, banks, and list entries in examples are fictional.
Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.