Skip to content

Add CodeVulnerabilityEvaluator and UngroundedAttributesEvaluator to _SafetyEvaluation#40635

Merged
slister1001 merged 2 commits intoAzure:mainfrom
slister1001:code-vuln-ungrounded-safety-eval
Apr 21, 2025
Merged

Add CodeVulnerabilityEvaluator and UngroundedAttributesEvaluator to _SafetyEvaluation#40635
slister1001 merged 2 commits intoAzure:mainfrom
slister1001:code-vuln-ungrounded-safety-eval

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 AI review requested due to automatic review settings April 21, 2025 20:54
@slister1001 slister1001 requested a review from a team as a code owner April 21, 2025 20:54
Copy link
Contributor

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 adds two new evaluators—CodeVulnerabilityEvaluator and UngroundedAttributesEvaluator—to the safety evaluation module, expanding the evaluation scenarios available.

  • Introduces new enum members and corresponding AdversarialScenario mappings.
  • Updates factory methods to create evaluator instances for the new types.
  • Adds unit tests to verify scenario selection, evaluator instantiation, and input validation for single-turn evaluation constraints.

Reviewed Changes

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

File Description
sdk/evaluation/azure-ai-evaluation/tests/unittests/test_safety_evaluation.py Adds unit tests to validate the new evaluators, their scenario mappings, and error handling for multi-turn conversations.
sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_safety_evaluation/_safety_evaluation.py Updates evaluator enumeration, scenario selection, evaluator instantiation, and input validation logic to support the new evaluators.

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

API change check

API changes are not detected in this pull request.

@slister1001 slister1001 merged commit 1ad3542 into Azure:main Apr 21, 2025
19 checks passed
cRui861 pushed a commit that referenced this pull request May 14, 2025
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.

4 participants