Skip to content

Type Alias: DecisionChoiceQuestion ​

ts
type DecisionChoiceQuestion = {
  type: "choice";
  instruction: string | LlamaText;
  criteria: {
   [key: string]: string | LlamaText | null;
  };
};

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

A question that can be answered by selecting one option from a predefined set of choices.

See ​

Using Structured Decisions tutorial

Properties ​

type ​

ts
type: "choice";

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


instruction ​

ts
instruction: string | LlamaText;

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

The instruction describing how to answer the question.

For example, Which animal was mentioned in the chat?.


criteria ​

ts
criteria: {
[key: string]: string | LlamaText | null;
};

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

The options the model can choose from

Each key represents a choice, and the value is a description of that choice. You can set null for a choice to reuse its key as the description.

You can set up to 256 choices.

Index Signature ​

ts
[key: string]: string | LlamaText | null

Example ​

ts
{
    llama: "Llama",
    cat: "Cat",
    dog: "Dog",
    else: "Something else"
}