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

Step 3: Reviewing and Editing Validation Scripts

Before running your checks, it is important to review the AI-generated scripts to ensure they match your expectations. The AI acts as a copilot — it handles the bulk of script generation, but human review is essential to catch edge cases, confirm business logic, and ensure accuracy.

Review the Generated Code

Expand any check in the Checks view to see the full validation script. Each script is self-contained Python code that targets a single question. Read through the logic to confirm it aligns with the questionnaire's intended behavior.

Once you are satisfied that a script is correct, you can mark it as Reviewed. This helps you track progress across a large survey — you can quickly see which checks have been vetted and which still need attention.

Make Manual Edits

If the generated script needs adjustments, you can edit it directly in the built-in code editor. Changes are saved within the project. Metaforms respects your manual edits — any code you write or modify will be preserved, even if you later ask the AI to regenerate other parts of the project.

This is useful for adding custom checks that go beyond the standard validations (e.g., cross-question consistency rules) or correcting a check where the AI misinterpreted the questionnaire logic.

Use the AI Chat to Modify Scripts

Instead of editing code directly, you can use the AI chat interface to request changes in natural language. For example:

  • "Add a check that Q3 should be skipped if Q1 equals 2."

  • "The termination condition for S1 should flag respondents who answered 'No' but were not terminated."

  • "Change the valid range for Q7 from 1–5 to 1–7."

The AI will update the script accordingly. If your instruction is ambiguous, it will ask clarifying questions before making changes. This makes it accessible even if you are not comfortable writing Python code yourself.

Last updated

Was this helpful?