Skip to content

ChoiceAnswer

Defined in: core/src/decisions.ts:47

Type Parameter Default type
Option extends string string
choice: Option;

Defined in: core/src/decisions.ts:49


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: 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