Package datadog.trace.api.aiguard
Class AIGuard.Evaluation
java.lang.Object
datadog.trace.api.aiguard.AIGuard.Evaluation
- Enclosing class:
AIGuard
Represents the result of an AIGuard security evaluation, containing both the recommended action
and the reasoning behind the decision.
The evaluation provides three possible actions:
AIGuard.Action.ALLOW- Content is safe to proceedAIGuard.Action.DENY- Content should be blockedAIGuard.Action.ABORT- Execution should be immediately terminated
-
Constructor Summary
ConstructorsConstructorDescriptionEvaluation(AIGuard.Action action, String reason, List<String> tags, Map<String, Number> tagProbs, List<?> sds) Creates a new evaluation result. -
Method Summary
Modifier and TypeMethodDescriptionReturns the recommended action for the evaluated content.Returns the human-readable reasoning for the evaluation decision.List<?> getSds()Returns the list of Sensitive Data Scanner findings.Returns a map from tag to their probability (e.g.getTags()Returns the list of tags associated with the evaluation (e.g.
-
Constructor Details
-
Evaluation
public Evaluation(AIGuard.Action action, String reason, List<String> tags, Map<String, Number> tagProbs, List<?> sds) Creates a new evaluation result.- Parameters:
action- the recommended action for the evaluated contentreason- human-readable explanation for the decisiontags- list of tags associated with the evaluation (e.g. indirect-prompt-injection)tagProbs- map of tags associated to their probabilitysds- list of Sensitive Data Scanner findings
-
-
Method Details
-
getAction
Returns the recommended action for the evaluated content.- Returns:
- the action (ALLOW, DENY, or ABORT)
-
getReason
Returns the human-readable reasoning for the evaluation decision.- Returns:
- explanation of why this action was recommended
-
getTags
Returns the list of tags associated with the evaluation (e.g. indirect-prompt-injection)- Returns:
- list of tags.
-
getTagProbabilities
Returns a map from tag to their probability (e.g. [indirect-prompt-injection: 0.25])- Returns:
- map of tag probabilities.
-
getSds
Returns the list of Sensitive Data Scanner findings.- Returns:
- list of SDS findings.
-