liveBook · Manning

Red-teaming

As explained in AI Agents in Action, Second Edition

Red team testing is adversarial testing that probes a system with inputs or patterns intended to expose failures, vulnerabilities, or unsafe behavior.

Red-teaming is adversarial testing: probe a system with terms, phrases, or patterns intended to expose failures, vulnerabilities, or unsafe behavior. Any user-facing agent or agent system should undergo some form of it. section 7.1

Treat red-teaming as one part of a broader evaluation system. Benchmark testing measures known goals, human feedback captures real-world reactions, and automated evaluators judge complex outputs; red-teaming specifically searches for safety breaks. section 7.1 section 7.6

Use red-teaming to strengthen an agent evaluation loop:

  • Probe with targeted terms, phrases, or patterns that could break the system. section 7.1
  • Treat discovered safety breaks as evaluation results rather than isolated incidents. section 7.6
  • Combine red-team results with benchmarks, human feedback, and automated evaluation when appropriate. section 7.1 section 7.6
  • Rerun tests for consistency because agent behavior can vary across attempts. section 7.6

A basic red-team probe

For a user-facing agent, submit a deliberately chosen phrase or pattern intended to trigger unsafe behavior. Record whether the system breaks, then include the result in repeated evaluation and improvement cycles. section 7.1 section 7.6

How AI Agents in Action, Second Edition covers it

How deep it goes
Defines adversarial safety testing and places it in an evaluation loop, but does not detail a full red-team procedure.
Examples
Uses targeted terms, phrases, and patterns as probes, then reruns tests to assess safety and behavioral stability.
What you can do after
Diagnose safety breaks in user-facing agents and feed the findings into iterative evaluation and improvement.
How it connects
Connects red-teaming with agent evaluation, benchmark testing, human feedback, automated evaluators, grounding, and guardrails.

Also explained in

Compare how 6 books explain red-teaming →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of AI Agents in Action, Second Edition. The section links point to the parts of the book it draws on.