Test safely / Module 11

Make AI red teaming repeatable, scoped, and decision-relevant

Combine human creativity, automated probes, deterministic checks, and regression suites without mistaking volume for coverage.

70 minutes Intermediate Practical lab
01

Red teaming is a campaign, not a prompt list

Start with objectives, assets, threat actors, scope, rules of engagement, success criteria, data handling, and stop conditions. Choose scenarios that test the system's highest-consequence boundaries.

Human testers are good at novel context and business logic. Automated tools provide repeatability and scale. Deterministic checks verify schemas, permissions, and outcomes. Mixed testing is stronger than any one method.

02

Use tools as harnesses

PyRIT helps structure objectives, targets, converters, scorers, and multi-turn orchestration. garak combines probes, generators, detectors, and evaluation. Their interfaces evolve, so follow current project documentation and pin the tested version.

Run against a dedicated endpoint or local fixture with test data, spending limits, rate limits, and complete logging. Review probe datasets for policy and privacy before execution.

  • Record tool version, model version, configuration, seed data, and date.
  • Separate model failure, application failure, and scoring failure.
  • Manually review samples before turning a score into a finding.
  • Retest after mitigation and preserve the original failing case.
  • Track untested areas and assumptions as explicitly as failures.
03

Coverage needs a model

Thousands of similar prompts can produce a large report with little coverage. Map tests to threat scenarios, input channels, user roles, languages, tools, data classes, and model versions.

Automated red teaming can discover more diverse failures, but current research still combines it with human and third-party testing, layered safeguards, and runtime monitoring.

A red-team result is complete only when someone owns the mitigation, the retest, and the residual risk.

Practice

Plan a ten-case model assessment

Safety boundary: Use a local echo model, test endpoint, or provider-approved evaluation project only.

  1. 01

    Select one invariant and three failure families.

  2. 02

    Write ten benign test cases with expected outcomes and a review rubric.

  3. 03

    Choose a current PyRIT or garak workflow from official documentation.

  4. 04

    Run the cases, manually review the evidence, and separate harness errors from target behavior.

  5. 05

    Turn one confirmed failure into a regression case and mitigation owner.

Checkpoint

Ready to move on?

Go deeper

Primary sources for this module

All resources
Previous module10 · Design detection around behavior, evidence, and analyst capacity Next module12 · Constrain AI agents with identity, policy, and small tools
Share this module LinkedIn Email Permanent link