PyRIT AIRT RapidResponse scenario for harmful content

Plan and run PyRIT's RapidResponse scenario across hate, fairness, violence, sexual, harassment, misinformation and leakage datasets, with technique choices and a first run sized to your environment.

On this page

What the PyRIT RapidResponse scenario tests and when to run it

PyRIT's AIRT RapidResponse scenario tests whether a target can be induced to generate harmful content across seven harm areas: hate, fairness, violence, sexual, harassment, misinformation and leakage. It is the right first pass when a team is about to ship or materially change a generative AI feature and needs a documented answer to a simple question: under adversarial prompting, does the system produce content it should refuse? Run it before release, after a model or system prompt change, and whenever an assessor or customer asks what was tested for harmful output. The scenario is one packaged AIRT scenario, started through pyrit_scan against a registered target, so the same assessment can be repeated on each build instead of being rebuilt by hand. The techniques named in the PyRIT documentation, role_play_movie_script, many_shot and tap, are documented examples of how the scenario attacks a target. They are not a complete list, and the scenario's output should not be read as a measure of coverage or of how often the target would fail in production.

The scenario is a tool for producing evidence, not for deciding that a system is safe. A pass means the selected techniques and datasets did not elicit flagged output in that run. A fail identifies specific harm areas and techniques that need remediation, such as tighter system prompts, output filtering or a model change, followed by a retest. Confirm with your own risk owner which harm areas apply to your product before you run it. A customer support bot and a creative writing tool carry different exposure to misinformation and sexual content, and the results should be read against that context. Also confirm, in the PyRIT documentation for your installed version, which datasets back each harm area and how the scorers classify responses, because those details determine what a result actually means. Plan for a retest after every fix, and record the target version and configuration with each run so the evidence can be traced later.

Which harm areas map to which datasets

These two harm areas test whether a target produces content that demeans people for who they are, or treats groups unequally. Hate covers attacks, slurs and dehumanizing language aimed at protected characteristics. Fairness covers stereotyped or unequal outputs, such as different treatment of groups in content that could influence hiring, lending or service decisions. The two areas share a scoring problem: a response can be offensive without being hateful, and a biased answer can read as neutral on the surface.

  • Hate: probes whether the target generates demeaning content about protected groups, including when the request is wrapped in fiction or an indirect framing.
  • Fairness: probes whether outputs reflect stereotypes or unequal treatment across demographic groups.
  • Scorer fit: confirm whether each area is scored by an LLM judge, a content safety classifier or custom logic, because a toxicity classifier may miss subtle bias.
  • Dataset contents: confirm the objectives in your installed version, including how many items each area carries and whether any are non-English.
  • Reporting: keep the two areas separate in results, since a fairness failure often needs a different fix than a hate failure.

Before a first run, check the dataset and scorer names in your installed PyRIT version and record which ones applied to each result.

Choosing single-turn or multi-turn techniques for RapidResponse

RapidResponse mixes single-turn prompts with multi-turn attacks, and each technique you add changes both the depth of testing and the number of requests you pay for. The cards below cover the two families, the adversarial model dependency, and the checks to run against your installed PyRIT version before you size a first run.

Single-turn techniques as the baseline

A single-turn technique sends one crafted prompt per objective, such as role_play_movie_script, which wraps the objective in a fictional screenplay frame. Each objective costs roughly one target request plus scoring, so the run is predictable and cheap to repeat. Use single-turn techniques to get broad coverage across the seven harm datasets before you spend budget on deeper attacks. Single-turn results show whether the first refusal holds, not whether a persistent user can wear it down.

AIRT Scenarios docs

Many-shot as a context-heavy attack

The many_shot technique places many example exchanges of harmful-looking dialogue ahead of the objective, so the target is tested on whether long context erodes its safeguards. Requests are larger because each prompt carries the accumulated examples, which raises token cost per objective even when the request count is modest. Check the context window of your target and confirm how the installed version builds the examples before you compare results with single-turn runs.

TAP as an adaptive multi-turn search

TAP (Tree of Attacks with Pruning) uses an adversarial model to generate candidate prompts, scores them, and prunes weak branches before expanding the rest. It finds successful paths that fixed templates miss, but it issues many more requests per objective than a single-turn technique and depends on the adversarial model's quality. Ask for the branch width and depth settings in your installed version, since these determine the request count for a full run.

