Repository navigation
FIX Set the user role on multi-turn red_team_social_bias prompts - #3557
Merged
Roman Lutz (romanlutz) merged 2 commits intoOct 27, 2026
Merged
Roman Lutz (romanlutz) merged 2 commits into
Roman Lutz (romanlutz) merged 2 commits into
Conversation
The loader keeps the user turns of a "Multi Turn" row as SeedPrompts in one prompt group with sequences 0, 1, ..., but left their role unset. SeedGroup requires a role on each sequence of a multi-sequence group, so building the seed groups (dataset.seed_groups, or get_seed_groups_async after adding the dataset to memory) raised "No roles set for sequence 0 in a multi-sequence group" for every multi-turn row. Set role="user" on those prompts. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Roman Lutz (romanlutz)
approved these changes
Oct 27, 2026
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
Fixes #3555.
_RedTeamSocialBiasDatasetkeeps the user turns of each "Multi Turn" row asSeedPrompts that share aprompt_group_id, withsequence=0, 1, ..., but left theirroleunset.SeedGrouprequires a role on each sequence of a multi-sequence group, so building the seed groups (SeedDataset.seed_groups, orget_seed_groups_asyncafter adding the dataset to memory) raisedNo roles set for sequence 0 in a multi-sequence groupfor every multi-turn row, and with it for the whole dataset.Changes:
role="user", like the other remote loaders that build multi-sequence groups (for examplecyberseceval_prompt_injection_dataset.pyandmask_dataset.py).What the loader keeps is unchanged: it still drops the system and assistant turns, and single prompts are unchanged.
Tests and Documentation
test_fetch_dataset_multi_turn_prompts_form_seed_groupsintests/unit/datasets/test_red_team_social_bias_dataset.py: the multi-turn prompts have roleuser, anddataset.seed_groupsbuilds the multi-turn group with both turns in order. It fails onmain(roles areNone, andseed_groupsraises).svannie678/red_team_repo_social_bias_prompts: the seed groups now build, throughSeedDataset.seed_groupsand through memory.pytest tests/unit/datasets tests/unit/models: 7697 passed.ruff check,ruff formatandty checkpass on the changed files.🤖 Generated with Claude Code