-
Notifications
You must be signed in to change notification settings - Fork 3k
Adding AttackStrategy.MultiTurn
#40828
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
base: main
Are you sure you want to change the base?
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 adds support for a new multi-turn attack strategy in the red team evaluation SDK by introducing the AttackStrategy.MultiTurn enum, updating orchestrator selection logic, and modifying tests and logging details accordingly.
- Added a new enum value AttackStrategy.MultiTurn and updated its converter mapping.
- Updated orchestrator selection, logging, and test assertions to use a separate risk_category_name parameter.
- Modified related files to improve clarity and maintain consistent naming conventions.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
sdk/evaluation/azure-ai-evaluation/tests/unittests/test_redteam/test_red_team.py | Updated test imports, assertions, and patching to incorporate risk_category_name changes and multi-turn support. |
sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team/_utils/strategy_utils.py | Added mapping for AttackStrategy.MultiTurn in the converter mapping. |
sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team/_utils/metric_mapping.py | Updated metric mapping for RiskCategory.HateUnfairness to use a corrected metric name. |
sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team/_utils/constants.py | Added a new USER_AGENT constant. |
sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team/_red_team.py | Updated orchestrator selection and logging to use risk_category_name; introduced a multi-turn orchestrator (_multi_turn_orchestrator). |
sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team/_attack_strategy.py | Extended the AttackStrategy enum to include MultiTurn. |
sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team/_red_team.py
Outdated
Show resolved
Hide resolved
sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team/_red_team.py
Outdated
Show resolved
Hide resolved
…m/_red_team.py Co-authored-by: Copilot <[email protected]>
…m/_red_team.py Co-authored-by: Copilot <[email protected]>
API change check API changes are not detected in this pull request. |
Description
Please add an informative description that covers that changes made by the pull request and link all relevant issues.
If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines