Why teams run Crescendo multi-turn attacks in PyRIT
Crescendo is PyRIT's multi-turn strategy for testing whether a chatbot or agent can be walked, one step at a time, toward an objective it would refuse if asked directly. It is worth the cost when your single-prompt tests pass but nobody knows how the system behaves over a long conversation, especially if the assistant keeps memory, calls tools or handles sensitive domains where a patient user could build context. The Microsoft Foundry AI Red Teaming Agent describes Crescendo as gradually escalating the complexity or risk of prompts over successive turns to probe defences. PyRIT supports Crescendo among its multi-turn strategies, alongside TAP and Skeleton Key.
The practical question is whether Crescendo earns its place in your test plan. Each run calls an adversarial model and the target over several turns, and every turn also needs scoring, so cost grows with the turn limit and the number of objectives. Before committing, confirm with your own team which harms matter most, whether your deployment keeps conversation history across turns, and whether a single-turn suite already catches the failures you care about. If a cheap single-turn test fails, you may not need a multi-turn strategy to prove the problem exists.
A Crescendo success is evidence about the conversational defences of the model and system you tested, not a general verdict on the model. It shows that gradual escalation got past the controls in place for that configuration, including the system prompt, filters and conversation handling. Record the exact target version, configuration and objective, so the result can be retested after a model or prompt change. Treat a failure as a reproducible finding to fix and retest, and a clean run as a result that holds only for the scenarios and turn budget you used.
How a Crescendo run flows between adversarial model, target and scorer
A Crescendo run starts with the objective and seed prompt, which go to the adversarial model. That model writes the next prompt, which goes to the target, and the target's reply goes to the scorer. The scorer decides whether the objective is met; if not, the result returns to the adversarial model for the next turn, until the objective is met or the turn limit is reached. Every turn is written to memory, so check the stored conversation and scores after each run.
Crescendo loop between adversarial model, target, scorer and memory.
Crescendo configuration options and when each fits
This table compares the main configuration choices for a Crescendo run in PyRIT: the adversarial model, the target, the objective, the scorer and the turn limit. Read each row for when the option fits and what it costs in spend, coverage or result quality. The main takeaway is that the adversarial model and the scorer shape the result more than any other setting, so settle those first.
| Choice | When it fits | Trade-off in cost, coverage and result quality |
|---|---|---|
| Hosted adversarial model | Your team can send attack traffic to a hosted provider under its terms, and you need escalation quality without managing GPU capacity. | Lower setup effort, but each escalating turn is a paid call and the provider's usage terms apply to the generated prompts. Confirm data handling with the provider before use. |
| Self-hosted adversarial model | Test content or harm categories must stay inside your environment, or the provider's policies block the adversarial role. | Keeps data in your infrastructure, but you carry hosting, capacity and model-update work. Weaker open models may produce less effective escalation, so test before relying on results. |
| Adversarial model capability | The model must write gradually escalating, context-aware follow-ups that build on the target's earlier replies. | A model that refuses to play the adversarial role produces few usable turns. Larger models usually sustain multi-turn strategy better, but cost more per call. Compare on a small objective set first. |
| Stateful target | The target keeps conversation history server-side, such as a chat application or assistant with memory, and you want to test how that history is used. | Crescendo depends on earlier turns shaping later ones. Confirm the endpoint preserves the conversation across requests, or the escalation will not build as designed. |
| Stateless target | The target is a bare model or API that takes a full message list on each call, so PyRIT must resend the history. | Coverage is consistent and easy to reproduce, but the test reflects the model rather than your application's memory or session logic. Add a stateful test if your product keeps history. |
| Objective wording | A specific, testable harm tied to your use case, such as disclosure of restricted instructions or unsafe guidance in a named domain. | Narrow objectives are easier to score and reproduce, but may miss harms you did not name. Broad objectives raise scoring noise and can drift off topic over many turns. |
| LLM judge scorer | The objective is nuanced and needs a judgement about meaning, not keyword matching, and you can review a sample of judge decisions. | Flexible and close to human reading, but adds a model call per scored turn and can be wrong. Measure its accuracy on labeled examples before trusting success rates. |
| Azure AI Content Safety scorer | You need a managed harm classifier for categories it covers, with less custom prompt work to maintain. | Scores align with a published harm taxonomy, but cover only what the service detects and depend on an Azure resource. Confirm the categories match your objective. |
| Custom logic scorer | The success condition is deterministic, such as a leaked string, a forbidden tool call or a specific code pattern. | Cheapest and most repeatable, but misses paraphrased or partial harms. Pair with an LLM judge where meaning matters. |
| Turn limit | You want a bounded run whose cost and runtime you can estimate from your own call counts, with early stopping once a success is scored. | A higher limit gives Crescendo room to escalate but raises calls and spend. A lower limit may stop before the target weakens. Set the limit from pilot runs, not a fixed default. |
Setting up a Crescendo attack in PyRIT
This sequence takes a team from a clean Python environment to a first Crescendo run in PyRIT, with a target, an adversarial model, an objective and a scorer defined, and the results confirmed in memory. The output is a working test you can repeat and review.
Install PyRIT from PyPI
Create a virtual environment on a supported Python version: the PyPI package supports Python 3.10 up to but not including 3.15, and the PyRIT documentation recommends Python 3.13. Install the package with pip (
pip install pyrit) inside that environment. Done meanspip show pyritreports a version andpython -c "import pyrit"runs without error on the test machine.Set credentials in the PyRIT environment file
Create
~/.pyrit/.envand add the keys for each model endpoint you will call, one for the target and one for the adversarial model if they are hosted by different providers. Restrict the file to the account that runs the tests, and keep it out of source control. Done means a short test script can read the expected key names without printing their values.Configure settings and memory backend
Set defaults in
~/.pyrit/.pyrit_confand choose the memory backend: SQLite for a single analyst on one machine, or Azure SQL where the team needs shared storage. Confirm the connection details with your database owner before the first run. Done means PyRIT initializes memory without error and creates its tables on first use.Define the target endpoint
Point PyRIT at the system under test, whether that is a hosted model, a custom HTTP or WebSocket endpoint, or a web app driven through Playwright. Record whether the endpoint keeps conversation state, because a Crescendo run depends on sending follow-up turns in the same conversation. Done means a single test prompt returns a response from the target through PyRIT.
Configure the adversarial model
Select the model that will write escalating prompts for the Crescendo attack and confirm that it will answer the attack instructions in your environment. Choose a model your organization has approved for this use and check its data handling terms with your security team. Done means the adversarial model returns a test completion when called directly.
Write the objective and scorer
Write one specific, testable objective, such as a disallowed behavior your policy forbids, and attach a scorer that judges each target response against it. Pick a scorer type that matches the harm, and check a few sample responses by hand to confirm it marks them correctly. Done means the scorer returns a clear true or false judgment on a known safe and a known unsafe sample.
Run the first Crescendo attack and check memory
Run the Crescendo attack with a low turn limit for the first pass, so the output is easy to read. Afterward, query PyRIT memory to confirm that every turn of the conversation and every score were stored under the run. Done means the stored conversation matches the printed transcript and each turn has a recorded score.
What a Crescendo success says about a model's conversational defences
A Crescendo run measures how a model's refusals hold up over a conversation, not whether one prompt is dangerous. The cards below cover what a success and a failure can and cannot justify, and the checks needed before a result goes into a report.
Refusals can erode across turns
A Crescendo success shows that the target's refusal behaviour weakened as the conversation escalated in small steps. The key point is that the danger sits in the sequence, so a model that refuses every single prompt in isolation can still fail this test. Check which turn first produced the harmful content and whether the target's earlier answers were already drifting toward the objective.
AI Red Teaming Agent docsA failure is not proof of safety
A Crescendo run that ends in refusal only shows that this adversarial model, this turn limit and this scorer did not produce a success. A weaker escalation path, a longer conversation or a different adversarial model might succeed. Record each setting with the result and state the run as a bounded test, not a clean bill of health.
Scorer disagreement needs investigation
Different scorers can return different verdicts on the same transcript, especially on partial answers that give some harmful detail while hedging. Before counting a success, compare the scorer used with a second method and read the transcript yourself. Disagreement is a signal to tune the scorer objective, not a reason to pick the more favourable verdict.
Stateful and stateless targets differ
A stateful target keeps the conversation history, so Crescendo's gradual build-up accumulates as the attack proceeds. A stateless endpoint receives only what the attack sends in each request, so the escalation depends on how PyRIT replays context. Confirm how your target handles history before comparing a result from one deployment with a result from another.
Pair results with human review
Automated scorers can miss subtle harm and can flag benign text, so a Crescendo result is a lead for review rather than a finding. Have a trained reviewer read the full transcript, confirm the harm is real and in scope, and note the turn where it occurred. Keep the reviewer's decision with the memory record before the result reaches a report.
Questions buyers ask about Crescendo in PyRIT
What does a Crescendo run cost, and what drives that cost?
The main cost is model calls, not licenses: PyRIT is MIT-licensed, so the spend goes to the adversarial model, the target model and any scorer model you run. Crescendo runs a multi-turn conversation per objective, so cost grows with the turn limit, the number of objectives, the number of attempts and how many scorer calls each turn triggers. Labor is the other component: a fixed-scope engagement covers setup, runs, triage and reporting, and a quote should show each as a separate line. Ask the provider to state which model calls are included, which accounts you must hold, and whether retests are priced separately. DeployOpen does not publish prices, so ask for a written quote based on your scope.
How long does a Crescendo run take?
Duration depends on the number of objectives, the turn limit, the response time of your target and adversarial endpoints, rate limits on your model accounts, and how many runs you repeat to check consistency. Human time is spent on objective design, reviewing flagged conversations and confirming findings, which often takes longer than the automated run itself. Ask for a timeline in the quote that separates setup, the run window, triage and the retest, and confirm rate limits with each model provider before you commit to dates.
What does the work need from our team?
You need to provide access and decisions that only your organization can make:
- A target endpoint or test deployment that matches production behavior, with a system prompt and filters you are willing to test
- Approved objectives that describe the harms in scope for your use case
- A scorer choice, such as an LLM judge or a content safety service, and the account it requires
- Accounts and keys for the adversarial and target model providers, held under your billing and data terms
Confirm who may view stored conversations, since PyRIT memory keeps them in SQLite or Azure SQL.
Can our in-house team run Crescendo in PyRIT without a partner?
Yes, if your engineers can write Python, configure model endpoints and review conversation logs critically. PyRIT is installable with pip, supports Python 3.10 up to but not including 3.15, and documents Python 3.13 as the recommended version. The harder parts are choosing objectives that match your risk, setting a scorer you can defend, interpreting results without over-reading them, and keeping the evidence in a form a reviewer can follow. Ask a partner for a scoped review if you want an outside check on those choices, or if the work must be repeated on a schedule.
How does Crescendo differ from TAP, PAIR and Skeleton Key?
At a high level, the four attacks differ in how they search for a successful prompt. Crescendo escalates gradually across turns of one conversation, raising the complexity or risk of prompts step by step to probe defenses, as Microsoft's AI Red Teaming Agent documentation describes it. TAP branches and prunes many candidate prompts, and PAIR refines a single jailbreak prompt over iterations, so both are search-based. Skeleton Key is a known jailbreak that asks the model to revise its own safety guidelines, so it works as a quick, fixed check. Crescendo is the one that tests whether a model's defenses hold up over a long conversation, which is why its cost and duration are usually higher than a single-shot check.
Does a Crescendo pass prove that a model is safe?
No. A pass means that, under the objectives, adversarial model, turn limit and scorer you chose, the attack did not produce a response your scorer marked as harmful. It does not cover harms you did not test, other conversational strategies, different system prompts, or changes to the model or filters after the run. Results also vary between runs because model outputs are not deterministic. Record the configuration, repeat runs where it matters, and describe the result as coverage of a defined test set. Independent auditors and certification bodies, not red teaming providers, decide on compliance.
When Crescendo is worth its cost compared with cheaper attacks
Start with the cheapest test that answers your question. For known single-prompt jailbreaks, single-turn attacks and scripted replays through PyRIT's multi-prompt sending attack are enough: they need no adversarial model, they are repeatable, and they make good regression tests after a system prompt or filter change. Skeleton Key is a quick check of a deployment's system prompt and filters, and many-shot testing is worth running against long-context models. Use Crescendo when the model already holds up against single-prompt checks and your concern is that it can be walked toward a harmful answer over several turns. That concern is the one Crescendo is built to probe, so running it first on a model that fails a simple test wastes budget on a finding you already have.
A compound attack lets you avoid choosing up front. PyRIT's sequential attack chains can try a cheap attack first and fall back to Crescendo or TAP only if the cheaper attack fails, with the child results rolled up into one result. This keeps the expensive multi-turn search for targets that resist the easy attacks. Check the completion policy carefully, because a fallback chain reports a combined outcome and you need to know which child attack produced it. Chunked request and XPIA tests answer different questions, so include them only when your system reads external content or filters whole responses.
The real cost depends on two things you should measure rather than assume: the target and the adversarial model. Each Crescendo run is a multi-turn conversation in which the adversarial model generates and adapts prompts, the target responds, and a scorer judges the result, so cost grows with the turns you allow and with how many objectives you run. Ask your team to confirm the model hosting, token pricing and rate limits for both roles before you size a run, and to record the turn limit used. Treat a Crescendo success as evidence that the model's conversational defences can be eroded under this pattern, and report the transcript and settings with it so the finding can be reproduced.
How DeployOpen scopes and delivers Crescendo testing
DeployOpen plans, runs and documents PyRIT Crescendo testing against the conversational systems you operate, inside your own infrastructure. Engagements are fixed-scope, with the objective, target access, adversarial model, turn limit and evidence agreed in writing before any attack runs.
How we scope
- Written scope names the target system, the harmful objectives to test and the business context of each one.
- Scope records how the target is reached, whether through an API, custom HTTP or WebSocket endpoint, or a web chat interface.
- Scope states which adversarial model runs the attacker role, where it is hosted and who controls its access.
How we build
- We configure the PyRIT Crescendo attack, its scorer and turn limit against your agreed objectives and target setup.
- We set up PyRIT memory, credentials and run settings so every conversation and score is recorded for later review.
- We run the Crescendo sequences, check results for false positives and record escalation patterns for each objective.
How we hand over
- Deliverables include a findings report that shows each successful and failed Crescendo conversation with its turn count.
- We provide the PyRIT configuration, scorer settings and exported conversations so your team can rerun the tests.
- Handover covers recommended defences, such as context-aware filtering and turn-level review, with a retest after fixes.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers after the initial engagement.
- Retainers can cover PyRIT version upgrades and new Crescendo runs when the target model or system prompt changes.
- Support scope, response expectations and reporting cadence are agreed in writing with your team before work starts.

