# How to Configure AI-text-generation

{% hint style="warning" %}
You need a basic understanding of attributes to follow this guide. For more information, see the guide: [Attributes](/reference/settings/data-models/attributes.md).
{% endhint %}

Our AI text generator works only with the [Text](/reference/settings/data-models/attributes/attribute-details/data-type-details.md#text) data type.\
When "Text" is selected, click "Show Advanced Data Type Settings" and enable the AI Assistant. You can then click "Configure" to set up the AI Assistant for that specific attribute.

This is the first thing you see when you press "Configure"**:**

<figure><img src="/files/gYyIBuGWYDEF8FSsEISk" alt=""><figcaption><p>Empty AI assistant configuration.</p></figcaption></figure>

Click "Add" to create a new command for the AI text generator.\
You will now see several empty fields. I will guide you through each of them, but it should look similar to this:

<figure><img src="/files/P7f2n3CrbUTGxVhsj7ZI" alt=""><figcaption><p>First look of a AI assistant command.</p></figcaption></figure>

#### Command name

The name of the command. This will appear both in the configuration as the command name and as the option name in the AI Assistant chat (see [Example](/tutorials/guides/how-to-use-ai-generated-text/example-of-commands.md)).

#### Base command

The instruction sent to the AI Assistant when this command is selected. This helps ensure consistent description layouts across fields, for example, if you want all products to follow the same professional tone and structure with a headline and subheadings.

#### Information type

Options include "Free Text", "Technical Data on Attributes", and "Text on Specific Attributes":

* Free Text – Allows you to add any additional instructions to the Base Command.
* Text on Specific Attributes – Lets you select specific attributes for the Base Command to use as extra information.
* Technical Data on Attributes – Uses all attributes from an attribute scope as information for the Base Command.

#### Default target language

The language set as default for the command.

#### Override default AI model

Allows you to select a different OpenAI model for this specific command.

### Example of a command

<figure><img src="/files/LjjSwNyLLtCUpIt2oqOq" alt=""><figcaption><p>An example of a simple command.</p></figcaption></figure>

Here is an example of a simple command for generating a product description. The "base command" specifies that the output should be a professional-sounding product description of my products, formatted into three paragraphs with a headline for each. Each headline should be wrapped in the appropriate HTML tag. Finally, the command clearly instructs the AI to use the information provided from the selected "Information type" to ensure that all available details are incorporated into the description.


---

# 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://docs.struct.com/tutorials/guides/how-to-use-ai-generated-text/how-to-configure-ai-text-generation.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.
