Multimodal and multi-turn seed groups in PyRIT

A PyRIT seed group lets you send text, image, audio and video prompts together, or in sequence, while tracking one objective. This page covers when to use it, how to build it and what to confirm.

On this page

How PyRIT seed groups model multimodal and multi-turn objectives

A single text prompt misses much of how a vision-language or agentic application is really used. When the system accepts an image alongside a question, reads a document and a chat message together, or keeps state across a conversation, a red team that only sends one string per objective tests a narrower surface than the one users reach. In PyRIT, a seed group is the unit that closes that gap. Per the PyRIT Datasets documentation, a seed group enables three things: multi-turn conversations built from sequential prompts, multimodal content sent together in one turn, and objective tracking that stays separate from what is actually sent to the target. That last point matters for reporting, because the objective the team is testing is recorded independently of the wording used to pursue it.

Teams need seed groups when the attack depends on combination or sequence. Examples include an image that carries an instruction paired with a benign text question, a voice input routed to an assistant that also has tool access, or a conversation where the harmful goal only becomes reachable after several turns of context. A plain single-turn seed is usually enough for a text-only chat feature with no memory, for a first pass over a broad harm category, or when the goal is to check a classifier or filter on isolated inputs. Adding complexity before the baseline exists makes failures harder to attribute.

Before writing groups, confirm three things with the application owner: which input modalities the target accepts in one request, whether conversation history persists between turns and how long it lasts, and which tools or retrieval sources the agent can call on each turn. Then check that the target configuration you use in PyRIT carries the same modalities and memory behavior as production, since a seed group cannot reproduce a context the target does not preserve. The PyRIT documentation for version 1.1.0 lists the dataset model, and the exact fields for each modality should be checked against the version you deploy.

Choosing a pattern: multimodal, multi-turn or both

Use this pattern when the risk depends on one request that arrives in more than one modality, such as a text instruction paired with an image or an audio clip. A seed group holds the prompts that are sent together in one turn, while the objective is tracked separately so results can be scored against what the test was trying to elicit rather than against each file. Illustrative example: a vision-language assistant receives a benign-looking photo with a short text question, and the test checks whether the text and image jointly steer the answer toward disallowed content.

  • What is sent: one turn containing text plus one or more image or audio prompts, all linked to the same objective.
  • What the target must accept: a model or endpoint that accepts each modality in the same request. Confirm the input types your target supports before building the group, since a text-only endpoint will silently drop or reject the other parts.
  • Converter and file handling: confirm how media is supplied (local file or remote URL) and whether the loader caches images, so the file under test is the file the model received.
  • What to review in the transcript: the exact media that reached the target, whether the response relied on the image content, and whether the scorer read the full multimodal reply, not only the text portion.
  • Common mistake: scoring the text alone and missing a refusal or compliance that depended on the image.

Confirm target input support and file handling with the vendor or your own environment before running at scale.

Seed group options and when each fits

This table compares the configuration choices a team makes when building a PyRIT seed group, including modality mix, sequential or co-sent prompts, turn count, shared objectives and how media files are referenced. Read each row for the condition that favors that option and the cost it adds, then check the target's modality support before committing to a design.

DecisionWhen it fitsTrade-off to plan for
Text only seed groupThe harm you test appears in plain language and your target accepts text input onlyLowest setup and review effort, but misses harms that depend on images, audio or video
Text with imageA vision-language target or image feature is in scope, and the risk depends on what the model reads from a pictureTarget must accept image input, and reviewers need to check the image content alongside the text
Audio or video contentA voice or video feature accepts media from users and the harm depends on spoken or visual contentConfirm the target's audio or video support first, and plan for longer review time per item
Co-sent promptsAll parts of the attack should reach the target in one message, such as an image paired with an instructionThe target must accept the combined message in a single request, which not every endpoint does
Sequential promptsThe attack builds across several turns, such as a gradual escalation or a staged jailbreakEach turn needs review, and results depend on how the target handled earlier turns
Number of turnsStart with the fewest turns that test the behavior, and add turns only when a shorter sequence does not reach the objectiveMore turns raise run time, model usage and the number of responses a reviewer must read
Shared objective across promptsSeveral prompts or media files test one harm, so results roll up to a single objectiveObjective tracking stays separate from what is sent, so review must confirm each prompt still serves that objective
Separate objective per promptEach prompt tests a different harm and results need their own pass or fail recordsMore objectives to write and maintain, and reports become larger to read
Media referenced by local file pathFiles are stored in a controlled location your team can version and reviewPaths must resolve on every machine or runner that executes the seed group
Media referenced by remote sourceFiles come from a dataset loader or an external location maintained by someone elseConfirm the source's license and availability, and cache copies where the loader supports it

