-
Notifications
You must be signed in to change notification settings - Fork 591
FEAT Refactoring TreeOfAttacks with the new AttackStrategy #992
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FEAT Refactoring TreeOfAttacks with the new AttackStrategy #992
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request refactors the TreeOfAttacks components with the new AttackStrategy, adds auxiliary scoring and response converter capabilities, and improves performance via batching and parallelization. Key changes include updates to the TreeOfAttacksNode and TAPAttack classes, additions to the scoring and prompt loading logic, and adjustments to the associated tests.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/attacks/test_tree_of_attacks.py | Expanded test coverage for various TAP attack behaviors, including node pruning, branching, and error handling. |
| pyrit/attacks/multi_turn/tree_of_attacks_node.py | Refactored node implementation for improved modularity, error handling, and integration of prompt and score conversions. |
| pyrit/attacks/multi_turn/tree_of_attacks.py | Implemented the TAP attack strategy with tree exploration, parallel prompt execution, and result aggregation. |
| pyrit/attacks/base/attack_context.py | Updated context classes to include prepended conversation for multi- and single-turn attacks. |
| pyrit/attacks/init.py | Exposed the new TAP attack related classes through the module interface. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! A few smaller comments but I love how this turned out!
Description
TreeOfAttacksWithPruningOrchestratorandTreeOfAttacksNodefrompyrit/orchestratormoduleTests and Documentation