Red teaming is adversarial testing: you attack your own system the way a malicious user would, to find failures before others do.
For AI it means jailbreak and injection attempts, data-extraction probes and abuse of tools. Good findings become permanent regression cases in an automated suite that runs in CI.
A one-off exercise finds today’s holes. A suite of attacks that runs on every change protects against regressions. Score outcomes, not wording: did any unauthorised action happen, did any secret leak, is the tool log clean.
Common mistake. Judging a red-team run by whether the model refused. A refusal in words can still be followed by a harmful tool call.
In practice. Define harm in terms of tool calls and data access, replay known attacks against every release, and add new ones from each incident.
Prompt injection is an attack in which text the model reads, typed by a user or hidden in an email, web page or document, contains instructions that override the developer's intent. Indirect injection arrives through retrieved or tool-supplied content. It cannot be fully filtered out, so defences have to limit what a persuaded model can do.
An eval is a repeatable test for software that uses a model. It has a set of inputs, a way to run your feature on them and a grader that scores each output, and it returns a rate instead of a pass or fail. Run it on every change to a prompt, model or retrieval setting.
Guardrails are checks placed around a model: input filters, output validators, classifiers for unsafe content and rules that block certain actions. They reduce risk and catch common failures, but none is perfect against natural language. Treat them as one layer among several, never as the only defence.
Cite this page
Eldan Abdrashim. "Red teaming." Eldan.ai, 23 November 2026. https://eldan.ai/glossary/red-teaming.
The date you read it is added when you copy.
BibTeX
@online{abdrashim2026red,
author = {Eldan Abdrashim},
title = {Red teaming},
organization = {Eldan.ai},
date = {2026-11-23},
year = {2026},
month = nov,
url = {https://eldan.ai/glossary/red-teaming},
langid = {english}
}