Skip to content

MAINT: Migrate FlipAttack to a core 'flip' attack technique#2178

Merged
rlundeen2 merged 5 commits into
microsoft:mainfrom
rlundeen2:rlundeen2-migrate-flip-attack
Jul 14, 2026
Merged

MAINT: Migrate FlipAttack to a core 'flip' attack technique#2178
rlundeen2 merged 5 commits into
microsoft:mainfrom
rlundeen2:rlundeen2-migrate-flip-attack

Conversation

@rlundeen2

Copy link
Copy Markdown
Contributor

Dissolve the bespoke FlipAttack PromptSendingAttack subclass into pure configuration of the stock PromptSendingAttack, registered as the 'flip' core technique. Adds a general-purpose TaskFramingConverter; the flip technique reverses the raw objective with FlipConverter then frames it as TASK is '...', with the flip instruction supplied as a system-prompt seed_technique.

rlundeen2 and others added 2 commits July 10, 2026 14:51
Dissolve the bespoke FlipAttack PromptSendingAttack subclass into pure configuration of the stock PromptSendingAttack, registered as the 'flip' core technique. Adds a general-purpose TaskFramingConverter; the flip technique reverses the raw objective with FlipConverter then frames it as TASK is '...', with the flip instruction supplied as a system-prompt seed_technique.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Resolve conflicts from the prompt_converter -> converter rename: move TaskFramingConverter to pyrit/converter, use ConverterConfiguration, and drop the FlipAttack subclass/cell. Inline the merged role_play factories (remove ROLE_PLAY_SIMULATED_NUM_TURNS, path constants, and the _role_play_yaml helper) to match the other core techniques, and strengthen setup-techniques instructions to forbid module-level constants/helpers for factory args.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 88add5f8-b3c1-4ebf-91b0-230cea3f80fe
Comment thread .github/instructions/setup-techniques.instructions.md Outdated
Comment thread doc/code/framework.md Outdated
Comment thread doc/code/converters/0_converters.ipynb

@hannahwestra25 hannahwestra25 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.

main comment is the deprecation strategy

@hannahwestra25 hannahwestra25 self-assigned this Jul 14, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 88add5f8-b3c1-4ebf-91b0-230cea3f80fe
…ork.md

Add a TaskFramingConverter import and example to the text-to-text converters notebook (.py + synced .ipynb), and remove the stale FlipAttack-migration parenthetical from framework.md.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 88add5f8-b3c1-4ebf-91b0-230cea3f80fe
Adopt the upstream SeedAttackTechniqueGroup -> AttackTechniqueSeedGroup and SeedAttackGroup -> AttackSeedGroup renames in the flip technique's from_system_prompt helper, core.py factory, tests, and instructions doc.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 88add5f8-b3c1-4ebf-91b0-230cea3f80fe
@rlundeen2 rlundeen2 added this pull request to the merge queue Jul 14, 2026
Merged via the queue into microsoft:main with commit 3b7af75 Jul 14, 2026
53 checks passed
@rlundeen2 rlundeen2 deleted the rlundeen2-migrate-flip-attack branch July 14, 2026 18:47
rlundeen2 added a commit to rlundeen2/PyRIT that referenced this pull request Jul 14, 2026
Reconciles the context_compliance technique migration with main's
role_play (microsoft#2160) and FlipAttack (microsoft#2178) technique migrations and the
seed-group renames (microsoft#2165: SeedAttackGroup/AttackTechniqueSeedGroup).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: aeb8c8c6-5c23-490c-b451-a59c096f54f7
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.

2 participants