ChoiceQuestion interface

Question configuration for a Categorical Choice evaluation.

Signature:

export declare interface ChoiceQuestion 

Properties

Property Modifiers Type Description
criteria Record Map of choice keys to descriptive phrases or criteria.
options ClassifierOption[] Ordered list of candidate options with { label, description }. Can be provided instead of or alongside criteria.
temperature number Softmax temperature override (> 0.0). When unset or <= 0, the model's calibrated temperature is used.
instructions string Optional task instruction prompt for the model.
context string Optional domain or schema context prepended to instructions.
scoringMode number Scoring mode (0=SCORING_AUTO, 1=SCORING_SINGLE_TOKEN, 2=SCORING_FULL_OPTION). Defaults to 0 (SCORING_AUTO).
normalizePrior boolean Subtracts the memoized empty-context ("[None]") prior distribution in log-probability space to eliminate positional or label bias.
imageBytes Uint8Array Optional raw encoded image bytes (PNG, JPEG, WebP, or TGA) for the context.
audioSamples Float32Array Optional mono 16kHz PCM audio samples in [-1.0, 1.0] for the context.

ChoiceQuestion.criteria

Map of choice keys to descriptive phrases or criteria.

Signature:

criteria?: Record<string, string>;

ChoiceQuestion.options

Ordered list of candidate options with { label, description }. Can be provided instead of or alongside criteria.

Signature:

options?: ClassifierOption[];

ChoiceQuestion.temperature

Softmax temperature override (> 0.0). When unset or <= 0, the model's calibrated temperature is used.

Signature:

temperature?: number;

ChoiceQuestion.instructions

Optional task instruction prompt for the model.

Signature:

instructions?: string;

ChoiceQuestion.context

Optional domain or schema context prepended to instructions.

Signature:

context?: string;

ChoiceQuestion.scoringMode

Scoring mode (0=SCORING_AUTO, 1=SCORING_SINGLE_TOKEN, 2=SCORING_FULL_OPTION). Defaults to 0 (SCORING_AUTO).

Signature:

scoringMode?: number;

ChoiceQuestion.normalizePrior

Subtracts the memoized empty-context ("[None]") prior distribution in log-probability space to eliminate positional or label bias.

Signature:

normalizePrior?: boolean;

ChoiceQuestion.imageBytes

Optional raw encoded image bytes (PNG, JPEG, WebP, or TGA) for the context.

Signature:

imageBytes?: Uint8Array;

ChoiceQuestion.audioSamples

Optional mono 16kHz PCM audio samples in [-1.0, 1.0] for the context.

Signature:

audioSamples?: Float32Array;