# 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="/files/yH2Gq07AwPfFqRm5DGOu" 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: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
