DeciderAnswer class final

A decider's answer.

Annotations

Constructors

DeciderAnswer({required String? choice, required List<RankedOption> ranked, required ScoreKind scoreKind, required double margin, required DeciderProvenance provenance, double? confidence, AbstainReason? abstainReason, Map<String, double>? probabilities, DeciderQuestionType questionType = DeciderQuestionType.choice, Map<String, String>? legend})
For deciders implemented outside core (and test fakes). Lists are copied.

Properties

abstainReason → AbstainReason?
Why the decider abstained; null when it chose.
final
choice → String?
The chosen option's id, or null when the decider abstained.
final
confidence → double?
Jev's confidence, (N · pmax − 1) / (N − 1) over the N candidates: 0 for a uniform distribution, 1 when one option takes all. A spread measure, not an accuracy. Null unless probabilities are calibrated, and with fewer than two candidates.
final
expectedLevel → double?
A DeciderQuestionType.score answer's expected level, Σ pᵢ · i over the levels 0 … K − 1; null for other types. choice is the most probable level, which can differ from the expected one.
no setter
hashCode → int
The hash code for this object.
no setterinherited
legend → Map<String, String>?
A DeciderQuestionType.score answer's text for each level, by level id; null for other types. Unmodifiable.
final
margin → double
Best score minus the runner-up's: how clearly the top candidate won. double.infinity with a single candidate, 0 with none.
final
noul → double?
A DeciderQuestionType.noul answer's probability of yes (probabilities['yes']); null for other types.
no setter
probabilities → Map<String, double>?
Every candidate's calibrated probability (they sum to 1), not only the ranked ones. Null unless the decider's probabilities are calibrated.
final
provenance → DeciderProvenance
Where this answer came from.
final
questionType → DeciderQuestionType
The kind of question this answers; what toJevJson writes. DeciderQuestionType.choice for every embedding decider.
final
ranked → List<RankedOption>
The best candidates, best first, at most topK of them. On a tie the option given first ranks first. Unmodifiable.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scoreKind → ScoreKind
What the scores in ranked are.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJevJson() → Map<String, Object?>
The answer in Jev's answer shape for its questionType:
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited