Skip to content

FIX: read the real provenance columns in the JailBreakV-28K loader - #3162

Merged
Roman Lutz (romanlutz) merged 3 commits into
microsoft:mainfrom
kushaltalati:fix/jailbreakv-28k-metadata
Oct 13, 2026
Merged

Roman Lutz (romanlutz) merged 3 commits into
microsoft:mainfrom
kushaltalati:fix/jailbreakv-28k-metadata

Conversation

@kushaltalati

Copy link
Copy Markdown
Contributor

Description

Closes #3161.

_JailbreakV28KDataset copied a transfer_attack_type column into every seed's metadata, but the upstream dataset has never had that column. Its columns are id, jailbreak_query, redteam_query, format, policy, image_path, from, selected_mini, transfer_from_llm. Because the lookup used .get(..., ""), all 28,000 rows were emitted with metadata["transfer_attack_type"] == "", and the two columns that actually carry provenance (from, and the transfer_from_llm flag that separates the LLM-transfer rows from the MLLM-specific rows) were discarded. The sibling RedTeam-2K loader already keeps from.

This replaces the phantom key with "from": item.get("from", ""), mirroring the RedTeam-2K loader, and keeps transfer_from_llm as a boolean when the column is present. No other behaviour changes.

Tests and Documentation

tests/unit/datasets/test_jailbreakv_28k_dataset.py:

  • The _row fixture now mirrors the real upstream column set instead of fabricating transfer_attack_type, which is what let CI pass against a column that does not exist.
  • test_fetch_dataset_happy_path asserts from and transfer_from_llm reach all three seeds and that transfer_attack_type is no longer emitted.
  • New test_fetch_dataset_metadata_keeps_mllm_row_provenance covers an MLLM row with the flag False.
  • New test_fetch_dataset_metadata_omits_missing_transfer_flag covers a row without the column.

With only the source change reverted, 3 tests fail; with it, the file is 20 passed. ruff check, ruff format --check and ty check are clean. No doc page lists this loader's metadata keys, so no JupyText run was needed.

The loader copied a transfer_attack_type column that does not exist
upstream, so every row carried an empty value while the real from and
transfer_from_llm columns were dropped. Read those instead, mirroring the
RedTeam-2K loader, and make the test fixture use the real column set.

Closes microsoft#3161

@romanlutz Roman Lutz (romanlutz) 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.

Nice find!

@romanlutz
Roman Lutz (romanlutz) added this pull request to the merge queue Oct 13, 2026
Merged via the queue into microsoft:main with commit cbc3879 Oct 13, 2026
77 of 82 checks passed
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.

BUG JailBreakV-28K loader reads a transfer_attack_type column that does not exist upstream and drops the real from / transfer_from_llm provenance

3 participants