# How to use AI-text-generator

{% hint style="warning" %}
To follow this page, you should first read: [How to set up AI-text-generator](/tutorials/guides/how-to-use-ai-generated-text/how-to-set-up-ai-text-generator.md) and [How to Configure AI-text-generation](/tutorials/guides/how-to-use-ai-generated-text/how-to-configure-ai-text-generation.md).
{% endhint %}

### How to on a single product

You should be viewing a product that has an attribute with the AI Assistant enabled. \
Click on ![](/files/mSghRbTSjFZ6lMSz9BE3), to open the text generator AI chat, then follow the chat instructions to get a text generated for you by AI, in the last step of the chat you can then choose if you want to copy it directly to the text field or if you want to copy it to clipboard.&#x20;

#### Example:

I want to generate a short product description. I have created a command that summarizes my long description, with a maximum limit of 500 characters.

<figure><img src="/files/bbKQBtiNfXxIvXA0wdoU" alt=""><figcaption><p>Introduction to AI assistant.</p></figcaption></figure>

Here, you can see it provides the information I requested (long description) and allows me to either fine-tune it or use it as is.

<figure><img src="/files/bhaxsTwY1bvK5ul4Onqz" alt=""><figcaption><p>Confirm information.</p></figcaption></figure>

I chose to use it as is, and it generated a short description of the product by summarizing my long description. I can now either insert it directly into the short description field, copy it to my clipboard, or edit the output by providing additional instructions to the assistant in the text field.

<figure><img src="/files/unPRrFLelTqI8vNIorI8" alt=""><figcaption><p>Confirm what to do with the output.</p></figcaption></figure>

### How to on multiple products

Go to a category with products that have at least one attribute enabled for the AI Assistant.\
Select the products you want to generate text for, click the three dots above the products, and choose "Generate Texts".

<figure><img src="/files/ZKw0xJ5YZLW6qpGu6exP" alt=""><figcaption><p>Showcasing where to click for multiple product text generation.</p></figcaption></figure>

From here, follow the AI Assistant. At the end, it will ask whether you want to approve before saving or save automatically.

If you choose to approve before saving, click "Report" to view the results. In the report, you can choose to "Approve All", "Decline All", "Approve" individual results, "Decline" individual results, or "Edit" them.

#### Example:

For multiple products, you must choose your command. Some commands are specific to certain fields. In this example, two commands are for the long description field, and one is for the product name field.

<figure><img src="/files/miENyPISqKkVuGnWLxxf" alt=""><figcaption><p>Choose a command.</p></figcaption></figure>

It then asks whether to approve before saving or save the text immediately. I choose to approve before saving to quickly review the changes and confirm them.

<figure><img src="/files/jX3vAHrq3C2LeHAsIEie" alt=""><figcaption><p>Select to approve or not.</p></figcaption></figure>

Whether you choose to approve before saving or not, you receive a link to the report where you can review the changes, and, if applicable, confirm them.

<figure><img src="/files/boyJFfMvlOI2ry12o2FB" alt=""><figcaption><p>Report of the generated text.</p></figcaption></figure>


---

# 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-use-ai-text-generator.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.
