MAINT: Migrate FlipAttack to a core 'flip' attack technique#2178
Merged
rlundeen2 merged 5 commits intoJul 14, 2026
Conversation
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
hannahwestra25
approved these changes
Jul 14, 2026
hannahwestra25
left a comment
Contributor
There was a problem hiding this comment.
main comment is the deprecation strategy
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
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
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.
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.