Choose a question type
These are common choices. The type details below explain their parameters and include examples. Use
ep schema list and ep schema show --question_type TYPE to inspect required parameters.
Construct questions
The example asks for three complementary measures of a message: a clarity category, an explanation, and a numerical score. It constructs the questions and survey without generating answers. A scenario supplies the message text when the survey runs.Names, inputs, and instructions
Use uniquequestion_name values within a survey; a question named clarity produces the column answer.clarity. The name identifies the variable in your analysis, while question_text contains the wording to answer. Put varying source material in Scenarios, respondent traits in Agents, and answer dependencies in Surveys.
Use question_text for the research question and answering_instructions for how to answer it. Inspect the generated Prompts before changing formatting instructions supplied by the question type.
Run a question
Questions can run individually or as part of a survey. Follow the Run your first survey tutorial for an executable local example and model setup.Common methods
For example, inspect a multiple-choice question’s definition:
Preview and vary a question
Userender() to substitute known values without calling a model. It returns a new question:
question.copy() makes an independent copy. For questions with a fixed list of options, question.draw(random_seed=42) returns a copy with shuffled options; pin_options=["Other"] keeps those options in their original positions. question.option_permutations() returns every ordering as separately named questions, so its size grows factorially with the number of options.
Use question.add_question(other_question) to build a Survey, or question.to_jobs() to prepare a job directly. question.run(...) is a one-question shortcut for execution; await question.run_async(...) is available in asynchronous Python. Both accept run options described under Jobs.
Question type details
Most types sharequestion_name and question_text. The table lists additional parameters for common response formats. Constructing these questions makes no model calls.
For option-based types that support
use_code, setting it to True asks for option indices; setting it to False asks for option values. The examples below use values explicitly where needed.
Select several options or rank them
Select several options or rank them
checkbox records a selection; rank preserves the requested ordering. Use top_k when you need a fixed selection count without ranking.Collect ratings or measurements
Collect ratings or measurements
Extract structured fields
Extract structured fields
feedback through a Scenario when running these questions. Use dict when you need to declare value types explicitly. Neither format establishes the factual accuracy of an extracted value.Rate several items together
Rate several items together
Additional types
EDSL also includes specialized types for Other responses (multiple_choice_with_other, checkbox_with_other), long choice lists (dropdown), structured validation (pydantic), and formats such as markdown and url. Inspect an example and its fields before adapting it:
ep schema show --question_type multiple_choice_with_other.
Choose a specialized type for the behavior you need:
For example, define a structured answer and a deterministic calculation:
coding requires model execution to generate an answer; double_score computes its answer from a scenario’s score when run. Validate specialized workflows with representative inputs before using them in a study.