Building a multimodal or multi-turn seed group step by step

This sequence takes a team from confirming that its target accepts the planned input types to a single recorded run in which one objective is tied to a grouped set of prompts or files. Each step ends with a check so the team knows whether to move on.

  1. Confirm the target accepts each modality and turn format

    Before writing any seeds, the test owner lists every input type the planned seed group needs, such as text, image, audio or video, and whether the prompts must arrive in a fixed order across turns. They then confirm with the system owner or the target's documentation that the endpoint accepts each of those types and can hold conversation history. If the target is a custom HTTP or WebSocket app, they confirm how it receives non-text content and how it returns responses. Done means a short written list of supported input types and turn behavior, signed off by the team that runs the target.

  2. Install PyRIT with a supported Python version

    An engineer installs PyRIT from PyPI following the PyRIT documentation. The PyPI package supports Python 3.10 up to but not including 3.15, and the documentation recommends Python 3.13, so the engineer checks the interpreter version first with python --version in a virtual environment. They then run pip install pyrit and confirm the package imports in a Python shell. Done means the import succeeds and the installed version is recorded in the test notes so later runs can be reproduced.

  3. Define the objective separately from the prompts

    The test owner writes one clear objective describing what a successful attack would look like, such as a disallowed instruction the target should refuse. In PyRIT, the objective is tracked separately from the content sent to the target, so it should be phrased as the goal the scorer will later judge against. The owner reviews the objective with the risk owner to confirm it matches an identified harm for this application. Done means a single agreed objective sentence that the whole seed group will share.

  4. Write the prompts or collect the media files

    The engineer drafts the text prompts for each turn in order and gathers the image, audio or video files that the multimodal part requires. Files should be stored in a location the test environment can read, and each one should be checked to confirm it opens and matches the format the target accepts. Sequential prompts should be written so that each turn builds on the previous response, and the owner notes which turn carries which modality. Done means every turn and every file is listed with its position in the sequence.

  5. Group the prompts into one seed group

    The engineer builds a PyRIT seed group that holds the objective, the ordered text prompts and the media items that are meant to be sent together. Content in one seed group is treated as one test case, so this step is where the team decides which items travel as a single message and which are sent as later turns. The engineer loads the group in a short script and prints each seed's type, order and content reference. Done means the printed output matches the planned sequence exactly, with no missing media and no swapped turns.

  6. Run a single test against the target

    The engineer runs one attack using the seed group against a test instance of the target, not a production system, and keeps logging on. They watch the run for connection errors, unsupported media rejections and unexpected truncation of multi-turn history. If a turn fails, the engineer fixes the seed or the target configuration and reruns the same single test before scaling up. Done means one complete run finishes without errors and produces a response for every planned turn.

  7. Check the stored conversation and objective in memory

    After the run, the engineer queries PyRIT memory, which stores conversations and results in SQLite or Azure SQL, to confirm the conversation exists with every turn in order, that each media item is recorded, and that the objective is attached to the attack. They compare the stored turns with the planned sequence and confirm the objective text matches the one defined earlier. Done means the stored record can be reproduced from memory alone, and any gap is documented and fixed before the seed group is reused.

How one objective flows through a multi-turn multimodal seed group

The flow starts with a seed group that holds one objective and its prompts, some sent in sequence across turns and others sent together as one multimodal message. Each prompt reaches the target system under test through the trust boundary, and each response goes to scorers that judge whether the objective was met. The conversation and scoring results are written to PyRIT memory, so the objective stays separate from the prompts that were sent. When you build a group, check that every prompt traces back to the same objective and that the memory records keep that link.

A seed group sends sequential and co-sent prompts to the target, and scores and conversations are stored in memory.

Security and operational risks when testing with multimodal content

Multimodal seed groups bring harmful image, audio and video files into your environment, and multi-turn runs write every exchange to memory. The cards below cover the storage, retention, credential and access decisions to settle before a test run, plus how to report a vulnerability in PyRIT itself.

