Skip to content

Conversation

@AdrGav941
Copy link
Contributor

@AdrGav941 AdrGav941 commented Sep 22, 2025

Description

This PR adds support for the JailbreakV_28k dataset to PyRIT.
One notable departure from multimodal dataset fetching present here is that we need a local backup of the images via a Google Drive download provided by the owners of the HF dataset. The share link to the zip file is in the function comments and this function does not work without this being downloaded locally due to the number of images missing in HF.
I have left the parameter holding the path to this local copy optional in case the owners choose to upload more images to HF in the future. Unzipping if the extracted file is not present at the provided path is handled and the backup path is only used for images that are not present in HF.

Addresses #1007

Changes Made:

  • Added integration for JailbreakV_28k
  • Normalizes and associates the datasets "policy" column with harm-category
  • Allows for filtering on harm categories (policy values)

Files Added/Modified:

  • pyrit/datasets/fetch_jailbreakv_28k_dataset.py - Main implementation
  • pyrit/datasets/init.py - Added exports for new functions
  • tests/unit/datasets/test_fetch_jailbreakv_28k_dataset.py - Unit tests
  • tests\integration\datasets\test_fetch_datasets.py - Integration tests added

Tests and Documentation

  • PyTest parametrized testing for filtering and choice of text field (dataset has jailbreak and redteaming prompts)
  • Dataset mocking with both text fields and policy mapped to harm_category

Copy link
Contributor

@romanlutz romanlutz left a comment

Choose a reason for hiding this comment

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

Thanks for getting started on this!

The integration test for datasets is missing, but I suspect it will require a custom one as the dataset is meant to be multimodal (see other comment).

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.

3 participants