list-checkAnswer Types

Answer types define the format of labels and how questions are rendered: binary (yes/no), continuous (numeric), multiple choice, or free response. Use the same answer type across your question generator, labeler, and renderer so labels and prompts stay consistent.

BinaryAnswerType

Yes/No probability estimates. Labels are 0 (No) or 1 (Yes). Prompts ask for a probability between 0 and 1.

BinaryAnswerType()

Use for: "Will X happen by date Y?", "Did X occur?"

ContinuousAnswerType

Numeric values with uncertainty. Labels are {mean, standard_deviation} distributions. Prompts ask for a mean and standard deviation.

ContinuousAnswerType()

Use for: "What will the S&P 500 close at?", "How many units will be sold?"

ContinuousValueOnlyAnswerType

Single scalar point estimates. Labels are a single float (e.g. 42.5). Use this when the model should output a point estimate rather than a full distribution. Scored via CONTINUOUS_VALUE_ONLY_LOG_SCORE.

ContinuousValueOnlyAnswerType()

Use for: "What will the U.S. CPI YoY inflation rate be for March 2026?", "How many units of X were sold in Q1?"

Prefer ContinuousAnswerType when you want uncertainty-aware predictions ({mean, stddev}). Use ContinuousValueOnlyAnswerType when you want a single number.

MultipleChoiceAnswerType

Categorical options. Labels are one of the allowed choices. Prompts list the options.

Use for: "Which candidate will win?", "What is the most likely outcome?"

FreeResponseAnswerType

Open-ended text. Labels are strings. No structured format.

Use for: "Summarize the key risks", "What is the main takeaway?"

Using Answer Types

Pass the answer type to your question generator, labeler, and renderer:

dataset.flattened() returns a list of flat dicts ready for use in training pipelines.

Example Builders

Use these helpers to produce formatted example strings for the examples and bad_examples parameters of question generators. Good examples guide the model toward well-formed questions; bad examples teach it what to avoid.

binary_example

continuous_example

multiple_choice_example

label and comment are mutually exclusive. Pass label for good examples (accepts an int index or the option text directly), comment for bad examples.

Last updated