RedTeam SDK: ProtectedMaterial, CodeVulnerability, and UngroundedAttributes Testing

Karthickumar Karuppiah 80 Reputation points
2025-11-23T03:15:27.74+00:00

In the RedTeam SDK, I can see that the following categories have been added:

ProtectedMaterial 200

CodeVulnerability 389

UngroundedAttributes 200

How can I test these against my model? What does ProtectedMaterial 200, CodeVulnerability 389, and UngroundedAttributes 200 mean, and what kind of prompt should I use to test them on my model?

Azure AI Content Safety
Azure AI Content Safety
An Azure service that enables users to identify content that is potentially offensive, risky, or otherwise undesirable. Previously known as Azure Content Moderator.
{count} votes

Answer accepted by question author
  1. Aryan Parashar 3,380 Reputation points Microsoft External Staff Moderator
    2025-11-24T08:35:36.77+00:00

    Hi Karthickumar Karuppiah,

    To use ProtectedMaterial 200,CodeVulnerability 389,UngroundedAttributes 200.

    In your code add the risk categories as shown below:

    red_team_agent = RedTeam(
        azure_ai_project=azure_ai_project,
        credential=credential,
        risk_categories=[
            RiskCategory.ProtectedMaterial,
            RiskCategory.CodeVulnerability,
            RiskCategory.UngroundedAttributes
        ],
        num_objectives=2,  # Number of attack prompts per risk category (customize as needed)
    )
    

    A prompt is not required, as the SDK will take care of that
    Feel free to accept this as an answer.

    User's image Thank you for reaching out to The Microsoft Q&A Portal.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.