Why PyRIT's seed database matters for a shared red team
A seed database is the place where PyRIT keeps the objectives and prompts its attacks start from, so a team can share one set of seeds instead of several drifting copies. It becomes worth having once more than one tester runs attacks against more than one target, because each copy of a CSV or YAML file quietly accumulates its own edits, removals and harm labels. According to the PyRIT 1.1.0 documentation on seed database management, datasets are loaded into PyRIT memory in a normalised form and can be queried efficiently, which is what makes a single shared set practical to draw from.
The seed database sits inside PyRIT memory, the same store that holds conversations and results. The PyRIT documentation states that memory keeps this data in SQLite or Azure SQL. For a shared red team, that choice matters: a local SQLite file suits one tester on one machine, while a shared Azure SQL database is the more likely starting point when several people must read the same seeds and see the same results. Confirm with your platform team where the memory database will live, who can write to it and how it is backed up before anyone imports a dataset.
Before you import anything, decide who owns the shared set, how a seed is added or retired, and how you will tell which dataset version a given run used. Those decisions determine whether later results can be compared with each other. The loading built-in datasets guide shows how datasets enter memory, and the sections that follow cover the import, query and refresh steps in order.
How datasets move from files into seed queries
The flow starts with built-in datasets and YAML seed files, which are loaded into PyRIT's memory layer. The import step normalises them into the seed database, which lives in SQLite or Azure SQL. Attacks and scenarios then query seeds by harm category. The shared memory store is the trust boundary to check, because anyone who can write to it can change the seeds every later run uses.
Dataset sources flow through one import step into the shared seed database.
Importing built-in and custom datasets into memory
This sequence takes a fresh PyRIT install to a memory store that holds built-in datasets and your team's YAML seed files, with a check at each stage so you know the seeds are queryable before any attack runs.
Confirm a supported Python version
The engineer responsible for the test environment checks that the interpreter is Python 3.10 or later and below 3.15, the range the PyPI package supports. The documentation recommends Python 3.13, so use that version where your platform allows it. Run the interpreter's version command and record the output in the team's setup notes. The step is done when the version is confirmed inside the virtual environment that will run PyRIT, not only on the workstation's default path.
Install PyRIT from PyPI
In the same environment, the engineer installs the package with pip from PyPI, pinning the version the team has agreed to test against so every team member loads the same seed handling code. Confirm the installed version with pip show and import the package in a short Python session to make sure it loads without errors. Pin the version in your dependency file so later upgrades are a deliberate change. The step is done when the import succeeds and the pinned version matches the record.
Configure the memory backend
The engineer sets the memory backend that stores conversations, results and seeds. PyRIT's memory supports SQLite or Azure SQL. Choose one database location that the whole team can reach, and keep credentials for any remote database in the team's secret store rather than in a shared file. Initialize memory and confirm that the database file or connection is created. The step is done when a test query against the empty memory returns zero seeds without error, which confirms the store is working before any data goes in.
Load built-in datasets through the loading interface
Using PyRIT's dataset loading interface, the engineer loads the built-in datasets the team needs, selecting them by name rather than copying prompts by hand. Loaded datasets are normalized into the seed database so they can be queried efficiently later. Record which datasets were loaded and the seed count each one reported. Read the loading documentation before running large loads, because some datasets are fetched from remote sources and need network access. The step is done when the recorded counts match what the loader reports and a known objective from one dataset can be retrieved by a query.
Import team YAML seed files
The engineer imports the team's own YAML seed files so objectives written for the application under test sit in the same memory as the built-in sets. Each file should carry a clear harm category and metadata so it can be filtered later. Keep the files in version control and import from the committed revision, so the seeds in memory can be traced to a commit. The step is done when the import reports the expected number of seeds per file and no parse errors are raised.
Check seed counts against the source files
The engineer compares the seed counts in memory with the counts reported at load time and with the number of entries in each source file. Any mismatch usually means a duplicate, a skipped entry or a file that failed to parse, so resolve it before continuing. Run a query for one objective from a custom file and one from a built-in dataset to confirm both are retrievable with their harm category intact. The step is done when the counts reconcile and both test objectives return with the expected metadata.
Record the seed set for shared use
The engineer writes down the memory location, the PyRIT version, the Git revision of the YAML files and the list of loaded datasets with their counts. This record lets another team member or a later reviewer reproduce the same seed set and explain what an attack started from. Store it alongside the test plan in the team's repository. The step is done when a second engineer can follow the record on a clean environment and reach the same seed counts, which confirms the set is shared rather than local to one workstation.
Querying seeds by harm category and dataset
Once datasets are loaded into PyRIT's seed database, the team needs to pull the right seeds for each test. The cards below cover the five query patterns that matter most, and each one should be checked against the exact query API in the 1.1.0 seed database documentation before it becomes a team standard.
Filter by harm category
Harm category filters let a team select seeds for the harms its application can actually cause, such as content harms, psychosocial risks or data leakage. Before building a shared query, confirm in the 1.1.0 seed database page which harm category labels the loaded datasets carry, since a dataset with inconsistent labels will quietly return too few or too many seeds. Record the filter used for each run so results can be traced back to a harm scope.
Seed database docsFilter by source dataset
Filtering by source dataset separates seeds that came from HarmBench, a built-in catalog entry or a team's own YAML file, so each test run states its origin. This matters when a result has to be explained to a reviewer who asks which benchmark produced a finding. Check whether the dataset name is stored as provenance metadata in memory, and confirm that a refreshed remote dataset keeps its original name.
Built-in datasets guideFilter by objective
Objective filters return the attack goals a team wants to test, such as a specific disallowed request, and keep the paired prompts together. Use them to rerun one objective after a model, system prompt or filter change, instead of repeating the whole dataset. Check that the query returns every prompt attached to an objective, including multi-part prompts, so a partial set does not look like a passing result.
Limit by sample size
Sample size controls how many seeds a run draws from a larger set, which sets the run's cost and runtime. Pick the limit per harm category, not once for the whole dataset, so small categories are not drowned out by large ones. Confirm whether sampling is random and whether a fixed seed makes it repeatable, because a reviewer will want to rerun the same sample.
Select by seed group or metadata
Seed groups keep related prompts together, such as text and image variants of one objective or a sequence of turns for a multi-turn test. Querying by group or by custom metadata key lets a team pull a complete unit rather than loose prompts. Confirm how grouped seeds are returned, so a multi-turn sequence is never split across runs or applied out of order.
Refreshing remote datasets without changing past results
A remote dataset refresh can quietly change the seed set that earlier PyRIT runs were built on. If a re-import replaces, adds to or re-labels the objectives in memory, a later query returns different seeds than the ones an earlier attack used, and a result you cited last quarter can no longer be reproduced from the database alone. Treat every refresh as a change to a versioned input, not as routine maintenance. Before you refresh anything, decide which dataset version your evidence depends on and write that decision down.
Pin the version explicitly and record when you imported it. Keep the source identifier and revision you loaded, the date of the import, the PyRIT version that performed it, and the harm categories you queried. Store that record next to your attack results so an auditor or a colleague can tie each run to the exact seed set it used. For the import mechanics and the built-in dataset loaders, use the PyRIT documentation on loading built-in datasets as your reference, and confirm the exact loader arguments against the version you have installed.
Retain the prior state before any refresh. Export or snapshot the existing seed database, including the file that backs SQLite memory, so you can rebuild the earlier seed set if a later import misbehaves. Then confirm in your installed version how re-imports handle duplicate seeds and updated records: whether a re-import skips, overwrites or duplicates existing entries, and whether a changed upstream prompt replaces the old row or sits beside it. Run a test import against a copy of the database and compare counts and sample rows before you touch the team's shared memory. The seed database management documentation describes how seeds are stored and queried, which is the place to check this behavior.
Seed database options and when each fits
This table compares the main choices a team makes when it puts PyRIT seed datasets into memory: which database backs memory, where seeds come from, whether testers share one instance and how datasets get refreshed. Read each row as a decision with a trade-off, and confirm the details marked in the last column against the PyRIT 1.1.0 documentation and your own environment before you commit.
| Option | What it does | When it fits | Trade-off |
|---|---|---|---|
| SQLite memory | Stores seeds and conversations in a local SQLite file, which PyRIT documents as a supported memory backend | One tester or a small lab where seeds stay on one machine and no shared database is needed | The file lives with one workstation, so sharing a single versioned set means copying the file or moving to a shared backend |
| Azure SQL memory | Stores seeds and results in Azure SQL, another documented memory backend | A team that needs one shared, centrally held seed store on Azure | Requires an Azure SQL database, its connection setup and access control; confirm the connection settings in the setup documentation |
| Built-in dataset loaders | Loads research datasets that ship with PyRIT into the seed database, normalised for querying | Starting quickly with standard harm objectives such as the catalog sets your application needs | You inherit the dataset's scope and licensing; check each dataset's terms and whether it covers your harms |
| YAML or custom seed sources | Loads seed files you write with objectives, prompts, harm categories and metadata | Application-specific objectives, internal policies or harms the built-in catalog does not cover | Your team owns review, versioning and quality of every seed; no upstream maintenance applies |
| Shared instance | One memory store used by all testers, so seeds and results have one versioned source | Teams that need consistent seed sets across tests and reviewers working on the same results | Needs agreed ownership for changes, access control on the database and a process for conflicting edits |
| Per-tester instance | Each tester keeps a separate memory store with their own seeds and results | Exploration, individual experiments or testing where seed drafts should not affect shared sets | Seed sets drift between testers, and results are harder to compare or hand to an assessor |
| Manual refresh | Seeds are reloaded when a person runs the loader again | Pinned datasets where every change should be reviewed before it reaches the team | Relies on someone remembering to refresh; stale seeds can persist without notice |
| Scheduled refresh | Reloads remote datasets on a schedule set by your own job runner or pipeline | Remote datasets that change upstream and teams that want updates tracked in logs | You must confirm which sources update, how changes are reviewed and how the previous version is kept |
Securing the shared seed store and its credentials
A shared seed database holds the objectives your red team uses, and some of those objectives describe harmful content on purpose. The cards below cover who can reach that store, how the seeds and credentials inside it are protected, how long records are kept, and how to report a flaw in PyRIT itself.
Control access to the memory store
PyRIT memory holds seeds, conversations and scores in SQLite or Azure SQL. Anyone who can open the database file or connection string can read every seed and every model response recorded against it. Decide who may load datasets, who may query them, and who may only read results. If the store lives on a shared drive, restrict file permissions to the test service account. Confirm the access model with your database administrator before the first team import.
Seed database docsProtect harmful-content seeds
Seeds for content harms are written to provoke unsafe output, so the dataset itself is sensitive material. Store seed files in a location with the same restrictions as other red team artifacts, and keep them out of general code repositories, chat channels and build logs. Ask your legal and trust and safety teams where such material may be kept and for how long, since their answer may differ from your engineering default.
Keep credentials out of seed files
PyRIT reads credentials from ~/.pyrit/.env and settings from ~/.pyrit/.pyrit_conf. Keep API keys and endpoint secrets in the .env file with owner-only permissions, and keep only non-secret settings in .pyrit_conf. Do not paste keys into YAML seed files or notebooks that get committed. Check that your CI runners inject secrets from their own vault rather than from a file copied onto the image.
Set retention and deletion rules
Memory accumulates every conversation a run produces, including responses to harmful prompts. Define how long each run's records are kept, who may delete them, and how deletion is confirmed. Export the results your reviewers need before removing raw conversations. Confirm with your compliance lead whether any retention period is set by policy or contract, because PyRIT does not decide that for you.
Audit who changed a shared set
A shared seed set is only trustworthy if teams can tell which version they tested against. Record who imported a dataset, from which source and at what version, and require a review step before a changed seed set replaces the one others use. Keep a short change log next to the seed files so auditors can match a finding to the exact prompts that produced it.
Report PyRIT vulnerabilities privately
If you find a security flaw in PyRIT itself, such as a way that memory or credential handling can leak data, do not open a public issue. The project asks for private reports through the Microsoft Security Response Center under its security policy. Include the PyRIT version, the steps to reproduce and whether any seed or conversation data was exposed, so the maintainers can assess it.
PyRIT on GitHubQuestions teams ask before managing PyRIT seed datasets
What drives the effort of building a shared PyRIT seed set?
The main drivers are how many datasets you load, how many distinct harm categories and objectives they cover, and how much cleaning each source needs before it is useful. Remote datasets come in different formats and licenses, so each one needs a check of its fields, its harm labels and whether its terms allow your internal use. Effort also grows when several teams want their own additions merged into one set. A small set built from a few well-documented sources is a short exercise. A set that must map to several regulated harm categories and be reviewed by security and compliance takes considerably longer, because the review, not the import, is usually the slowest step.
Can our team manage PyRIT seed datasets without outside help?
Yes, if you have an engineer comfortable with Python and a database, and someone who owns the harm taxonomy. PyRIT documents seed database management in memory, where datasets are normalised and can be queried efficiently, so loading and querying is within reach of an in-house team. What is harder to do alone is deciding which datasets fit your application, agreeing on who approves additions, and keeping versions consistent across teams. Many organizations handle the technical import themselves and bring in outside help for the governance design, the evidence trail or a one-time review of the seed set. Confirm the current loading steps in the PyRIT documentation for your release before you commit to a plan.
What does the work need from our side?
It needs three things before any import starts. First, a memory backend: PyRIT memory stores conversations and results in SQLite or Azure SQL, so you must decide where the shared seed database lives, who can reach it and how it is backed up. Second, an access model that says who can read seeds, who can add them and who can change or retire them. Third, named owners for each seed set, with someone accountable for the source, the license and the harm labels. Your team also needs to decide which PyRIT version the whole group will use, because the shared set should be loaded and queried the same way everywhere.
How long does it take, and what changes the timeline?
Duration depends mainly on how many datasets are in scope and how much governance you require. Loading one well-understood dataset is far quicker than agreeing a shared set across several teams with approval rules and version tracking. Timelines also stretch when source licenses need legal review, when harm labels must be mapped to an internal taxonomy, or when a remote dataset changes and must be refreshed and re-checked. Ask for the timeline to be written as phases with the dependencies named, such as memory backend setup, access decisions, dataset review and first test run. Any fixed duration should come from the written scope rather than from a general estimate.
How do we keep remote datasets current without breaking past test results?
Refresh remote datasets on a schedule you control, and record which version of each dataset every test run used. If a source changes its prompts or labels, a silent refresh can make new results impossible to compare with old ones. Keep a version identifier on each import, store the date of the refresh, and flag objectives that were added or removed. Review changes before they reach shared use, especially where a dataset's license or content has changed. Confirm how your PyRIT release handles dataset refresh in the seed database documentation, since the exact behavior is version-specific.
What should a quote for this work include?
A quote should follow from a written scope and list each deliverable separately. Ask for the datasets in scope, the memory backend and where it runs, the access model and roles to be configured, the review of each source's license and labels, the import and query procedures handed to your team, and the testing needed to confirm the set loads and queries correctly. Also ask which costs are one-time, such as setup and the initial review, and which recur, such as refreshes, reviews of new datasets and ongoing support. DeployOpen does not publish a price list, so the quote is the place to confirm inclusions, exclusions and the assumptions about your environment.
What goes wrong when teams share seed sets informally?
The most common problem is drift: two teams load different versions of the same dataset, then report attack success rates that cannot be compared. Duplicate or conflicting objectives, unclear licenses and seeds added without a harm label are the next problems, and they make results hard to defend in a review. Informal sharing also tends to leave no record of who approved a seed or why it was retired. A short set of rules on versioning, ownership and labeling prevents most of these issues. Confirm these rules with your security and compliance leads before the set is used for evidence.
How DeployOpen works on this
DeployOpen plans and runs PyRIT seed database work inside your own environment, starting from the datasets your application can actually cause harm through. The written scope, the build and the handover are designed so your team can load, query and refresh one shared set of seeds without depending on a single person.
How we scope
- Inventory the harm categories your application can produce and map each one to the datasets that test it.
- Agree which datasets load from remote sources and which come from your own seed files before work starts.
- Define who owns the shared database, who may refresh datasets, and how versions are recorded in the written scope.
How we build
- Set up the PyRIT memory backend your team uses, with SQLite or Azure SQL chosen for your environment.
- Load the agreed datasets into memory and verify seed counts and harm category labels against the scoped list.
- Write and test the query patterns that pull seeds by harm category for each planned test run.
How we hand over
- Document the import, query and refresh steps so your engineers can repeat them without DeployOpen present.
- Walk through the shared seed set with the teams that will run attacks, covering what each dataset does and does not test.
- Hand over the configuration, scripts and documentation as deliverables under the written scope.
How we support
- Offer ongoing support, dataset refreshes and continuous testing as a retainer when your team wants them.
- Review remote dataset changes at the cadence agreed in the retainer, and record what changed for your audit trail.
- Confirm current PyRIT version compatibility with your team before upgrading the environment that holds the seed database.

