Class AIGuard.Evaluation

java.lang.Object
datadog.trace.api.aiguard.AIGuard.Evaluation
Enclosing class:
AIGuard

public static class AIGuard.Evaluation extends Object
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:

  • 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 content
      reason - human-readable explanation for the decision
      tags - list of tags associated with the evaluation (e.g. indirect-prompt-injection)
      tagProbs - map of tags associated to their probability
      sds - list of Sensitive Data Scanner findings
  • Method Details

    • getAction

      public AIGuard.Action getAction()
      Returns the recommended action for the evaluated content.
      Returns:
      the action (ALLOW, DENY, or ABORT)
    • getReason

      public String getReason()
      Returns the human-readable reasoning for the evaluation decision.
      Returns:
      explanation of why this action was recommended
    • getTags

      public List<String> getTags()
      Returns the list of tags associated with the evaluation (e.g. indirect-prompt-injection)
      Returns:
      list of tags.
    • getTagProbabilities

      public Map<String,Number> getTagProbabilities()
      Returns a map from tag to their probability (e.g. [indirect-prompt-injection: 0.25])
      Returns:
      map of tag probabilities.
    • getSds

      public List<?> getSds()
      Returns the list of Sensitive Data Scanner findings.
      Returns:
      list of SDS findings.