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