Question configuration for a Boolean Predicate evaluation.
Signature:
export declare interface BooleanQuestion
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| condition | string | The natural language boolean condition to evaluate. Optional when both positiveExamples and negativeExamples are given, or when fittedHead is provided. |
|
| positiveExamples | string[] | Example inputs for which the answer is true / false. With both, embedding models fit a classifier on them. | |
| negativeExamples | string[] | ||
| inputPrompt | InputPrompt | How examples and inputs are embedded. Only used with examples. | |
| threshold | number | Probability threshold for true. Defaults to 0.5. | |
| temperature | number | Softmax temperature override (> 0.0). When unset or <= 0, the model's calibrated temperature is used. | |
| normalizePrior | boolean | Subtracts the memoized empty-context ("[None]") prior distribution in log-probability space to eliminate positional or label bias. | |
| options | ClassifierOption[] | Optional custom false/true option descriptions (defaults to Laya's "false: no, the statement does not hold" and "true: yes, the statement holds"). | |
| context | string | Optional domain or schema context prepended to the condition. | |
| 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. | |
| fittedHead | Uint8Array | Optional pre-fitted FittedHead binary payload (e.g. from exportFittedHeadBoolean()). Cannot be combined with two or more custom options. |
BooleanQuestion.condition
The natural language boolean condition to evaluate. Optional when both positiveExamples and negativeExamples are given, or when fittedHead is provided.
Signature:
condition?: string;
BooleanQuestion.positiveExamples
Example inputs for which the answer is true / false. With both, embedding models fit a classifier on them.
Signature:
positiveExamples?: string[];
BooleanQuestion.negativeExamples
Signature:
negativeExamples?: string[];
BooleanQuestion.inputPrompt
How examples and inputs are embedded. Only used with examples.
Signature:
inputPrompt?: InputPrompt;
BooleanQuestion.threshold
Probability threshold for true. Defaults to 0.5.
Signature:
threshold?: number;
BooleanQuestion.temperature
Softmax temperature override (> 0.0). When unset or <= 0, the model's calibrated temperature is used.
Signature:
temperature?: number;
BooleanQuestion.normalizePrior
Subtracts the memoized empty-context ("[None]") prior distribution in log-probability space to eliminate positional or label bias.
Signature:
normalizePrior?: boolean;
BooleanQuestion.options
Optional custom false/true option descriptions (defaults to Laya's "false: no, the statement does not hold" and "true: yes, the statement holds").
Signature:
options?: ClassifierOption[];
BooleanQuestion.context
Optional domain or schema context prepended to the condition.
Signature:
context?: string;
BooleanQuestion.imageBytes
Optional raw encoded image bytes (PNG, JPEG, WebP, or TGA) for the context.
Signature:
imageBytes?: Uint8Array;
BooleanQuestion.audioSamples
Optional mono 16kHz PCM audio samples in [-1.0, 1.0] for the context.
Signature:
audioSamples?: Float32Array;
BooleanQuestion.fittedHead
Optional pre-fitted FittedHead binary payload (e.g. from exportFittedHeadBoolean()). Cannot be combined with two or more custom options.
Signature:
fittedHead?: Uint8Array;