Skip to main content
The prompt is the full set of instructions and information a model receives to answer a question. EDSL assembles it from question text, answer-format instructions, scenario values, agent instructions, and any prior answers supplied through piping or memory. Reading it helps you see the task from the model’s perspective—for example, whether a document passage or an earlier answer is actually present.

Inspect before execution

This example builds a classification job and renders its prompts without generating answers. Prompt cost information may depend on available model-pricing metadata.
The table contains user_prompt and system_prompt: the question-specific material and the surrounding instructions EDSL prepares for the model. Read them together with the row’s question and input identifiers. For a classification task, you should see the source text and allowed categories; reference labels kept only for later evaluation should not appear.

Change instructions deliberately

Use Agent(instruction=...) to change respondent instructions. Use a question’s answering_instructions for answer requirements, and scenario values for varying inputs. Preserve the required response format when customizing instructions. Piped answers and memory depend on earlier responses. A preview cannot show answers that have not yet been generated. Use the recorded prompts after execution to see the actual earlier answers supplied to a follow-up question. Providers may format these instructions differently, so compare prompts with the selected model in mind.

Inspect after execution

After running the job above with configured model access:
This executes model calls and may incur costs. Keep the prompts and model settings with your exported answers so that a comparison can be audited. See Prompt sensitivity for comparing alternative wording.

Common methods

To try a template locally:
Rendering this template makes no model call. Use job.prompts() to inspect the full instructions that EDSL assembles for a study. Prompt.from_txt("instructions.txt") loads prompt text from a local file. Prompt.from_template("instructions.jinja2", path_to_folder="templates", **values) loads and renders a template. Before rendering, prompt.undefined_template_variables(values) identifies missing variables and prompt.unused_traits(values) identifies supplied keys that the template does not use.