Skip to content

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

slister1001
Copy link
Member

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:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@slister1001 slister1001 marked this pull request as ready for review April 30, 2025 22:32
@Copilot Copilot AI review requested due to automatic review settings April 30, 2025 22:32
@slister1001 slister1001 requested a review from a team as a code owner April 30, 2025 22:32
@github-actions github-actions bot added the Evaluation Issues related to the client library for Azure AI Evaluation label Apr 30, 2025
Copy link
Contributor

@Copilot Copilot AI left a 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.

@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Evaluation Issues related to the client library for Azure AI Evaluation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants