Templates
Templates in Metaforms help you apply consistent data validation logic across projects by defining how the AI should interpret variables and generate code. In the context of Data Processing, templates consist of two key components:
AI Rules – Instructions that guide how the AI interprets questionnaire variables and generates validation logic.
Macros – Predefined functions or code snippets used for applying common validation patterns across multiple variables or projects.
When to Use a Template
During DP project creation, you can select a template in the Set Up step. This will:
Load AI rules and macros into the current project
Influence how the AI builds validation checks
Improve consistency and reduce repetitive prompt-writing
How to create Templates?
Navigate to Preferences -> Select Templates -> Create Template

Give your template a name and Choose the Validation Tool (Python/SPSS)

Once created, you can setup your AI rules and Macros for every template

AI rules allow you to setup specific example scripts and explanations for these examples that can be used to cater specific use cases based on your requirements. Instructions allow you to setup guidelines for how Metaforms should consume these examples.
You can also use Macros for setting up your validation logic.

Last updated
Was this helpful?