Repository navigation
Open
Labels
datasetsPulling in external datasets into PyRITPulling in external datasets into PyRIThelp wantedExtra attention is neededExtra attention is needed
Description
Add a seed dataset loader for WildJailbreak, AI2's large synthetic set of jailbreak prompts built from tactics observed in real user conversations.
Why it fits
Most safety datasets contain plain harmful requests. WildJailbreak pairs each plain request with an adversarial rewrite that applies two to seven jailbreak tactics mined from in-the-wild chats, so its adversarial rows are ready-to-send jailbreak attempts across 13 risk categories. It also has benign look-alike prompts, which are useful for checking over-refusal.
Dataset facts
| Hugging Face | allenai/wildjailbreak, configs train and eval |
| Licence | ODC-BY |
| Access | Gated. Each user must accept the AI2 Responsible Use Guidelines on the dataset page and supply a Hugging Face token. |
| Format | Tab-separated files. The dataset card loads them with load_dataset("allenai/wildjailbreak", "eval", delimiter="\t", keep_default_na=False). |
train |
About 262,000 rows: 50,050 vanilla_harmful, 50,050 vanilla_benign, 82,728 adversarial_harmful, 78,706 adversarial_benign |
eval |
2,000 adversarial_harmful and 210 adversarial_benign rows |
Columns (train) |
vanilla (the plain request), adversarial (the jailbreak rewrite, empty for vanilla rows), tactics, completion (a model response), data_type |
| Paper | Jiang et al.: "WildTeaming at Scale: From In-the-Wild Jailbreaks to (Adversarially) Safer Language Models", 2024, arXiv:2406.18510 |
The dataset card lists columns for train only. Check the eval columns against the real file.
Proposed shape
- A
WildJailbreakSplitenum (EVAL,TRAIN) and aWildJailbreakDataTypeenum with the fourdata_typevalues. - Default to the
evalsplit andadversarial_harmfulrows (2,000 prompts). Thetrainsplit is far too large to load by default; it must be an explicit choice. - For adversarial rows, the seed value is the
adversarialtext. Keep thevanillarequest, thetacticsand thedata_typeinmetadata. For vanilla rows, the seed value is thevanillatext. - Do not load the
completioncolumn. It is training-target text, not a prompt. - This is a gated dataset, so follow the token pattern in
datasets.instructions.md(constructortokenargument withHUGGINGFACE_TOKENfallback, gating stated in the class docstring), and add the loader to_HF_GATED_PROVIDERSintests/end_to_end/test_all_datasets.py. The unit tests must also cover token forwarding. - The extra
delimiterandkeep_default_naarguments can be passed through_fetch_from_huggingface_async, which forwards additional keyword arguments.
Implementation notes
- Follow
.github/instructions/datasets.instructions.md. It covers everything a loader needs: subclassing_RemoteDatasetLoader, choosing betweenSeedPromptandSeedObjective, filter enums, per-seed metadata, class-level metadata, registration inremote/__init__.py, the BibTeX entry, the datasets doc page, and unit tests with mocked data. aya_redteaming_dataset.pyandtests/unit/datasets/test_aya_redteaming_dataset.pyare a good template for both the loader and its tests.- The schema above was read from the dataset card. Run your loader once against the real dataset before opening the PR and confirm column names, category values and row counts; say in the PR description that you did.
- Unit tests must mock the download. No test may fetch from the network.
Done when
- The loader exists, is registered, and its dataset name appears in
SeedDatasetProvider.get_all_dataset_names_async(). - Unit tests cover the happy path, every filter value, the empty-after-filter
ValueError, and invalid filter values. - The paper is cited in
doc/references.bibanddoc/bibliography.md, and the dataset is listed indoc/code/datasets/1_loading_datasets. - Unit tests and pre-commit pass.
How to contribute
- Claim it first. Before you start, comment on this issue to say you are taking it.
- First comment wins. If yours is the first claim comment, go ahead and open a PR; you do not need to wait for a reply. If someone has already commented, this issue is taken, so please pick a different one.
- Link this issue in your PR description.
Metadata
Metadata
Assignees
Labels
datasetsPulling in external datasets into PyRITPulling in external datasets into PyRIThelp wantedExtra attention is neededExtra attention is needed
Activity