SurveyMessage adds a page of information to a survey without asking for an answer. It has a question_name and a position in the survey, so you can show it at the start, between sections, or on a particular branch.
Use it for introductions, consent or privacy information, section transitions, eligibility notices, and thank-you pages.
When you need a recorded choice, such as agreement to participate, use a question with explicit answer options alongside the information. A message’s continuation value records that the step was visited, rather than a substantive answer.
Basic usage
Routing to a message
Because a message is a normal survey node, rules can route respondents to it by name. This example sends ineligible respondents to a terminal message while eligible respondents continue to a follow-up question:Running with language models
The following uses the routing example above and a fixed test response ofNo; it makes no paid model calls. When an EDSL job reaches a SurveyMessage, EDSL records a deterministic response and continues without calling the language model:
"continued". If routing skipped it, it has no response. The deterministic value makes the visited path observable in Results without spending inference tokens on display-only content.
SurveyMessage versus Instruction
Use
Instruction when text should become model context for later questions. Use SurveyMessage when the text is itself a visible step in the survey experience.
For example, put an instruction before the questions it should affect:
survey.add_instruction(instruction) appends an instruction at the current point; add the subsequent questions after it. Instructions do not produce answer columns.
Human survey clients
Preview the survey withsurvey.preview() to check that the hosted interface displays the messages and follows the intended routes. Human survey interfaces must support the survey_message type. Messages need no answer-format settings in the Humanize schema because they collect no respondent input.