Skip to content

Question

Defined in: src/decisions/types.ts:42

A single question posed to a DecisionModel.

choices constrains the shape of the answer: 'boolean' yields a boolean, and a readonly tuple of strings yields that tuple’s union. In both cases Uncertain is also a possible answer unless opted out via uncertainty: false.

Type ParameterDefault typeDescription
C extends "boolean" | readonly string[]"boolean" | readonly string[]Static shape of the choices field. ask is declared with a const type parameter, so inline question maps keep their tuple literals without an explicit as const.
question: string;

Defined in: src/decisions/types.ts:44

The question posed to the model, in natural language.


choices: C;

Defined in: src/decisions/types.ts:46

Answer shape: 'boolean' or a non-empty readonly tuple of string literals.


optional uncertainty?:
| boolean
| {
minConfidence?: number;
};

Defined in: src/decisions/types.ts:55

Uncertainty configuration for this question.

  • omitted or true: Uncertain is a permitted response (default).
  • false: Uncertain is disabled; the model must commit to one of choices.
  • { minConfidence }: Uncertain is permitted, with a custom minimum confidence in [0.0, 1.0]. Read only by implementations that return per-answer confidence (e.g. System One models); ignored by LLMDecisionModel.