-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Introducing RedTeam #39898
Introducing RedTeam #39898
Conversation
Modified logging_utils.py to accept output_dir parameter for scan-specific log files. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
…g_testing Enhancement/parallelism logging testing
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 PR introduces the RedTeamAgent by updating various autogenerated SDK modules and enhancing the safety evaluation code to support red team scenarios. Key changes include:
- Adding a new error target "RedTeamAgent" in the exceptions module.
- Updates to client, configuration, and patch files in both synchronous and asynchronous modules.
- Significant modifications in the safety evaluation functions to refine simulation output handling and defect rate calculations.
Reviewed Changes
Copilot reviewed 57 out of 57 changed files in this pull request and generated no comments.
File | Description |
---|---|
azure/ai/evaluation/autogen/raiclient/{aio/,}init.py, _client.py, _configuration.py, _version.py | Updates to generated client code with minor adjustments to imports and initialization logic. |
azure/ai/evaluation/_safety_evaluation/_safety_evaluation.py | Major updates to simulation, evaluation, and defect rate calculation logic. |
azure/ai/evaluation/_exceptions.py | Introduces a new error target "RedTeamAgent". |
All *_patch.py files | Standard patch files with no functional changes. |
Comments suppressed due to low confidence (2)
sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_safety_evaluation/_safety_evaluation.py:698
- The variable 'data_paths' is referenced before initialization. Ensure that 'data_paths' is defined (e.g., initialize it to an empty value) before using it in the condition.
if not data_paths and data_path is None and jailbreak_data_path is None and isinstance(target, Callable):
sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_safety_evaluation/_safety_evaluation.py:620
- There is a duplicate dictionary key 'content_safety.violence_defect_rate'; this causes the first value to be overwritten. Use distinct keys (for example, one for hate unfairness and one for violence) to preserve both defect rates.
evaluation_result["metrics"] = { "content_safety.violence_defect_rate": hate_unfairness_defect_rate, "content_safety.violence_defect_rate": violence_defect_rate, "content_safety.sexual_defect_rate": sexual_defect_rate, "content_safety.self_harm_defect_rate": self_harm_defect_rate }
Make redteam agent tests optional CI stage
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