Harmful media files in team storage

Seed groups that pair text with images, audio or video often reference media files that contain the harmful content under test. Those files land on disk wherever the run executes and may be copied into shared drives or repositories. Decide where media lives, who can read it, and how it is deleted after the test. Check that media directories are excluded from source control and backups unless your policy says otherwise.

Conversation retention in memory

PyRIT memory stores conversations and results in SQLite or Azure SQL, so every multi-turn exchange, including model replies to escalating prompts, persists after the run. Treat the memory database as sensitive data with its own owner, access list and retention rule. Confirm with your security team how long it is kept and whether it is encrypted at rest.

PyRIT documentation

Credentials in the PyRIT environment file

PyRIT reads credentials for model endpoints from ~/.pyrit/.env, so the file on each tester's workstation or runner holds keys with access to paid or production services. Restrict file permissions, avoid committing it, and prefer short-lived or scoped keys for each target. Rotate keys when a tester leaves the project.

Who may test production targets

Multi-turn attacks against a live system generate real traffic, real logs and possibly real harmful output on the operator's side. Name the people allowed to point PyRIT at production, separate them from people who only run against staging, and record approval for each target. Agree in writing how multimodal payloads are handled if a target stores or displays them.

Reporting vulnerabilities in PyRIT

If a test shows that PyRIT itself is vulnerable, such as an unsafe file handling path or a credential leak, report it privately rather than in a public issue. Vulnerabilities are reported through the Microsoft Security Response Center under the project's security policy. Read the policy in the repository before you open any issue, and keep the proof of concept out of shared channels until a fix is available.

PyRIT on GitHub

Questions teams ask before building multimodal and multi-turn seed tests

What does a team need in place before building multimodal seed groups?

Before building, the team needs a clear list of the harms it wants to test, a target it can reach from a test environment, and at least one person who can write objectives that a reviewer can judge. The objective is the anchor of each seed group, so it should be fixed before any text, image, audio or video file is attached. The team also needs a place to store the media files and the seed group definitions, plus a Python environment that matches the versions PyRIT supports. The official PyRIT documentation covers installation and the Datasets concepts, and those are the right first reads for the engineers involved.

Can our own team build PyRIT seed groups without a partner?

Yes, a team with Python skills and access to its target can build seed groups in-house, because PyRIT is an open source framework under the MIT license and its documentation covers the Datasets model. The harder part is usually not the code but the judgment: deciding which objectives matter for your application, writing prompts that test them without drifting into unrelated content, and reviewing results consistently. Teams that lack spare capacity for that review, or that need evidence that an assessor will accept, often bring in a partner for part of the work. Ask your own team to pilot one multimodal and one multi-turn group first, then decide what to hand off.

What makes the effort for a seed test grow?

Effort grows with four things: the number of modalities combined in one group, the number of turns in each sequence, the variety of targets the same test must run against, and the review load that follows each run. A group that pairs one text prompt with one image adds less work than a group that also includes audio and video, because each media type needs its own sourcing, format checks and handling in the target. Multi-turn sequences add authoring and debugging time, since each turn depends on how the target answered the one before. Running the same group against several different targets multiplies configuration, and every run adds scoring and human review that someone must own.

What should a quote for this work include?

A useful quote lists the scope in writing before any work begins, including the harm categories, the number of objectives, the modalities and the maximum turns per sequence. It should name every target to be tested, the access method for each, and whether the work covers seed file authoring, database import, test execution, review of results and retesting after fixes. It should also state the deliverables, such as the seed files, the run configuration and a findings report, and say which of those the client keeps. Ask whether the quote covers any recurring work, such as refreshing seed sets or running tests after each model update, and separate that from the one-time build. DeployOpen does not publish a price list, and a quote follows from the written scope.

How long does a first multimodal and multi-turn seed build take?

The duration depends on scope, and the main drivers are the same as those for effort: how many modalities, how many turns, how many targets and how much review the findings need. A small first build with one target, a short text and image group, and a few multi-turn sequences is much shorter than a build that covers audio, video and several production endpoints. Access approvals for target systems and media sourcing often take longer than the authoring itself, so ask for those dependencies to be listed in the plan. No duration figure is given here because none has been researched for this topic, so ask any partner for a timeline tied to the written scope and to the access you can confirm.

