For the complete documentation index, see llms.txt. This page is also available as Markdown.

Prompting & Workflow Best Practices (Qualtrics)

Use these practices when you program surveys in Metaforms. Explicit, scoped instructions produce more accurate questions, reduce debugging, and shorten programming time.

These patterns come from real Metaforms projects.

Core principle: state the outcome and the constraints

Describe the result you want before generation starts. Name the questions in scope, the structure to follow, and what must stay unchanged.

Avoid

Prefer

Generate everything and fix errors later

Generate a small batch, then review it

Short instructions

Explicit instructions

Debug after every generation

Type the change in the prompt box

Use the prompt box for a tiny fix

Edit manually when a fix takes 5–10 seconds

Leave requirements implied

State the constraints directly

Prompt examples

These examples are Qualtrics programming tasks you can paste into the prompt box. Each one names the questions, the Qualtrics behavior, and what must stay unchanged. Open a tab, then copy the prompt at the bottom.

Generate the next batch of questions exactly as written in the questionnaire.

Constraints

  • Name the question range to generate.

  • Add settings the questionnaire doesn't state, such as force response.

Focus

Generate only the questions you name.

Result

Q12, Q13, and Q14 are added to the survey as written in the questionnaire. Respondents must answer each one before they can move on.

Correct the question type or validation on questions that are already in the survey.

Constraints

  • Match each question type to the questionnaire.

  • Keep the existing question text, numbering, and answer choices unless the prompt says to change them.

Focus

Fix only the questions you name.

Result

Q15–Q17 become numeric list questions. Respondents can enter only numbers in them.

Show or hide a question based on an earlier answer.

Constraints

  • Add display logic only on the question you name.

  • Keep the question text and answer choices unchanged.

Focus

Set the display condition from the questionnaire.

Result

Respondents who answer Yes at Q7 see Q8. Everyone else skips it. Q8 itself looks the same as before.

Store an answer in embedded data and pipe it forward.

Constraints

  • Use the embedded data field named in the prompt.

  • Pipe from the source question only.

  • Leave the visible question text and choices unchanged.

Focus

Create the embedded data field and the pipe for that question.

Result

S7b is added along with a hidden variable, hS7bx1, that stores the S7b answers so later questions can use them. Respondents don't see hS7bx1.

End the survey for respondents who don't qualify. Metaforms adds a branch to Survey flow, right after the Screener block, with an End of Survey element inside it.

Constraints

  • Name the screener questions and the answers that disqualify a respondent.

  • Say where the branch goes in Survey flow.

  • Say how the survey should end, for example as a screen-out.

Focus

Add only the branch and the End of Survey element.

Result

Respondents who pick "Under 18" at S1 or "None of these" at S3 leave the survey as a screen-out right after the Screener block. Everyone else carries on.

Format respondent instructions on questions that are already created.

Constraints

  • Change only the respondent instructions.

  • Keep question text, question type, and answer choices unchanged.

Focus

Apply the formatting to each respondent instruction in the survey.

Result

Every respondent instruction appears in brackets on its own line under the question, for example (Mandatory to answer).

Update questions that sit inside a loop.

Constraints

  • Edit only the questions you name.

  • Keep those questions inside the existing loop.

Focus

Update Q21–Q23 where they already appear in the loop.

Result

Q21–Q23 are updated where they sit in the loop and stay inside it. Other loop questions are unchanged.

Last updated

Was this helpful?