# Iterate: LLM

The **Iterate: LLM** node can be applied in similar way to the [**Iterate: Iterate**](https://manuals.dialox.ai/studio/flows/nodes/iterate-iterate) node. This means it is most often used as a form of main menu in your Smart App: "What can I do for you today?".

Large language models (LLMs) are great at understanding user questions and provide sensible answers based on the information stored in the common knowledge of the language model. The [LLM Flows skill](https://manuals.dialox.ai/store/skills/llm-flows) adds this Flow node to your Flow designer.

The difference from the default [**Iterate**](https://manuals.dialox.ai/studio/flows/nodes/iterate-iterate) node is that it will use the LLM to provide an answer to the user if none of the links are triggered. If the LLM doesn't have an answer, it will still trigger the `__unknown__` dialog trigger, which you can configure on this node to handle this event.

## How to use?

As explained above, the **Iterate: LLM node** is used in the same way the default [**Iterate**](https://manuals.dialox.ai/studio/flows/nodes/iterate-iterate) node is used. The **Iterate: LLM** node will work as a main menu. It can either respond using one of the [labelled links](https://manuals.dialox.ai/studio/links#labelled-links), by triggering [dialog triggers](https://manuals.dialox.ai/studio/links#dialog-triggers-that-are-triggered-by-a-user-intent), or by formulating a response from the LLM.

<figure><img src="https://3356808761-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEBQHGJABNTj5ISSOTRxM%2Fuploads%2FYqR8gmVIszOLvr8TYPbe%2Fimage.png?alt=media&#x26;token=0577fcff-355a-4a30-82c1-8eb0255f5b7c" alt=""><figcaption><p>Example of how to use the Iterate LLM node in your Flow</p></figcaption></figure>

In the above example, the **Iterate: LLM** node will match the intents associated with the two labelled links "Talk to a human" and "Done". If the user doesn't appear to be asking for either of these intents, it will use the LLM to generate an answer.

The LLM can use a specific instruction from you (as the Smart App designer) to guide the generation of the answer. This instruction is given in the form of a Prompt. The prompt can be configured in the [AI section](https://manuals.dialox.ai/studio/ai) of the platform. Besides instructions, the prompt will also contain content that the LLM can use on top of its own dataset to generate answers, like information regarding your address, opening hours, parking instructions, etc. See the [Prompts](https://manuals.dialox.ai/studio/ai/prompts) page for more information on this topic.

## Node properties

| Property              | Description                                                                                                                                      | Explanation           |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------- |
| Question              | The initial question                                                                                                                             |                       |
| Repeat (1)            | The text to use when re-prompting the user after a turn                                                                                          | optional              |
| Repeat (2)            | The next text to use when re-prompting the user after a turn. The system will keep on iterating this step the third and all other turns          |                       |
| Prompt                | The [prompt](https://manuals.dialox.ai/studio/ai/prompts) which contains the instructions and content the LLM can use when generating a response |                       |
| Hold message          | The message spoken to the user while the LLM is generating its answer                                                                            | Only on phone channel |
| Hold message interval | The time between repeating the hold message in seconds                                                                                           | Only on phone channel |

## Resources

* [iterate-iterate](https://manuals.dialox.ai/studio/flows/nodes/iterate-iterate "mention")
* [links](https://manuals.dialox.ai/studio/flows/links "mention")
* [prompts](https://manuals.dialox.ai/studio/ai/prompts "mention")
* [llm-flows](https://manuals.dialox.ai/store/skills/llm-flows "mention")
* [ai](https://manuals.dialox.ai/studio/ai "mention")
