ChoiceAnswer
Defined in: core/src/decisions.ts:47
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
Option extends string |
string |
Properties
Section titled “Properties”choice
Section titled “choice”choice: Option;Defined in: core/src/decisions.ts:49
confidence
Section titled “confidence”confidence: number | null;Defined in: core/src/decisions.ts:58
How peaked probabilities is, from 0 to 1. Not the probability of the pick.
TypeSafe’s own example spreads 0.57 / 0.43 and reports 0.35, so reading
it as P(pick) would put the pick below the option it beat. Null when the
host sent none.
probabilities
Section titled “probabilities”probabilities: Record<Option, number>;Defined in: core/src/decisions.ts:53
Every offered option’s probability. The whole distribution is kept because a caller acting on it needs more than the pick: the runner-up, P(yes) when the pick was no, a joint probability across two questions.
type: "choice";Defined in: core/src/decisions.ts:48