Is the PyRIT documentation enough to build these tests myself?

The PyRIT documentation is a sound starting point for the core concepts: a seed group enables multi-turn conversations with sequential prompts, multimodal content sent together, and objective tracking kept separate from what is sent. It is less complete on the decisions specific to your application, such as which harms matter, what a failing response looks like in your product, and how to set review criteria your compliance team will accept. Read the Datasets page in the version you install, check the release notes for changes, and run a small pilot against a non-production target. If the pilot raises questions about target configuration or scoring, those are the points where outside help is most useful.

What risks should we check before sending multimodal test content to a target?

Check where the media and generated outputs are stored, who can read the PyRIT memory database, and whether the target system logs prompts and responses. Multimodal tests can contain sensitive or harmful imagery or audio, so confirm that storage, retention and access rules for test material match your data handling policy. Confirm that the target is a test instance or has the controls your security team expects for adversarial traffic. PyRIT stores conversations and results in SQLite or Azure SQL, so decide where that database lives and who can query it before the first run. Vulnerabilities in PyRIT itself are reported privately through the Microsoft Security Response Center under the project's security policy.

What to confirm with your target owner and security team

Before any multimodal or multi-turn seed group runs, confirm which modalities the target actually accepts. A target that silently drops or rejects image, audio or video input will make the test look clean when nothing was tested. Ask the owner whether the endpoint, the model version and any content pipeline in front of it accept each media type you plan to send, and whether text and media arrive in the same request or in separate turns. Record the answer next to the seed group so the results can be read later against the exact configuration that was tested.

Media files need their own data handling decisions. Images, audio and video used as seeds may contain personal data, customer material or copyrighted content, and PyRIT stores conversations and results in SQLite or Azure SQL memory. Agree with the security team where seed media is stored, who can read the memory database, how long conversations are kept, and whether any media may be sent to a third-party model service. Confirm that the media set has been reviewed for content your organization is not permitted to keep, and that the team knows how to purge it.

Multi-turn sequences that escalate against a live system need explicit approval. A scripted sequence that moves step by step toward a harmful outcome can trigger alerts, lock accounts, or change state in downstream systems, so the owner should approve the sequence length, the target environment, the rate of requests and the stop conditions in writing. Ask whether a staging copy with equivalent configuration is available, and whether the seed group can be run there first. Evidence the security team will expect includes the seed group file, the target configuration at test time, the memory export of each turn and the scorer output for each step, so that a reviewer can reconstruct exactly what was sent and what came back.

How DeployOpen scopes and delivers PyRIT seed group testing

DeployOpen plans and runs PyRIT testing as a fixed-scope engagement inside your own infrastructure. For multimodal and multi-turn seed groups, we agree in writing which objectives, modalities and conversation sequences are in scope before any seed file is written or any target is connected.

How we scope

  • Written scope lists which target systems, modalities (text, image, audio, video) and multi-turn objectives are covered by the seed groups.
  • We confirm which models or endpoints accept each media type and which ones will be tested only in text form.
  • Scope states who supplies the objectives, media assets and sign-off criteria, and how each seed group maps to an application risk.
  • Engagements are fixed-scope, so deliverables and timelines are agreed before work starts, and ongoing support is available as a retainer.

How we build

  • We write seed group definitions that keep one objective tracked separately from the prompts sent to the target.
  • Sequential prompts for multi-turn tests are ordered and reviewed so each turn has a stated purpose in the attack path.
  • Media files are checked for licensing, size and content handling, and paths are recorded so the group can be rerun.
  • Each seed group is run against a test target in your environment to confirm that modalities arrive intact and in order.

How we hand over

  • You receive the seed group files, configuration and run instructions, stored in a repository your team controls.
  • The documentation explains how each seed group is structured, how objectives are tracked and how to add new sequences.
  • Memory and conversation records are described so your team can query results and export transcripts for review.
  • A handover session walks your engineers through running the seed groups and reading the results they produce.

How we support

  • Retesting covers seed groups after target model changes, PyRIT upgrades or changes to the sequences themselves.
  • Ongoing support and continuous testing can be added as a retainer covering updates to seed groups and PyRIT versions.
  • Findings from seed group runs are reported with the conversation evidence needed to reproduce each result.
  • Ask us to confirm in writing how media, memory and credentials are retained and who can access them after handover.

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.