Skip to content

Allow user to view conversation group id for all the strategies in a red team scan #40662

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

Draft
wants to merge 26 commits into
base: main
Choose a base branch
from

Conversation

nagkumar91
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 AI review requested due to automatic review settings April 22, 2025 23:26
@nagkumar91 nagkumar91 requested a review from a team as a code owner April 22, 2025 23:26
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 updates the red team scan functionality to allow users to view the conversation group ID for all strategies. It introduces a mapping utility for risk categories and adds a new parameter, prompt_id, to the AttackDetails type for improved tracking of conversation prompts.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team/_utils/metric_mapping.py Added mapping utility and helper function to associate risk categories with evaluation metrics.
sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team/_red_team_result.py Updated the AttackDetails type to include the new prompt_id parameter.

@github-actions github-actions bot added the Evaluation Issues related to the client library for Azure AI Evaluation label Apr 22, 2025
@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

@nagkumar91 nagkumar91 requested a review from Copilot April 25, 2025 16:16
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 extends the red team scan functionality so that users can view conversation group IDs (prompt IDs) for all strategies. Key changes include:

  • Adding a new prompt_id field to the AttackDetails TypedDict.
  • Updating orchestration logic to send normalizer requests with conversation IDs.
  • Modifying file write operations to include conversation IDs when outputting conversations.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team/_red_team_result.py Added prompt_id to AttackDetails documentation and data structure.
sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team/_red_team.py Updated orchestration and file write logic to support prompt_id extraction and output.

@nagkumar91 nagkumar91 marked this pull request as draft April 28, 2025 18:25
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