Repository navigation
FEAT: Add WildJailbreak dataset loader - #4535
Merged
Roman Lutz (romanlutz) merged 25 commits intoNov 26, 2026
Merged
Roman Lutz (romanlutz) merged 25 commits into
Roman Lutz (romanlutz) merged 25 commits into
Conversation
Add a gated HuggingFace loader for AI2's WildJailbreak dataset with WildJailbreakSplit and WildJailbreakDataType filters. Defaults to the eval config's 2,000 adversarial_harmful prompts; the ~530 MB train config is opt-in. Closes microsoft#4511
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new async tests in tests/unit/datasets/test_wildjailbreak_dataset.py omit the mandatory _async suffix required by the repository style guide.
1 open issue
What changed in this PR
Adds WildJailbreak to PyRIT’s remote seed datasets, addressing #4511 with a gated loader that defaults to 2,000 adversarial harmful evaluation prompts.
Changes:
- Adds config and data-type filters, token handling, and prompt metadata preservation.
- Registers the loader and enums, adds mocked unit tests, and marks the dataset as gated in end-to-end tests.
- Updates dataset documentation and adds the paper citation.
| File | Description |
|---|---|
tests/unit/datasets/test_wildjailbreak_dataset.py |
Tests filtering, prompt mapping, validation, and token handling. |
tests/end_to_end/test_all_datasets.py |
Adds WildJailbreak to the gated-provider set. |
pyrit/datasets/seed_datasets/remote/wildjailbreak_dataset.py |
Implements the loader and filter enums. |
pyrit/datasets/seed_datasets/remote/__init__.py |
Exposes the loader and enums through lazy exports. |
doc/references.bib |
Adds the WildTeaming paper reference. |
doc/code/datasets/1_loading_datasets.py |
Lists WildJailbreak in the documentation source. |
doc/code/datasets/1_loading_datasets.ipynb |
Updates the dataset list and displayed discovery output. |
doc/bibliography.md |
Includes the new citation key. |
Review effort: Balanced
Contributor
Author
|
Kindly review this PR Thanks |
…ilbreak loader Gated HF loaders (HarmEval, HiXSTest, MASK, SG-XSTest) declare required_environment_variables and access_url so the dataset catalog descriptor surfaces the gating requirement; mirror that here. Co-Authored-By: Claude Fable 5 <[email protected]>
…break-dataset-loader
…dataset-loader' into feat/wildjailbreak-dataset-loader
…break-dataset-loader
…r' into feat/wildjailbreak-dataset-loader
Co-Authored-By: Claude Fable 5 <[email protected]>
…break-dataset-loader
…nwar/PyRIT into feat/wildjailbreak-dataset-loader
…break-dataset-loader
…nwar/PyRIT into feat/wildjailbreak-dataset-loader
…break-dataset-loader
Roman Lutz (romanlutz)
approved these changes
Nov 26, 2026
Siddhant Rajhans (siddhant-rajhans)
added a commit
to siddhant-rajhans/PyRIT
that referenced
this pull request
Nov 26, 2026
Main's WildJailbreak loader (microsoft#4535) added @jiang2024wildteaming to the hidden-citations block in doc/bibliography.md, the same line where this branch adds @bhatt2024cyberseceval2. The resolution keeps both keys in alphabetical order; doc/references.bib merged cleanly with both entries.
Siddhant Rajhans (siddhant-rajhans)
added a commit
to siddhant-rajhans/PyRIT
that referenced
this pull request
Nov 27, 2026
Main's CyberSecEval prompt injection scorer (microsoft#4440) and WildJailbreak loader (microsoft#4535) touched the same files as this branch: - THIRD_PARTY_NOTICES.txt: both notices are kept, main's CyberSecEval notice first. - doc/bibliography.md: the citation keys are the sorted union of both sides. - tests/unit/score/test_target_judge.py: both scorers are in the judge list. - doc/code/scoring/0_scoring.ipynb: main's notebook, with the scorer table printed again from the merged code, so it adds the NemotronSafetyGuardScorer row at main's column widths.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Adds a seed dataset loader for WildJailbreak (Jiang et al., 2024), AI2's synthetic set of jailbreak prompts built from tactics observed in real user chats. Closes #4511.
_WildJailbreakDatasetsubclasses_RemoteDatasetLoaderand returnsSeedPrompts, because the adversarial rows are literal messages to send.WildJailbreakSplit(EVAL,TRAIN) andWildJailbreakDataType(the fourdata_typevalues).evalconfig'sadversarial_harmfulrows (2,000 prompts). Thetrainconfig (~530 MB) is only loaded when requested.adversarialtext; for vanilla rows it is thevanillatext.splitanddata_typego in the metadata, plusvanilla(train adversarial rows) andlabel(eval rows) when present. Thecompletioncolumn is never loaded.tokenargument, falls back toHUGGINGFACE_TOKEN, and says so in its docstring. It is added to_HF_GATED_PROVIDERSin the end-to-end dataset test.references.bibandbibliography.md, and the dataset is listed in1_loading_datasets.Differences between the issue and the real dataset
I ran the loader against the real dataset. Four things differ from the schema in the issue, which came from the dataset card:
tacticscolumn. Neither config has one, so tactics can't be stored in the metadata.evalcolumns.evalhas onlyadversarial,labelanddata_type, with novanillacolumn.trainhasvanilla,adversarial,completionanddata_type.trainin both configs. Each config ships its rows under one HuggingFace split calledtrain, including theevalconfig, so the loader always requestssplit="train"and picks the config withsplit.trainrows. 21adversarial_benignrows have an emptyadversarialtext, and the loader skips them. Thetrainconfig has 261,559 rows, so the loader returns 261,538.The dataset has no harm-category column, so seeds carry no
harm_categories.Real-data counts (eval: 2,210 rows; train: 261,559 rows):
eval,adversarial_harmful)eval,adversarial_benigntrain,adversarial_harmfultrain,adversarial_benigntrain,vanilla_harmfultrain,vanilla_benign