> 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/specializations.md).

# Specializations

Before generating code, help the AI understand what kinds of questions and logic your survey includes. **Specializations** act like a blueprint, they guide the AI to use the most relevant structures, tags, and logic patterns for your specific questionnaire.

Not all surveys are the same - some are simple with just multiple-choice questions, while others involve complex skip logic, quotas, or loops. Enabling the right specializations:

* Improves code accuracy
* Reduces post-generation edits
* Helps AI understand the complexity of your project

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

## **Basic Specializations**

These cover the most common question types used in standard surveys:

* **Radio / Checkbox / Select Questions**
* **Number / Text Questions**
* **Hidden Questions**
* **Pipe Tags**

## **Advanced Specializations**

For surveys with more complex requirements, you can enable advanced modules:

* **Answer Validation**
* **Loops & Nested Loops**
* **Quotas**
* **Sample Participant Sources**
* **Images / Data Lookup / Scripting**

{% hint style="info" %}
Some items (e.g., Segmentation, Hybrid Questions) require advanced access to enable.
{% endhint %}

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

## What is Used Capacity?

There is a **defined total specialization capacity** for AI, which is visually represented by the **capacity bar** on the right side of the screen.

The total available capacity is dynamically determined based on the **length of the questionnaire**. Shorter surveys allow you to select **multiple specializations** at once, while longer surveys may restrict this to fewer selections.

{% hint style="info" %}
If you need to apply multiple specializations but can’t select them all at once, try this workflow:

1. Start by selecting one specialization (e.g., **Hybrid Questions**) and generate the code.
2. Then, switch to the next specialization (e.g., **Custom Styles and Scripting**).
3. Use **Edit with AI** to enhance or modify the previously generated code based on the new specialization.
   {% 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/specializations.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.
