Skip to main content
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

This defines a welcome page, one feedback question, and a closing page. A supported human survey interface displays the messages with Continue or Finish, without an answer box.

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:
The message participates in ordinary navigation, including back navigation and resume behavior in clients that support those features.

Running with language models

The following uses the routing example above and a fixed test response of No; 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:
If the message was visited, its recorded answer is "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:
When assembling a survey incrementally, 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 with survey.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.