Skip to main content

Type Alias: EvaluationQuestion

EvaluationQuestion = { criteria: Readonly<Record<string, EvaluationInput | null>>; instructions: EvaluationInput; type: "choice"; } | { criteria: readonly (EvaluationInput | null)[]; instructions: EvaluationInput; type: "score"; } | { criteria?: { false?: EvaluationInput | null; true?: EvaluationInput | null; }; instructions: EvaluationInput; type: "boolean"; }

Defined in: packages/workflow-engine/src/ai/types.ts:183

One judgment to make about the shared state.

  • choice: pick one of the named options in criteria.
  • score: place the state on an ordered scale; criteria lists the levels from lowest to highest (at least two).
  • boolean: the probability that the statement in instructions is true. criteria is optional; when given, both true and false must be.

Union Members​

Type Literal​

{ criteria: Readonly<Record<string, EvaluationInput | null>>; instructions: EvaluationInput; type: "choice"; }

criteria​

readonly criteria: Readonly<Record<string, EvaluationInput | null>>

Option name to description. At least one option.

instructions​

readonly instructions: EvaluationInput

type​

readonly type: "choice"


Type Literal​

{ criteria: readonly (EvaluationInput | null)[]; instructions: EvaluationInput; type: "score"; }

criteria​

readonly criteria: readonly (EvaluationInput | null)[]

Ordered levels, lowest first, indexed from zero.

instructions​

readonly instructions: EvaluationInput

type​

readonly type: "score"


Type Literal​

{ criteria?: { false?: EvaluationInput | null; true?: EvaluationInput | null; }; instructions: EvaluationInput; type: "boolean"; }