Skip to content

Add tag probabilities to AI Guard evaluation result#5580

Open
y9v wants to merge 1 commit intomasterfrom
ai-guard-tag-probabilities
Open

Add tag probabilities to AI Guard evaluation result#5580
y9v wants to merge 1 commit intomasterfrom
ai-guard-tag-probabilities

Conversation

@y9v
Copy link
Copy Markdown
Member

@y9v y9v commented Apr 10, 2026

What does this PR do?
This PR adds AIGuard::Evaluation::Result#tag_probabilities attribute, exposing the tag_probs field from the AI Guard API response.

Motivation:
We want to add evaluation result tag probabilities to our SDK, and attach tag probabilities to metastruct.

Change log entry
Yes. AI Guard evaluation results now include tag probabilities from the API response.

Additional Notes:
APPSEC-61897

How to test the change?
CI and manual testing

@y9v y9v self-assigned this Apr 10, 2026
@y9v y9v requested review from a team as code owners April 10, 2026 16:05
@github-actions
Copy link
Copy Markdown

Typing analysis

Note: Ignored files are excluded from the next sections.

steep:ignore comments

This PR introduces 1 steep:ignore comment, and clears 1 steep:ignore comment.

steep:ignore comments (+1-1)Introduced:
lib/datadog/ai_guard/evaluation.rb:65
Cleared:
lib/datadog/ai_guard/evaluation.rb:64

Untyped methods

This PR introduces 1 partially typed method, and clears 1 partially typed method.

Partially typed methods (+1-1)Introduced:
sig/datadog/ai_guard/evaluation/result.rbs:16
└── def initialize: (::Hash[::String, untyped] raw_response_body) -> void
Cleared:
sig/datadog/ai_guard/evaluation/result.rbs:15
└── def initialize: (::Hash[::String, untyped] raw_response_body) -> void

If you believe a method or an attribute is rightfully untyped or partially typed, you can add # untyped:accept on the line before the definition to remove it from the stats.

@datadog-datadog-prod-us1
Copy link
Copy Markdown
Contributor

datadog-datadog-prod-us1 bot commented Apr 10, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 93.75%
Overall Coverage: 95.35% (-0.02%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 0c20b88 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant