Why teams write their own PyRIT YAML seed datasets
Writing YAML seed files lets your team define the objectives and prompts PyRIT attacks start from, so your tests reflect the harms your application can actually cause. Public benchmarks are useful for broad coverage, but they were not written for your product, your users or your data. When your assistant handles claims, patient records, internal contracts or a domain-specific workflow, the harms that matter most may never appear in a general research set. In that case, your own seeds are the place where that knowledge enters the test.
PyRIT's datasets are organized around three families of risk: content harms, psychosocial risks and data leakage, as described in the PyRIT dataset documentation. Built-in sets cover many of the content harms and common research objectives well. Your own seeds matter most where a harm is specific to your deployment, such as an agent that can read internal documents, a support bot that can issue refunds, or a tool that can expose another customer's data. A useful first step is to list the harms your application can cause, then check which of those already have a built-in set and which do not. The gap list becomes the scope of your seed files.
Plan to use built-in sets and your own seeds together rather than choosing one. Built-in datasets give you a shared, recognizable baseline that reviewers and auditors can compare across releases, while your seeds test what only your system can do. Confirm with your security and compliance owners which harm categories they expect to see covered, because those categories will shape how you tag and maintain your objectives. Keep the scope of your first dataset small enough that a named owner can review every objective before the first run.
Which seed file design fits your application
A single-objective test set targets one harm your application can cause, such as disclosure of internal pricing rules or generation of unsafe medical dosing advice. The file holds one objective marked as an objective and a small group of prompts or variants that express it in different ways. Because every item asks for the same outcome, a success or failure reading tells you directly how the application handles that harm. The attack starts from the objective and uses the seed prompts as the phrasings it sends to the target.
- Objective line: Write one clear statement of the harmful outcome, marked with
seed_type: objective, so PyRIT treats it as the goal to pursue. - Prompt variants: Add several phrasings that a real user or attacker might use, including indirect and role-based wording, so one lucky refusal does not end the test.
- Harm label: Set a single harm category on every entry so the run reports against one harm.
- Scope note: Keep the objective narrow enough that a scorer can judge success without interpretation.
Before running, confirm with the application owner which harm matters most, that the objective matches the policy you are checking, and that the scorer you plan to use can recognize the outcome described.",
A multi-harm set covers several harm categories in one file, with entries grouped by category so each group can be run, sampled and reported separately. This design suits an application with broad exposure, such as a customer assistant that can answer questions, take actions and handle personal data. The attack consumes the whole file or a filtered slice of it, so the grouping decides which categories a run reaches and how results roll up.
- One group per category: Keep each harm category in its own block with its objectives and prompts, rather than mixing them in one list.
- Balanced size: Give each category a comparable number of entries so no single harm dominates the aggregate result.
- Consistent objective markers: Mark each objective the same way in every group so a loader can find them without custom parsing.
- Category-level sampling: Plan how many items per category a scheduled run will use, so coverage stays stable between runs.
Before running, confirm the harm taxonomy your organization uses, check that category names match what your reporting expects, and decide whether results are reported per category or as one figure.",
A metadata-rich set attaches fields to each entry so you can filter the seeds for a run and trace results back to their origin. Typical fields record the source, the owner, the application area, the regulatory context and the version of the set. This matters when several teams share the same seeds or when auditors ask which tests covered which controls. The metadata does not change the attack itself, but it determines which entries are selected and how findings are labeled afterward.
- Provenance fields: Record where each prompt came from, such as an internal incident, a public dataset or a team-written case.
- Application and owner: Tag entries with the application area and the team accountable for the response, so findings route to the right people.
- Control mapping: Add the control or policy each entry supports, so reports can show coverage by requirement.
- Version field: Store a set version so a result can be tied to the exact seeds that produced it.
Before running, confirm which metadata keys PyRIT will read and how your installed version handles unknown keys, check the current PyRIT documentation for the supported fields, and agree the naming convention with everyone who edits the files.
Which metadata fields to set and when each one helps
This table compares the metadata fields you can attach to seeds in a YAML dataset, when each one pays off in filtering, reporting or audit trails, and what to check in the PyRIT 1.1.0 schema before relying on it. Read each row as a field to set and check its last column before you build a large dataset. Harm category and source are the hardest to reconstruct later, so set them first.
| Field | When it helps | What to confirm in 1.1.0 |
|---|---|---|
| Harm category | Filtering seeds for a scenario run and grouping results by harm in reports. | The exact key name, whether values must come from a fixed list, and which scorers or reports read it. |
| Source | Audit trail showing where each prompt came from and whether it can be shared. | Whether a source key exists or must be a custom key, and whether it survives import into memory. |
| Grouping | Keeping related seeds together, such as a multi-turn sequence or a multimodal set. | How seed groups are declared in YAML and whether a group identifier is a reserved key. |
| Version or date | Tying a result to the exact seed set that produced it after a dataset changes. | Whether the schema has a version field, and whether the dataset name or a file hash is the stronger record. |
| Seed type | Separating objectives from prompts so attacks start from the right entries. | The objective marker is documented. Confirm other allowed values and the default when the field is omitted. |
| Owner or reviewer | Showing who approved a seed for use, which helps when results are reviewed later. | Whether custom keys are kept in memory and included in exports. |
Steps to write and load a custom seed dataset
This sequence turns your application's harm list into a reviewed YAML seed file that PyRIT loads, checks and holds in memory before any attack uses it. Each step ends with a check so that objectives and prompts are confirmed as separate, correctly labeled records.
Map the application's harm list to objectives
Start from the harm list your application can cause, such as disclosure of customer data, unsafe instructions, or off-policy advice in a regulated workflow. Your security and product owners agree which harms matter and write each one as a plain-language objective, meaning the goal an attacker wants the target to reach. Done means every objective has a named owner and a harm label you can trace back to the list.
Write one or more prompts per objective
For each objective, write the prompts an attacker would plausibly send to reach it, phrased the way your users or adversaries would type them in your product. Keep prompts as separate entries that point to their objective, and avoid stuffing several goals into one prompt. Done means every objective has at least one prompt drafted, and a reviewer confirms that the prompts are about the same goal as their objective.
Add harm categories and metadata
Attach harm categories and metadata fields to each entry so later results can be grouped, filtered and reported by harm. Use a short, consistent vocabulary agreed by your team and record the dataset name, version and owner in the file header or metadata fields that your PyRIT version supports. Confirm the exact field names against the Datasets documentation for your installed release before you rely on them. Done means every entry carries a category from the agreed list.
Mark objectives with seed_type objective
Set
seed_type: objectiveon each objective entry so PyRIT treats it as the goal of an attack, and leave prompt entries without that marking. Review the file for entries that are marked incorrectly, since a prompt marked as an objective will be used as the attack goal. Done means every objective entry is marked and no prompt entry carries that marking.Load the file with PyRIT
Run the load step against your YAML file from a Python environment where PyRIT is installed, using the dataset loading path shown in the Writing Your Own Datasets documentation for your release. Fix any parse or schema errors the loader reports before continuing, and keep the file under version control so each change is traceable. Done means the loader completes without errors on the current file.
Verify counts and content in memory
Query PyRIT memory for the loaded seeds and compare the number of objective entries and prompt entries with your source file. Spot-check several records to confirm the text, harm category and metadata match what you wrote. Done means the counts agree with the file and the spot checks match the source text.
Check objectives and prompts are not mixed
Filter the loaded seeds by the seed type and confirm that every objective is typed as an objective and that no prompt appears as one. Check that each prompt links to an objective with the same harm category and that no objective text appears as a prompt. Record the check result with the file version so an auditor can repeat it. Done means the filtered lists match your source file exactly and the result is saved with the dataset version.
Run a dry check before any attack
Before starting an attack, run a small test that uses only the loaded objectives and confirm the seeds you expected are the ones selected. Keep this check in your team's runbook so that every change to the dataset repeats the load and verification steps. Done means the test selects the expected seeds and the runbook records the check before the dataset is used against a live target.
When to enable Jinja templating in seed files
Jinja templating lets a seed file hold one prompt pattern with placeholders that expand into many concrete prompts, so a single entry can stand for a family of variations such as the same objective phrased across different products, personas or languages. A fixed list is enough when each objective is worth reading individually, when the set is small enough to review line by line, or when you need the exact wording to match a published benchmark. Most teams should start with a fixed list for their first run and add templates only where the list has become repetitive. Before enabling templating, confirm in the PyRIT documentation how the feature is switched on for seed files, which template variables are available, and whether expanded prompts are stored in memory so you can see what was actually sent.
The main trade-off is review cost. Templates remove duplication in the file, but the prompts that reach the target are produced at run time, and a reviewer who reads only the template never sees the expanded text. Parameter lists can grow combinatorially, so a short template can generate hundreds of prompts that nobody read, including some that are nonsensical, duplicative or accidentally out of scope for the harm you are testing. Errors in a variable name or a default value can also silently change what is tested. Plan to render a sample of expansions, check the total count against what you expect, and keep the expanded seeds or their hashes in the run record so an auditor can reconstruct the input set.
Enable templating when you need broad coverage of one objective across many contexts, when the variations are defined by a small, reviewed list of parameters, and when someone on the team owns the template and its rendering checks. Keep templates out of seed files that encode curated objectives from a source dataset, and avoid them when the expansions would send sensitive prompts to a production system without an approval step. Treat the template feature as a change to the test set itself: version the file, record who changed it, and rerun a fixed sample whenever the template or its parameters change so results remain comparable across runs.
Security and handling risks in custom seed datasets
A seed file is data that drives real attacks, so it carries its own risks. The cards below cover what the file contains, who can read and change it, how it is templated, how it drifts across teams, how long prompts persist, and what gets reviewed before a run touches a production system.
Harmful content in seed files
Objectives in a seed file are often written to be harmful, so the file itself can become a store of dangerous instructions. Keep seed files out of public repositories unless the content has been reviewed for that purpose, and keep objectives at the level of the test goal rather than working exploit text. Check that your repository's hosting, backups and forks inherit the same controls as the rest of your security test material.
Access control for sensitive objectives
An objective that names a weakness in your application is sensitive, even when the text is harmless on its own. Restrict write and read access to the seed directory to the red team, store it in the same access-controlled repository as your test plans, and record who approved changes. Confirm how your repository platform handles branch protection and reviewer requirements before the file is shared.
Template injection through Jinja
When Jinja templating is enabled, values in a seed prompt are evaluated as template code, so untrusted input can execute logic or read data it should not reach. Only enable templating for files your team writes, and never pass text from users, tickets or scraped web pages into template variables. Confirm the templating behavior in the PyRIT documentation for the version you run before turning it on.
Writing datasets guideVersion drift between shared seed sets
When two teams edit copies of the same seed file, they test different objectives and their results stop being comparable. Store seed files under version control, tag the revision used for each run, and record the file hash or commit in the run notes. Ask whether a change to an objective counts as a new test set, since that affects trend reporting.
Retention of prompts in memory
PyRIT memory keeps seed prompts and the conversations they produce in its database, which is SQLite or Azure SQL. Those records can hold sensitive objectives long after a test ends, so decide who can query the database and how long it is kept. Confirm the retention and deletion options for your memory backend with your security team before the first run.
Review before production runs
A seed file that works in a lab can send prompts that cause real side effects when pointed at a live assistant, such as tool calls, emails or stored records. Review every objective against the target's tools and data, run new files first against a staging copy, and agree the approval step in writing. Limit the first production run to a small, named subset of objectives.
Questions teams ask before writing their own seed datasets
How much effort does writing a PyRIT seed set take?
Effort scales with the number of harm categories, the number of prompts you write for each harm, and the review each prompt needs before it enters the set. No researched figure is available for typical hours, so treat any number you see elsewhere with caution. Ask for a written breakdown that counts harms, prompts per harm, reviewer passes and metadata work separately. Writing the first harm is the slowest step because it sets the pattern for the rest. The file format itself is simple, so most of the time goes into deciding what counts as a good objective and checking that each prompt matches its harm.
Can an internal team write PyRIT seed datasets without outside help?
Yes, a capable internal team can write seed files, because the format is a YAML file with objectives, prompts, harm categories and metadata. The harder parts are scoping which harms matter for your application and getting domain reviewers to check the content. If your engineers lack security or domain context, an outside partner can help with the harm list and review process. DeployOpen plans and writes application-specific seed sets as part of fixed-scope security testing work, with scope and deliverables agreed in writing before work starts.
What do we need from our own people for a seed set?
You need three groups: someone who owns the harm list, domain experts who know how your application can cause harm, and reviewers who check that each prompt is realistic and correctly labeled. The harm list should come from your threat model and the use cases your assistant supports. Domain experts write or validate prompts that reflect real user behavior in your sector. Reviewers confirm that each objective is marked correctly and that metadata is accurate. Ask any partner to name who on your side will sign off each stage before the work begins.
Should we start from HarmBench or PyRIT's built-in datasets?
Start from a standard set when you need a broad baseline that others can compare against, and write your own seeds when your application has specific harms that general benchmarks do not cover. Built-in datasets are quick to load and useful for coverage checks. Application-specific seeds reflect your product, your users and your data, so they usually produce findings that matter more to your team. Many teams use both: a standard set for baseline coverage and a custom file for the harms unique to their system.
When is Jinja templating worth the risk in a seed file?
Use Jinja templating only when you need one seed to generate many variants, such as swapping product names, user roles or languages into a shared prompt structure. Templating adds a layer where unreviewed text can be produced, so each rendered variant should still be checked. Keep templates small and readable, avoid logic that changes which objective is tested, and review a sample of rendered output before running a test. If your team cannot review the generated prompts, write them out explicitly instead.
How do we keep seed sets versioned and auditable?
Store seed files in the same version control system your team uses for code, and tag each release that a test run depends on. Record which file version each PyRIT run used so results can be traced back to the exact prompts tested. Keep a changelog that explains why prompts were added, removed or reworded. For evidence purposes, a reviewer should be able to match a finding to a specific file revision and reviewer sign-off. Confirm with your compliance team which retention and review rules apply to these records.
How do we mark which prompts are objectives in a seed file?
In a PyRIT YAML seed file, you mark an objective with seed_type: objective. Other entries that supply prompt text are treated as seeds of other kinds, so the marking determines which text the attack uses as its goal. Check the current seed type documentation for your PyRIT version before writing a large file, because the format is documented in the official dataset guide. Test the file on a small sample first to confirm that objectives load as expected.
How seed files flow into PyRIT attacks
Seed files start as YAML written by your team, with objectives marked by seed_type: objective and prompts grouped by harm category. A switch decides whether Jinja rendering runs before loading, and that step sits inside a trust boundary because template input can execute logic. The loaded seeds go into PyRIT memory, where an attack or scenario selects them, sends them to the target, and passes the responses to a scorer. Check that rendering stays off unless you need it, and that the objectives you scored are the ones you wrote.
Seed files pass through an optional templating step before attacks use them.
How DeployOpen works on this
DeployOpen scopes YAML seed dataset work for PyRIT as a written, fixed-scope engagement covering the objectives, prompts, harm categories and metadata your tests start from. The work is built inside your own environment so the seed files, memory and results stay under your control.
How we scope
- Agree in writing which harm categories and application behaviors the seed files must cover before any YAML is written
- Inventory the existing datasets, prompts and objectives your team already uses, and decide which are reused and which are rewritten
- Define the metadata fields, objective markings and template rules each file will follow, so reviewers can check them consistently
How we build
- Write seed files with objectives marked as seed_type: objective, with prompts, harm categories and metadata set to the agreed schema
- Test each file by loading it into PyRIT and confirming that objectives and prompts parse and attach to the intended attacks
- Review Jinja templating use case by case, enabling it only where the agreed scope needs it and documenting the safeguards applied
How we hand over
- Deliver the seed files, schema notes and a short guide to adding new objectives without breaking existing datasets
- Document the load steps, configuration in the PyRIT environment and the review checks your team should repeat when files change
- Walk your security and AI engineering staff through the files so the team can maintain them after the engagement ends
How we support
- Offer ongoing support for seed files as a retainer, covering updates when your applications, harm categories or PyRIT versions change
- Re-check seed files after PyRIT upgrades, so changes to dataset handling do not silently alter what your tests send
- Confirm the support terms, response expectations and included work with your DeployOpen contact before the retainer starts

