Skip to content
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

Update redteam complexity mapping #40321

Merged
merged 12 commits into from
Apr 2, 2025
Merged

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.

@Copilot Copilot bot review requested due to automatic review settings April 1, 2025 20:49
@slister1001 slister1001 requested a review from a team as a code owner April 1, 2025 20:49
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 PR updates the red team complexity mapping logic by modifying how attack strategies are flattened in the formatting utility.

  • Changes the mapping for moderate attack strategies by replacing the composed combination with a single strategy.
  • Updates the difficult attack strategies mapping by removing one composed combination in favor of a unified strategy.
Comments suppressed due to low confidence (2)

sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_red_team/_utils/formatting_utils.py:67

  • The moderate block now only adds AttackStrategy.Tense instead of the previously composed combination. Please verify that this change accurately reflects the intended mapping for moderate attack strategies.
AttackStrategy.Tense],

sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_red_team/_utils/formatting_utils.py:73

  • In the difficult block, removal of AttackStrategy.Morse and merging the Base64 strategy into a single Compose call changes the behavior. Please confirm that this modification aligns with the intended design for difficult attack strategies.
AttackStrategy.Base64

@github-actions github-actions bot added the Evaluation Issues related to the client library for Azure AI Evaluation label Apr 1, 2025
@slister1001 slister1001 enabled auto-merge (squash) April 1, 2025 20:58
@nagkumar91 nagkumar91 self-requested a review April 1, 2025 21:03
@azure-sdk
Copy link
Collaborator

azure-sdk commented Apr 1, 2025

API change check

APIView has identified API level changes in this PR and created following API reviews.

azure-ai-evaluation

@nagkumar91 nagkumar91 self-requested a review April 1, 2025 21:35
@slister1001 slister1001 disabled auto-merge April 1, 2025 22:31
@slister1001 slister1001 merged commit c82fdb4 into Azure:main Apr 2, 2025
19 checks passed
nik1097 pushed a commit to nik1097/azure-sdk-for-python that referenced this pull request Apr 5, 2025
* Update complexity mapping

* remove unused debug_mode param

* update strategy converter mapping

* get base64 tense working properly

* Add api version if its available in model config

* fix printing errors

* make red_team separate sub-package and fix unit tests

* update sample

* Update setup.py to pin pyrit and termcolor

* Update setup.py

* fix unit tests

---------

Co-authored-by: Nagkumar Arkalgud <nagkumar@naarkalg-work-mac.local>
Co-authored-by: Nagkumar Arkalgud <nagkumar91@users.noreply.github.com>
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.

3 participants