Choosing PyRIT's built-in datasets for the harms your application can cause
When a team is about to red team an AI application, it needs starting objectives, and PyRIT's built-in catalog is a practical place to get them. PyRIT loads published research datasets, and the right choice depends on the harms your application can cause, not on which dataset is best known. The catalog covers content harms, psychosocial risks and data leakage, as described in the PyRIT documentation, and its datasets come from named research: 0DIN, Aegis, ALERT, BeaverTails, CBT-Bench, CoCoNot, DarkBench, DecodingTrust, Do-Not-Answer, EquityMedQA, FigStep, HarmBench, SORRY-Bench and XSTest. Each one was built to probe a different kind of failure, so a dataset that suits a customer support bot may say little about a medical assistant.
Start by listing what your application can actually do wrong. A chatbot that gives advice to vulnerable users raises psychosocial concerns, a retrieval assistant with access to internal documents raises data leakage, and a general assistant raises content harms. Map each of those harms to the datasets whose design targets it, and confirm the category labels and license terms for each set in the PyRIT loading documentation before you rely on them. Record the mapping in writing so reviewers can see why each dataset was or was not used.
Treat the catalog as a starting point, not a complete threat model. Published datasets reflect the harms their authors chose to measure, often in general-purpose English prompts, and they will miss failures specific to your tools, data, languages and users. Plan application-specific objectives alongside the built-in sets, and ask the team that owns the application which misuse cases it has already seen. Confirm the dataset versions you load, because the catalog can change between PyRIT releases.
Which built-in dataset fits which harm
This table compares named built-in datasets by the harm area each is published to cover and the application type it suits. Exact category lists differ by dataset, so treat each row as a starting point and check the dataset source for labels. The main takeaway is that DarkBench targets manipulative design, SORRY-Bench and StrongREJECT target refusal behavior, and every loader must be confirmed in the PyRIT version you run.
| Dataset | Harm area it targets | Application type it suits | Confirm before use |
|---|---|---|---|
| DarkBench | Manipulative or dark design patterns in chatbot replies | Customer-facing bot or assistant with long end-user conversations | Category list and label fields at the dataset source |
| BeaverTails | Harmful question and answer content across safety categories | General chat assistant answering open public questions | Category list and label fields in the dataset card |
| Aegis | Content safety for LLM interactions with unsafe prompts and outputs | Any chat application with user prompts and model responses | Taxonomy version and which subsets PyRIT loads |
| SORRY-Bench | Refusal behavior across fine-grained categories of harmful requests | General assistant where refusal consistency across categories matters | Category count and any scorer guidance supplied with prompts |
| StrongREJECT | Whether a model refuses jailbreak-style harmful prompts | Assistant exposed to adversarial users and jailbreak attempts | That it is a PyRIT loader in your installed version |
| CBT-Bench | Psychosocial and cognitive behavioral therapy related requests | Wellbeing, coaching or mental health adjacent chat products | Scope and clinical limits stated by the source |
| FigStep | Harmful instructions carried in images sent to vision-language models | Vision-language model or multimodal assistant accepting image input | Image loading and caching steps for your version |
| XSTest | Over-refusal of legitimate requests that resemble harmful ones | Customer-facing assistant where blocking benign requests carries a cost | Prompt split and scorer setup for your test design |
How to load and check a built-in dataset in PyRIT
This sequence takes a team from a clean Python environment to a verified, recorded sample of a built-in PyRIT dataset that they can defend as the starting point for a test. It confirms the install, the loader name, the harm metadata and the sample size before any full run begins.
Confirm the Python version
The engineer who owns the test environment checks that the interpreter is Python 3.10 or later and below 3.15, the range the PyPI package supports. The PyRIT documentation recommends Python 3.13, so use that version where your platform allows it. Record the interpreter version in the test notes. The step is done when
python --versionreports a supported release inside a fresh virtual environment.Install PyRIT from PyPI
Inside the virtual environment, install the package with pip from PyPI, pinning the version you intend to cite as evidence rather than whatever is newest on the day. Check the release notes on the project's GitHub releases page for the version you chose, because dataset loaders and their names can change between releases. The step is done when
pip show pyritreturns the pinned version and the package imports without errors.Confirm the dataset name against the loader list
Before writing any code that loads a dataset, check the built-in dataset names in the PyRIT documentation for the exact version you installed. Dataset names such as HarmBench, SORRY-Bench, StrongREJECT or DarkBench must match the loader's spelling and case for the call to succeed. Note that the research sources behind the catalog are listed in the documentation, so confirm the source and license terms that apply to each dataset you select. The step is done when the chosen name appears in the loader list for that version.
Load the dataset through the built-in loader
Call the built-in loader for the chosen dataset from a short script or notebook, keeping the call in version control so the same load can be repeated later. Load into the PyRIT memory instance your team uses, not a throwaway in-process store, if results will be reviewed later. The step is done when the loader returns without error and the script logs the dataset name and the PyRIT version in use.
Inspect the seed count and harm metadata
Count the seeds returned and print the harm category and any other metadata fields on a sample of entries. Check that the count matches what the documentation describes for that dataset and version, and that every seed carries the metadata you need to group results later. A missing or uniform harm label is a finding to resolve before you rely on the dataset. The step is done when you have a short written count and a list of the metadata fields present.
Compare harm categories with the risk register
Ask the application owner and the risk or compliance lead to read the harm categories from the dataset against the application's risk register. Mark each category as in scope, out of scope, or missing from the dataset, and note where the application can cause a harm the dataset does not cover. Gaps here usually mean you need a second dataset or application-specific objectives, which the seed file guidance covers separately. The step is done when the mapping is signed off by someone who owns the risk register.
Run a small sample before the full run
Set the loader to a small maximum dataset size and run the sample against the target, using the same attack and scorer you plan to use for the full run. Read a few responses by hand to confirm the objectives are being sent, the target answers, and the scorer labels look sensible. Fix configuration problems at this scale, where a rerun is cheap, rather than after a full pass. The step is done when the sample completes and the team has reviewed its results.
Record the dataset name and version in memory
Store the dataset name, the PyRIT version, the load date, the seed count and the harm mapping in PyRIT memory or in a run record linked to the results, so every later result can be traced to the exact input set. Keep this record with the test evidence, because auditors and internal reviewers will ask which seeds produced which findings. The step is done when a query against memory returns the dataset name, version and seed count for the sample run.
Matching datasets to application harms
Start from the harms your application can actually cause, then pick the PyRIT datasets that probe those harms. Each card names the starting datasets and the objectives the application owner must still write, because no built-in set knows your users, tools or data.
Content harm for general assistants
A general chat assistant needs prompts that request violent, hateful, sexual or dangerous content. Start with HarmBench and Aegis, which cover broad harm categories, and BeaverTails for harmful question-answer pairs. Check that the category labels match the policy your product claims to enforce, and write objectives for any harm specific to your audience that no public set covers.
Loading datasets docsPsychosocial risk for support bots
Companion, coaching and mental health support bots can reinforce self-harm, dependence or unsafe emotional advice. Consider DarkBench, which probes manipulative and deceptive patterns, alongside the general harm sets. The application owner must still write objectives that reflect the conversations users actually have, such as crisis disclosures and requests for diagnosis, and define the expected safe response for each.
Data leakage for retrieval and tools
Assistants that query knowledge bases, call APIs or read files can disclose records they should not expose. DecodingTrust is the built-in research set to review for privacy-related probes. Most leakage tests need objectives written against your own data classes, such as customer identifiers, internal document titles and credentials held by tools, plus a scorer that knows what a leak looks like in your system.
Over-refusal for safety-tuned assistants
Heavy safety tuning or filtering can block legitimate requests, which harms users as much as a missed attack. XSTest and CoCoNot contain prompts that look risky but are benign, and SORRY-Bench covers refusal behavior across many categories. Run these together with harm sets, so a change that lowers attack success does not go unnoticed for raising refusals on normal work.
Multimodal sets for vision inputs
Vision-language features accept instructions embedded in images, which text-only sets never exercise. FigStep is the built-in image-based set to start with. Confirm which image loaders your PyRIT version supports, and write image objectives that match what your users upload, such as screenshots, scanned forms or photographs of documents.
Domain sets for regulated sectors
Clinical, financial and other regulated assistants need harms that generic sets do not model, such as medical misinformation or unfair treatment of patients. EquityMedQA, CBT-Bench and 0DIN are examples of domain-oriented sources in the catalog. Confirm each set's scope against your regulator's expectations, and write the sector-specific objectives, such as dosage advice or credit decisions, that your compliance team will ask about.
Where the built-in catalog leaves gaps
The published research sets in PyRIT's catalog cover generic harms, such as violent content, hate, sexual content, self-harm and dangerous instructions, and they were written against the policies of their authors rather than yours. A set can therefore pass cleanly while your application still fails on the things that matter most to you: a banking assistant that gives out account details it should never disclose, a clinical tool that answers outside its approved scope, or an agent that follows instructions hidden in a document it summarizes. Before you run anything, list the harms your product can actually cause, the languages and user groups it serves, and the tools and data it can reach. Every item on that list with no matching built-in set is a gap you will need to fill yourself.
Add custom seeds when the gap is specific to your product. Typical signals are policy rules that exist only in your terms of use, non-English users, tool calls that move money or change records, retrieval over internal documents, and attack patterns your own support or security team has already seen. A broad set is also too coarse when most of its objectives are irrelevant to your product, because the attack success rate then describes the benchmark rather than your system. Confirm the category labels and license of each dataset you load against its source before you report results, since the built-in loaders are a convenience and do not decide what your application must refuse.
Sampling changes coverage as much as dataset choice does. When you cap the number of objectives from a large set, PyRIT runs a subset, so the results describe that subset, and a different sample can produce a different rate. Record which objectives were run, the sample size and the random seed or selection method, or the result cannot be reproduced or defended in a review. If you need coverage of a category, select objectives deliberately from each category instead of taking the first N rows. The next step is to write your own objectives in the YAML seed file format and load them, and to store and version them in the seed database, so that the same reviewed set is used across runs and teams.
Questions teams ask before choosing PyRIT datasets
How much effort does it take to pick PyRIT datasets in-house versus with a partner?
Loading a built-in dataset is a small task. The effort lies in deciding which harms your application can cause, mapping each harm to a dataset, and recording why each choice was made. A team that already knows its harm list can usually do this internally. A partner adds value when the harm analysis, the evidence trail, or the target connection is new to your team. Ask any partner for a written scope that lists the harm areas, the datasets proposed, the target systems covered, and the deliverables, so you can compare it against your own estimate.
What makes dataset selection take longer?
Effort rises with the number of harm areas, the number of modalities (text only, or also images and audio), the need for regulated evidence, and any custom policies your organization must enforce. Each added harm area needs its own dataset review, and each modality needs suitable datasets and converters. Custom policies require writing or adapting objectives that no published catalog covers. Regulated evidence adds documentation work, because you must show why each dataset was chosen and how results were recorded.
What does my team need to provide before dataset selection starts?
Prepare a short written description of the application, its intended users, the tools or data sources it can reach, and the policies it must follow. Include the list of harms you care about, even if rough. You also need a target endpoint that PyRIT can reach in a test environment, with credentials handled through your normal secrets process. Without a working endpoint, dataset choices stay theoretical, because you cannot confirm that a prompt set produces meaningful results against your system.
Can one team choose PyRIT datasets without outside help?
Yes, for a single general assistant with a clear list of harms, one team with Python and security experience can usually manage the selection. Start by listing harms such as content safety, psychosocial risk, and data leakage, then match each to the built-in catalog. Outside help becomes more useful when several applications share one policy set, when results must support an audit, or when the team lacks someone who can read dataset documentation critically.
How long does it take to load and check a dataset?
Duration depends on your environment, including your Python setup, network access to the dataset sources, and how much review you need. No fixed duration is published for this step, so run one dataset end to end in your own environment and time it. That single run also shows whether the dataset loads cleanly, how many prompts it returns, and whether your target and scorer behave as expected. Use that measured time, not a general figure, when you plan the rest of the work.
Are the built-in PyRIT datasets licensed for my use?
Each dataset comes from separate published research, and each keeps its own license and terms. Before you use a dataset in a commercial or regulated setting, read its original source and confirm what it permits. Also review the license that governs PyRIT itself, which is MIT, and confirm that your intended use, including storing prompts in shared memory and sharing results, falls within those terms. Record the license you checked for each dataset so reviewers can follow the decision.
Which datasets should a team start with?
Start with the datasets that match the harms your application can cause, not with the largest list. The PyRIT documentation groups built-in datasets from research such as HarmBench, SORRY-Bench, XSTest, and BeaverTails, among others. For a customer-facing assistant, begin with the content harm sets that match your policy, then add a set that tests refusal behavior so you can see whether the assistant blocks legitimate requests. Confirm each choice against your own harm list before running it.
Security and operational considerations for dataset use
The built-in datasets contain prompts written to elicit harmful output, so the way you store, route and record them matters as much as which ones you pick. The cards below cover access, hosting, third-party exposure, provenance, vulnerability handling and credentials, all of which apply once a dataset is loaded into PyRIT.
Restrict access to stored conversations
Loading a dataset and running it writes both the harmful objectives and the model's replies into PyRIT memory. Whether that memory lives in SQLite or Azure SQL, treat it as sensitive content. Limit read access to the people running the assessment, decide who can export conversations, and check that database backups inherit the same restrictions.
Keep datasets and results in your infrastructure
Run PyRIT, its memory database and any exported results on machines your organization controls. Confirm where the loaded datasets are cached and where scoring calls go, especially if you use a hosted LLM judge. Record the storage location in your test plan so auditors and security reviewers know where the harmful content sits.
Approve every third-party target
Sending harmful prompts to a model hosted by someone else can breach the provider's acceptable use terms and may expose your own data to them. Before pointing a dataset at an external endpoint, get written approval from the provider or your legal team, and confirm whether the provider logs prompts. Keep a record of each approval alongside the run.
Record dataset provenance and version
A dataset is only reproducible if you know its source, the research release it came from and the exact rows you sampled. Note the dataset name, the version of PyRIT that loaded it, any sample size and the date of the run. Without this record, a later retest cannot be compared fairly with the earlier results.
Report PyRIT vulnerabilities privately
If testing reveals a flaw in PyRIT itself, such as a way a dataset loader could be abused, do not open a public issue. The project asks reporters to use the Microsoft Security Response Center process described in its security policy. Keep the proof of concept off shared channels until the report is acknowledged.
PyRIT on GitHubKeep credentials out of dataset files
Dataset files and seed YAML are often copied between teams and committed to repositories, so they must never hold API keys or endpoints. Store credentials in ~/.pyrit/.env and keep settings in ~/.pyrit/.pyrit_conf. Check that no dataset export or shared seed file contains a secret before it leaves the test environment.
How the dataset decision path flows from harm to run
The path starts with the harms your application can cause, not with a dataset name. Each harm is mapped to candidate built-in datasets, and each candidate is checked for its license and version before anything is sampled and loaded into PyRIT. Results decide the next step: record them, or write custom seeds where the catalog leaves gaps. Check the license and dataset version at the mapping step, since those are the points most often skipped.
Decision path from application harms to recorded PyRIT runs.
When a built-in dataset is not enough
A built-in dataset is not enough when the harms your application can cause are not the harms the published research measured. Make that call before the first run, by comparing your application's policies, supported languages, user population and connected tools against what each dataset in the catalog actually covers. The catalog is built from published research such as Aegis, BeaverTails, DarkBench, HarmBench, SORRY-Bench and XSTest, so each set reflects the taxonomy and assumptions of its authors. If your product's prohibited content, regulated advice or data types fall outside those taxonomies, a high pass rate on the catalog tells you little about your real exposure.
Watch for four common gaps. The first is language: most research sets are written in one language, so a multilingual assistant needs prompts in each language it serves. The second is audience: a children's education tool, a clinical assistant or a financial advisory bot faces objectives that general safety datasets rarely contain. The third is tools: an agent that sends email, reads files or calls internal APIs can be harmed through indirect injection or unauthorized actions, which text-only research sets do not exercise. The fourth is policy: your own acceptable use terms define what counts as a violation, and those terms need objectives written against them. Confirm each gap by reading the dataset documentation and the PyRIT datasets reference for the version you run, since coverage can change between releases.
When you find a gap, keep the catalog as a baseline and add application-specific objectives on top of it rather than replacing it. Record which gaps you found and why, so reviewers can trace each custom objective to a risk in your threat model. The next steps are the YAML seed datasets topic, which covers writing your own seed files with objectives, harm categories and metadata, and the seed database topic, which covers importing those files into PyRIT memory so the whole team shares one versioned set. Plan the ownership of those custom sets from the start, because the people who know your policies are rarely the people who maintain a test corpus.
How DeployOpen scopes dataset selection
DeployOpen starts dataset selection from the application's harm list and deployment context, not from the catalog. Before any dataset is loaded, the team writes down which harms the application can realistically cause, such as unsafe content, psychosocial risk, or leakage of data the assistant can reach, and which users and channels expose it to those harms. The built-in datasets in PyRIT come from different research sources and cover different harm areas, so the harm list decides which sources matter and which can be left out. A customer-facing support assistant with no tool access and a coding agent with repository write access will need different dataset sets, and the reader should expect the scoping conversation to show that difference early.
Once the harm list is settled, the dataset set and sampling approach are agreed in writing as part of a fixed scope. The agreement names each dataset to be loaded, the harm category it maps to, how many objectives will be drawn from it and how those objectives are sampled, and which over-refusal or benign sets are included to check for false refusals. It also records what is out of scope, such as datasets that are not relevant to the deployment. Ask the team to confirm the exact dataset names, licenses and versions against the PyRIT documentation on loading built-in datasets before the scope is signed, because the catalog changes between releases.
The chosen datasets are documented as part of the evidence package. For each run, the record should show the dataset name and version, the harm mapping, the sampling parameters, the scorers applied and any objectives excluded and why. This lets the client's security and compliance teams see what was tested and whether the coverage matches the harms they identified, and it lets a later retest use the same inputs. DeployOpen does not issue audit reports or certifications. The documented dataset selection is an input that independent assessors can review alongside the client's own risk assessment.
How DeployOpen works on this
DeployOpen starts by mapping the harms your AI application can cause to the research datasets PyRIT can load, then agrees the test set in writing. We build the dataset configuration in your PyRIT environment, document what each dataset covers and what it misses, and hand over a repeatable setup your team can run and review.
How we scope
- Map the harms your application can cause to the PyRIT dataset families that address them
- Agree in writing which built-in datasets are in scope and which are excluded, with reasons
- Confirm the target system, access model and sample sizes before any testing begins
- Define the gaps that need application-specific objectives in addition to published sets
How we build
- Configure dataset loading in your PyRIT environment, with pinned versions and documented sources
- Check licenses and terms for each dataset against your organization's approved-use rules
- Run a small trial load to confirm the objectives, categories and fields match the scope
- Record the selection logic so each dataset choice traces back to a named harm
How we hand over
- Deliver a dataset selection document listing each source, its coverage, and its known limits
- Provide the configuration files and run instructions your engineers can reuse
- Walk your security and AI teams through the mapping and the trade-offs behind it
- Document how results from each dataset should be read and reported
How we support
- Offer ongoing support and continuous testing as a retainer after handover
- Review the dataset set when PyRIT releases change loaders, sources or fields
- Update the selection when your application, models or harm scope changes
- Confirm vendor and dataset-source changes with you before altering the agreed set