Adversarial model dependency

Multi-turn techniques such as TAP need a second model to write attack prompts and judge progress, so the adversarial model's own safety behavior, cost and availability become part of your test. A weak adversarial model produces shallow attacks that understate risk, while a strong one raises spend. Hold the target and dataset fixed when you choose one, and record the adversarial model name in memory labels so results can be reproduced.

Trading depth against coverage

A first run that uses only multi-turn techniques across all seven harm datasets can exhaust budget before you learn which categories are weakest. A practical pattern is single-turn techniques across every dataset, then multi-turn techniques on the categories that showed bypasses, with dataset size limited for the first pass. Write the plan down as a request budget per technique so reviewers can see why depth was concentrated where it was.

Confirm techniques and costs in your version

The technique names and their request costs belong to the installed PyRIT release, not to this page. Run the scenario's listing command in your environment to see which techniques are exposed, then measure requests per objective on a small dataset slice before estimating a full run. Ask the team that owns your target for rate limits and per-request pricing, because those figures drive total duration and spend more than the technique list does.

Setting up a first RapidResponse run with pyrit_scan

This sequence takes a team from a clean Python environment to a small, verified RapidResponse run with pyrit_scan. Each step ends with a check, so you know the install, configuration, target and scenario are working before you spend requests on the full dataset.

  1. Confirm a supported Python version

    The engineer running the scan checks the local interpreter before installing anything. The PyPI package supports Python 3.10 up to but not including 3.15, and the PyRIT documentation recommends Python 3.13, so create a virtual environment with that version if your workstation or build image offers it. Done means the interpreter reports a version inside that range and the virtual environment activates cleanly.

  2. Install PyRIT with pip

    Inside the activated virtual environment, install the pyrit package from PyPI with pip. Pin the version you plan to use in your team's records so later runs are repeatable, and confirm the release you installed against the project's releases page before testing. Done means pip completes without dependency errors and the pyrit_scan command is available on the path.

  3. Create the credentials and settings files

    Create ~/.pyrit/.env for the credentials that the target and scorer need, and ~/.pyrit/.pyrit_conf for default settings. Keep keys out of shell history and out of any file that is committed to a repository, and restrict file permissions to the engineer running the scan. Done means both files exist in the home directory of the user who will run the scan, and the credentials file contains only the keys your chosen target and scorer require.

  4. Register the target you will test

    Register the model or application endpoint that RapidResponse will attack, using the target configuration your team has agreed for this assessment. Use a non-production endpoint or a test deployment where possible, and confirm with the system owner which system prompt and safety settings apply. Done means the target appears in the target list when you run the command that lists registered targets, and a single test prompt returns a response from the expected system.

  5. Confirm the RapidResponse scenario is listed

    List the available scenarios with pyrit_scan and confirm that the AIRT RapidResponse scenario appears in the output. Record the scenario name exactly as printed, because the run command must match it. Done means the listing shows RapidResponse and the target you registered in the previous step is visible to the scanner.

  6. Limit the dataset for the first pass

    Start the RapidResponse run with a small dataset limit so the first pass checks the wiring rather than the full harm coverage. Choose the harm datasets you need (hate, fairness, violence, sexual, harassment, misinformation and leakage) and one technique, either single-turn such as role_play_movie_script or multi-turn such as many_shot or tap, based on the scope your team agreed. Done means the command you wrote includes the scenario name, the target, the chosen techniques and an explicit limit on objectives per dataset.

  7. Check the output location and results

    After the limited run finishes, open the output location the run reports and confirm that results, conversations and scores were written. Read a sample of attack conversations and scores to check that the scorer and the target responded as expected, and confirm that the memory store recorded the run under the label you set. Done means you can locate the results for this run, each dataset ran or reports a clear reason for skipping, and the team agrees the setup is ready before a larger run.

Options for scope, techniques and first-run size

This table compares the configuration choices that shape a RapidResponse run: which harm areas to include, single-turn or multi-turn techniques, dataset limits, the adversarial model and the target type. Read each row as a trade-off between coverage, request volume and the time it takes to get a first result. The main takeaway is that a small, single-turn, single-target first run is the fastest way to validate the setup before widening scope.

