Class ScoreAnswer

java.lang.Object
com.google.genai.gaos.models.decisions.ScoreAnswer
All Implemented Interfaces:
Answer

public class ScoreAnswer extends Object implements Answer
ScoreAnswer

Calibrated result for a `ScoreQuestion`.

  • Constructor Details

  • Method Details

    • confidence

      public Optional<Double> confidence()
      Required. Output only. Closed-world confidence score in `[0, 1]`, equal to the calibrated probability of the winning outcome: - `NoulAnswer`: `max(noul, 1 - noul)` - `ChoiceAnswer`: `p_max` (the probability of `choice`) - `ScoreAnswer`: `p_max` (the highest probability in `probabilities`).
    • legend

      public Optional<Map<String,String>> legend()
      Required. Output only. Rubric description for each non-empty 0-based level index.
    • probabilities

      public Optional<Map<String,Double>> probabilities()
      Required. Output only. Closed-world normalized probability in `[0, 1]` for each 0-based level index.
    • score

      public Optional<Double> score()
      Required. Output only. Probability-weighted expected score (`sum_k k * probability_k`).
    • type

      public String type()
      Specified by:
      type in interface Answer
    • builder

      public static ScoreAnswer.Builder builder()
    • withConfidence

      public ScoreAnswer withConfidence(double confidence)
      Required. Output only. Closed-world confidence score in `[0, 1]`, equal to the calibrated probability of the winning outcome: - `NoulAnswer`: `max(noul, 1 - noul)` - `ChoiceAnswer`: `p_max` (the probability of `choice`) - `ScoreAnswer`: `p_max` (the highest probability in `probabilities`).
    • withLegend

      public ScoreAnswer withLegend(@Nonnull Map<String,String> legend)
      Required. Output only. Rubric description for each non-empty 0-based level index.
    • withProbabilities

      public ScoreAnswer withProbabilities(@Nonnull Map<String,Double> probabilities)
      Required. Output only. Closed-world normalized probability in `[0, 1]` for each 0-based level index.
    • withScore

      public ScoreAnswer withScore(double score)
      Required. Output only. Probability-weighted expected score (`sum_k k * probability_k`).
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object