> For the complete documentation index, see [llms.txt](https://docs.chatlayer.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chatlayer.ai/~/changes/zWOY8fNiBBrqneKkuGvA/understanding-users/generate-expressions-llm-powered.md).

# 🆕Generate expressions (LLM powered)

Welcome to the new and easiest way to generate expressions for your bot!

> LLM: Large Language Model,

Go to your bot’s Intents page, click upon an intent and you will see the button 'Generate' on the left side of the 'Add expression' button:

If you don’t have any expressions for that intent yet, the name and description of the intent will be used as the prompt to generate the expressions:

<figure><img src="https://2786867680-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LLTwFwbOqJj4dDhg8Ju%2Fuploads%2F264VhD07HzFrptxDi7QS%2Fimage.png?alt=media&amp;token=cbd6c3ad-042d-424b-aa00-1fb4a57a04c0" alt=""><figcaption></figcaption></figure>

When you already have a set of expressions, those will be used to feed the request from the LLM and the expressions will be more tailored to what you need.

After clicking on Generate, you will see a pop-up with a handful of options and you can select all or some to add to your intent . The expressions can also be edited before you click on ‘Add selected’.

<figure><img src="https://2786867680-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LLTwFwbOqJj4dDhg8Ju%2Fuploads%2FnZdH3kbsnjewV54UXyCF%2Fimage.png?alt=media&amp;token=2b14a4c4-06d5-4c8a-8617-7383e8f3a05c" alt=""><figcaption></figcaption></figure>

After clicking ‘Add selected’, those expressions will be added to that intent.

Generate expressions also works with entities:

<figure><img src="https://2786867680-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LLTwFwbOqJj4dDhg8Ju%2Fuploads%2FzfyhkRuCcq9ZKoL6eNDC%2Fimage.png?alt=media&amp;token=908b04f0-e564-40d4-b6e0-cc577f842cdb" alt=""><figcaption></figcaption></figure>

It can detect the existing entities within the expressions, and you can also add or substitute parts of the generated expressions to include the entities.

<figure><img src="https://2786867680-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LLTwFwbOqJj4dDhg8Ju%2Fuploads%2F5tz9pueqb2tusISiogdJ%2Fimage.png?alt=media&amp;token=057a8d2e-72d9-4d1f-a608-800c53e17003" alt=""><figcaption></figcaption></figure>

If you select some of the expressions to be added to the prompt of the LLM model, then click 'Generate'; the generated expressions will be similar to the ones you selected.

<figure><img src="https://2786867680-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LLTwFwbOqJj4dDhg8Ju%2Fuploads%2FdLDwnlrsCraZOU2gcACF%2Fimage.png?alt=media&amp;token=743b1e88-c593-41e6-b35c-95721a665adf" alt=""><figcaption></figcaption></figure>

Happy bot building!


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.chatlayer.ai/~/changes/zWOY8fNiBBrqneKkuGvA/understanding-users/generate-expressions-llm-powered.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
