Skip to content

Type Alias: DecisionChoiceAnswer<Question> ​

ts
type DecisionChoiceAnswer<Question> = {
  type: "choice";
  choice: Extract<keyof Question["criteria"], string>;
  confidence: number;
  probabilities: Record<Extract<keyof Question["criteria"], string>, number>;
};

Defined in: evaluator/LlamaDecisionContext/types.ts:131

Type Parameters ​

Type Parameter
Question extends DecisionChoiceQuestion

Properties ​

type ​

ts
type: "choice";

Defined in: evaluator/LlamaDecisionContext/types.ts:132


choice ​

ts
choice: Extract<keyof Question["criteria"], string>;

Defined in: evaluator/LlamaDecisionContext/types.ts:135

The selected choice from the given options


confidence ​

ts
confidence: number;

Defined in: evaluator/LlamaDecisionContext/types.ts:138

A number between 0 and 1 representing the model's confidence in the selected choice


probabilities ​

ts
probabilities: Record<Extract<keyof Question["criteria"], string>, number>;

Defined in: evaluator/LlamaDecisionContext/types.ts:141

A record mapping each choice to its probability, with values between 0 and 1