Skip to content

FEAT: Add MultiJail dataset loader - #4510

Merged
Roman Lutz (romanlutz) merged 10 commits into
microsoft:mainfrom
LuckysHorizon:feat/multijail-dataset-loader
Nov 27, 2026
Merged

Roman Lutz (romanlutz) merged 10 commits into
microsoft:mainfrom
LuckysHorizon:feat/multijail-dataset-loader

Conversation

@LuckysHorizon

Copy link
Copy Markdown
Contributor

Description

Adds a seed dataset loader for MultiJail, 315 unsafe prompts human-translated into ten languages, so a target's behavior can be compared across languages on identical content. Closes #4494.

  • Adds _MultiJailDataset and a MultiJailLanguage enum; languages=None loads all ten languages.
  • Produces one SeedPrompt per row and selected language, with the language, source row id and source in metadata so prompts can be matched across languages.
  • Reads harm_categories from tags (Python-list strings in the real data), keeping the source casing.
  • Registers the loader and enum in remote/__init__.py, and adds the citation and datasets doc entry.
  • Ran the loader against the real Hugging Face dataset: 315 rows, 3150 seeds by default, 315 per language.

Copilot AI balanced review requested due to automatic review settings November 21, 2026 07:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the MultiJail dataset integration.

No open issues 🎉

What changed in this PR

Adds MultiJail to PyRIT’s seed dataset framework, enabling comparisons of target behavior across ten human-translated language versions of the same prompts.

Changes:

  • Adds a loader with language filtering, harm-category parsing, and metadata for matching prompts across languages.
  • Registers the loader and language enum, and adds mocked unit tests for filtering, metadata, and empty or invalid inputs.
  • Updates dataset documentation and adds the paper citation.
File Description
tests/​unit/​datasets/​test_multijail_dataset.py Tests language selection, seed metadata, tag parsing, and validation.
pyrit/​datasets/​seed_datasets/​remote/​multijail_dataset.py Implements the MultiJail loader and language enum.
pyrit/​datasets/​seed_datasets/​remote/​__init__.py Adds lazy exports for the loader and enum.
doc/​references.bib Adds the MultiJail paper reference.
doc/​code/​datasets/​1_loading_datasets.py Lists MultiJail in the dataset guide.
doc/​code/​datasets/​1_loading_datasets.ipynb Updates the guide and displayed dataset-name list.
doc/​bibliography.md Adds the paper’s citation key.

Review effort: Balanced

- Map the 18 Anthropic-taxonomy tag labels onto canonical HarmCategory
  values (following BeaverTails/Aya precedents), keeping the raw labels
  in each seed's multijail_tags metadata.
- Guard ast.literal_eval results that are not a list so a bare quoted
  string cannot be iterated character by character.
- size is counted in source rows (315), so "medium" rather than "large".
- Add missing Args docstring sections on __init__ and _fetch_dataset_async.
- Replace the redundant multi-tag test with coverage for list-typed and
  bare-string tags values.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@romanlutz
Roman Lutz (romanlutz) added this pull request to the merge queue Nov 27, 2026
Merged via the queue into microsoft:main with commit 4ea6a34 Nov 27, 2026
72 checks passed
Siddhant Rajhans (siddhant-rajhans) added a commit to siddhant-rajhans/PyRIT that referenced this pull request Nov 27, 2026
Main's MultiJail loader (microsoft#4510) added a citation key to doc/bibliography.md
next to this branch's CultureGuard key; the keys are the sorted union of
both sides.

Signed-off-by: Siddhant Rajhans <51508945+siddhant-rajhans@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FEAT: Add MultiJail dataset loader (315 unsafe prompts in 10 languages)

3 participants