OptionWhen it fitsWhat it costs in time or requests
Harm areas (all seven or a subset)Use a subset when a use case or policy names specific harms; run all seven for a baseline across the scenario's categoriesEach added harm area adds its objectives to the run, so request volume and review time grow with the number of areas selected
Single-turn techniquesFirst runs and regression checks, where you need a quick signal on whether the target produces harmful output at allLowest request count per objective; results are quicker to review, though they miss failures that only appear across a conversation
Multi-turn techniques (for example, tap)When single-turn results look clean but the target may still be steered over several turns, or when you need deeper coverage before releaseEach objective becomes a conversation of several turns, and an adversarial model and scorer are called at each step, so runs take longer and cost more
Dataset size limitA first run should use a small limit so you can read outputs and fix configuration errors before scaling upSmaller limits finish faster and cost less but give a thinner signal; raise the limit only after the first run completes cleanly
Adversarial model for multi-turn techniquesPick a capable model you are allowed to use for attack generation, and keep it fixed across comparison runsA stronger or larger model usually adds latency and per-call cost; confirm pricing and quotas with the model provider rather than assuming them
Target type: OpenAI or Azure endpointDirect model access with a stable API, the simplest path for a first runFewest moving parts; check rate limits and content filter settings on the deployment, since these affect the results
Target type: custom HTTP or WebSocket endpointYour application wraps the model with its own system prompt, retrieval or safety layer, so the application is what you need to testRequires an adapter that matches your request and response format; expect integration work before the first run starts
Target type: Playwright web appThe risk sits in a rendered chat interface, such as UI-side filters or session handling, that an API call would bypassSlowest per request because each prompt drives a browser session; selectors and page changes can break runs, so budget time for upkeep

How to size a first run so results are readable

Keep the first RapidResponse run small so that every result can be read and explained. Limit the run to a handful of objectives per harm area, point it at one registered target, and start with a single technique family, such as the single-turn role_play_movie_script technique, before adding many_shot or tap. A small run lets you check each objective, confirm that the scorer judges responses the way your reviewers would, and find configuration mistakes before they multiply across seven harm areas. Expanding in steps also means that when a result changes, you know which variable caused it.

Run length is driven by several factors that you can measure before the run. Dataset size sets the number of objectives, and each technique multiplies that number. Multi-turn techniques such as tap cost more than single-turn ones because each objective takes several exchanges with the target and with the adversarial model, so depth matters as much as count. Target latency and any rate limits on your endpoint decide how quickly those exchanges complete. Before the first full run, time a small batch against the target and extrapolate from that, rather than relying on an estimate from another environment.

Confirm the concurrency and retry settings in the PyRIT scanner documentation before you start, because they determine how many requests reach your target at once and how failed requests are retried. Check the defaults for your installed version, and set them deliberately for a target with a rate limit or cost per call. Ask your team to agree on the scope in writing: the harm areas, the objective count per area, the techniques and the stopping conditions. That record makes the first results comparable with later runs and gives reviewers a clear basis for judging whether the run was complete.

How a RapidResponse run moves from target to scored memory

A run starts when an operator invokes pyrit_scan with the RapidResponse scenario against a registered target. Objectives drawn from the harm datasets pass through the selected techniques and converters, and the attack sends each prompt to the target endpoint. Responses are scored and the conversations and results are written to PyRIT memory in SQLite or Azure SQL. Check the trust boundary: credentials are read from ~/.pyrit/.env and only the target endpoint sees attack traffic.

Objectives flow from datasets through attacks to the target, then scored results land in memory.

Security and operational risks of running harmful-content tests

A RapidResponse run produces harmful model output by design, so the output itself becomes a data asset to protect. The cards below cover where that output lands, who can read it, how credentials are stored and how to report a flaw in PyRIT itself.

Harmful outputs in memory

PyRIT stores conversations and scored results in its memory layer, which is SQLite by default or Azure SQL when configured. Every harmful response a RapidResponse run elicits is therefore persisted in that database, not just printed to a console. Before the first run, decide where the database file lives, how long it is kept and how it is deleted at the end of the assessment. Confirm the retention behavior for your PyRIT version in the documentation rather than assuming it.

Keeping attack content out of logs

