> 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/survey-programming-decipher/legacy-flow/build-page-walkthrough/xml-editor/generate-with-ai.md).

# Generate with AI

**Generate with AI** helps you to auto-generate or edit XML code directly.

You can trigger it by:

* Hitting `Cmd + K` or `Ctrl + K`
* Clicking the **Generate/Edit** button at the top of the XML Editor

This will show up a widget that you can use to generate blocks of questions - 3, 5, 10, all

<figure><img src="/files/VYttuQxaGPq7q8N5dtUW" alt=""><figcaption></figcaption></figure>

You can either directly generate the XML by clicking on Generate or provide specific instructions to the AI for the questions.\
\
You can easily access the earlier (historical) prompts by using the :arrow\_up: / :arrow\_down: arrow keys for history.

{% hint style="info" %}
It is recommended to make any necessary edits to the generated questions before generating the next set of questions. This allows the AI to follow similar formats for the next generations.
{% 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:

```
GET https://help.metaforms.ai/survey-programming-decipher/legacy-flow/build-page-walkthrough/xml-editor/generate-with-ai.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.
