Class ChoiceAnswer
java.lang.Object
com.google.genai.gaos.models.decisions.ChoiceAnswer
- All Implemented Interfaces:
Answer
ChoiceAnswer
Calibrated result for a `ChoiceQuestion`.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionChoiceAnswer(String choice, double confidence, Map<String, Double> probabilities) -
Method Summary
Modifier and TypeMethodDescriptionstatic ChoiceAnswer.Builderbuilder()choice()Required.Required.booleaninthashCode()Required.toString()type()withChoice(String choice) Required.withConfidence(double confidence) Required.withProbabilities(Map<String, Double> probabilities) Required.
-
Constructor Details
-
ChoiceAnswer
-
-
Method Details
-
choice
Required. Output only. The option ID with the highest probability. -
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`). -
probabilities
Required. Output only. Closed-world normalized probability in `[0, 1]` for each option ID. -
type
-
builder
-
withChoice
Required. Output only. The option ID with the highest probability. -
withConfidence
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`). -
withProbabilities
Required. Output only. Closed-world normalized probability in `[0, 1]` for each option ID. -
equals
-
hashCode
public int hashCode() -
toString
-