Pipeline logs, shell history and ticketing systems are often readable by far more people than the memory store. Harmful prompts and model replies pasted into those places spread the content beyond the assessment team. Configure runs to write results to memory and summarize them in reports, and keep console output at a level that shows scenario progress rather than full transcripts. Check CI job logs before sharing them with anyone outside the test group.

Who can read the memory

Anyone with read access to the SQLite file or the Azure SQL database can see every objective, technique and response in a run. Restrict file permissions on the host, or the database role on Azure SQL, to the named red team. Keep the memory separate from general analytics databases and from backups that other teams can restore. Record who has access so the list can be shown during a security review.

Credentials in ~/.pyrit/.env

PyRIT reads API keys and endpoint secrets from ~/.pyrit/.env and settings from ~/.pyrit/.pyrit_conf. A plain-text file in a home directory is easy to copy, sync to cloud storage or commit by accident. Set restrictive file permissions, keep the file off shared runners and prefer a managed secret store where your platform provides one. Rotate any key that was used on a machine that is later decommissioned.

Scoping the target account

A RapidResponse run sends a large number of adversarial requests to the target, so the credential it uses should be able to do only that. Create a dedicated test deployment or key with its own quota, spending limit and no access to production data or tools. Confirm with the model provider which content filters and logging apply to that account. A narrow account limits both the blast radius of a leaked key and the cost of a runaway run.

Reporting PyRIT vulnerabilities

If a run reveals a flaw in PyRIT itself, such as a way to leak credentials or escape a sandbox, report it privately rather than in a public issue. The project's security policy directs reports to the Microsoft Security Response Center. Keep the reproduction steps inside the assessment team until a fix is available, and record the report in your own risk register. Check the README for the current reporting path before you need it.

Questions teams ask before running RapidResponse

Can our team run PyRIT's RapidResponse scenario ourselves?

Yes, if you have an engineer who can install PyRIT, register a target and read the output. PyRIT is an open source framework under the MIT license, installed with pip, and the PyPI package supports Python 3.10 up to but not including 3.15, with the documentation recommending Python 3.13. The scenario itself runs from the pyrit_scan command against a registered target. The harder part is deciding what to test, how to score responses and how to explain the results, so most teams start with a small first run on one target and expand once they understand the output.

What skills and effort does a RapidResponse assessment need?

The work needs Python and command-line skills, familiarity with the model or application under test, and someone who can judge whether a response is harmful in each category. RapidResponse covers hate, fairness, violence, sexual, harassment, misinformation and leakage, so reviewers need enough context to read flagged output responsibly. Plan time for setup, a first run, review of results and a second run after fixes. The effort depends on your environment and team, so ask your engineers to estimate it against the scope you define.

What drives the effort of a RapidResponse run up or down?

Three choices shape the workload most. The first is target count, since each model or application endpoint adds its own setup, access and review. The second is technique choice: single-turn techniques such as role_play_movie_script send one prompt per objective, while multi-turn techniques such as tap and many_shot involve several exchanges per objective and more requests. The third is scoring, because how responses are judged determines how much human review follows. Limiting dataset size for a first run keeps the early workload small and predictable.

What must we provide before testing starts?

You must provide a target the scanner can reach, credentials scoped to testing, and written approval to test. Confirm which environment is in scope, such as a staging deployment rather than production, and whether the target logs prompts that could contain harmful test content. Agree which teams receive results and who handles any flagged output. PyRIT reads credentials from ~/.pyrit/.env and settings from ~/.pyrit/.pyrit_conf, so confirm where your organization stores secrets before anyone configures a shared runner.

Do RapidResponse results count as compliance evidence on their own?

No. A RapidResponse run produces records of what was tested and what the target returned, which can support an assessment, but it does not establish compliance by itself. Auditors and certification bodies decide whether evidence is sufficient, and DeployOpen does not issue audit reports, attestations or certifications. Keep the scenario version, target configuration, dataset, memory records and review decisions together so an assessor can follow the work from scope to finding.

What should we ask a partner to include in a fixed-scope quote?

Ask for the written scope, the targets covered, the datasets and harm categories included, the techniques to be run and the scoring approach. Request the deliverables, such as a findings report, retest scope and handover notes, and confirm who performs human review of flagged output. Ask which items are one-time work, such as setup and the first run, and which recur, such as retesting after model or prompt changes. Also confirm the access and approvals you must supply, since missing access is a common cause of schedule slips. DeployOpen does not publish a price list, so a quote follows from the written scope.

