> For the complete documentation index, see [llms.txt](https://help.metaforms.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.metaforms.ai/data-processing/build-page-walkthrough/validation-scripts/validation-scripts-spss.md).

# Validation Scripts - SPSS

Once on the Validation Scripts Page, use `cmd+K` / `ctrl+K` to toggle the Generate with AI widget.

You can then enter instructions for the AI to write the validation script for your Questionnaire.

<figure><img src="https://1402057010-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgtHd8o9ldznZ1hKHiZvc%2Fuploads%2FCQEuwITJQm4eO26V5lNP%2Fimage.png?alt=media&amp;token=4c31e69d-c5e4-4b32-b879-4ab5e8fa9de6" alt=""><figcaption></figcaption></figure>

Once the Script has been generated, you would see instructions for next steps:

* Copy the generated script in Metaforms. Paste it into your SPSS environment, run it and check for any syntax errors.
* Also review for any logical errors or missing checks.
* If there are any errors, you can correct them using Edit with AI or manually, before proceeding with next questions.

{% hint style="info" %}
Why is this needed?

Metaforms learns from any errors that have been corrected in the script. So the next time it generates, this error does not occur again.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.metaforms.ai/data-processing/build-page-walkthrough/validation-scripts/validation-scripts-spss.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