Should we start with single-turn or multi-turn techniques?

Start with single-turn techniques on a limited dataset, then add multi-turn techniques where the first results justify it. Single-turn runs are simpler to read because each objective produces one exchange. Multi-turn techniques such as tap or many_shot can reveal weaknesses that single prompts miss, but they send more requests and produce longer conversations to review. Choose based on the harms you must evidence and the review capacity you have, and confirm with your engineers which techniques your target supports.

Limits to confirm in your environment before a run

A RapidResponse run is only as meaningful as the setup behind it. The cards below cover the parts that vary by PyRIT version, scorer, provider and reporting need, and that you should confirm in your own environment rather than assume from documentation.

Datasets and techniques in your version

The harm datasets and technique names listed in the AIRT Scenarios documentation are tied to a specific release. PyRIT v1.1.0 was released on 4 September 2026, so confirm with pyrit_scan --help or the scenario listing on your own installed version which harm categories, role_play_movie_script, many_shot and tap options are present. Record the exact version in your run notes so results can be reproduced later.

AIRT Scenarios docs

Scorer behavior by harm area

Scores for hate, fairness, violence, sexual, harassment, misinformation and leakage come from scorers that may be configured differently per category. Before trusting a result, run a small set of responses you have labeled yourself and check whether the scorer agrees. Pay particular attention to misinformation and fairness, where a judgment call is often needed rather than a clear harmful or safe label.

Provider content policies

Model providers apply their own safety filters, and those filters can refuse or rewrite outputs before PyRIT scores them. A low harm rate may reflect a provider filter rather than the model under test. Ask the provider which filters sit in front of the endpoint, whether they are on by default, and whether your test configuration can change them. Document these settings alongside every result.

Model-provider terms for testing

Sending harmful objectives to a hosted model can breach its acceptable use terms unless the provider has approved adversarial testing. Confirm with legal and the provider whether red teaming is permitted, whether an account or notification is required, and how prompts and responses are retained on the provider side. Check these terms again before each new model version is tested.

Fit with your reporting

RapidResponse outputs are conversations and scores stored in PyRIT memory, which may not match the categories, severity levels or evidence format your risk register or auditors expect. Confirm which fields you need, how harm categories map to your internal taxonomy, and who reviews flagged conversations. Decide early whether results will be exported or queried directly from memory.

How DeployOpen scopes and delivers PyRIT RapidResponse work

DeployOpen treats the RapidResponse scenario as one part of a written security assessment of your generative AI system. We agree the target, datasets, techniques and evidence format before any run, then install and operate PyRIT in infrastructure you control and hand over the results with the configuration needed to repeat them.

How we scope

  • Engagements are fixed-scope, with the target, harm categories and datasets agreed in writing before work starts.
  • We record which RapidResponse harms apply to your use case, such as hate, violence, sexual content or leakage.
  • Scope sets whether the first run uses single-turn techniques, multi-turn techniques or both, and how many objectives run.
  • We confirm the endpoints, credentials and test accounts PyRIT will use, and the boundaries that keep live content out of shared logs.

How we build

  • We install PyRIT and register your target with a documented configuration file and secrets handling you approve.
  • We run a limited first pass to check the target connection, scorer behavior and output before the full scope runs.
  • We keep attack memory, labels and run settings recorded so each scenario result can be traced back to its inputs.
  • We test scorer decisions on a sample of responses and document where a human reviewer must confirm a harmful result.

How we hand over

  • You receive scenario results, the configuration used, and a written summary of harm categories tested and findings.
  • Findings include the prompts and responses that drove each result, with reproduction steps for your engineers.
  • We document the commands and settings needed to rerun the same RapidResponse scenario against a new model version.
  • Handover includes a review session where your security and AI teams can ask questions about the results.

How we support

  • Ongoing support, PyRIT upgrades and repeat testing are available as retainers, agreed separately from the original scope.
  • Retainer work can cover re-running RapidResponse after model or prompt changes, with the same datasets and settings.
  • Ask any provider to confirm how they handle restricted harm content in logs, storage and retention before testing begins.
  • Confirm with DeployOpen during scoping which retesting cadence and deliverables are included in any retainer.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.