# Iterate: LLM Knowledge base

The **Iterate: LLM Knowledge base** node is used in the same way the [default Iterate](/studio/flows/nodes/iterate-iterate.md) or [Iterate: LLM](/studio/flows/nodes/iterate-llm.md) node is used. 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 [**Iterate: LLM**](/studio/flows/nodes/iterate-llm.md) node solely relies on a predefined but limited prompt instruction to answer the user. This node, however, will also use a Knowledge base on top of this prompt instruction. This [knowledge base](/studio/ai/knowledge-bases.md) can be configured in the [AI section](/studio/ai.md).

## What is a Large Language Model?

A Large Language Model is a type of artificial intelligence (AI) model designed to understand and generate human-like text based on the input it receives (prompts). These models are trained on massive datasets of text from books, articles, websites, and other written content, enabling them to process and generate coherent language.

This node uses the ChatGPT models from OpenAI together with the Assistants API, hosted on the Microsoft Azure platform to answer the users of your Smart app.

## What is a knowledge base?

A **knowledge base** is a centralized repository for information, designed to store, organise, and manage knowledge in a way that makes it easily accessible and usable for a specific purpose. Knowledge bases are commonly used by organisations, apps, and systems to provide self-service support, streamline workflows, and enhance decision-making.

## How to use?

As explained in the introduction, the **Iterate: LLM Knowledge base** node works the same way as the **Iterate: LLM** node, adding the ability to use a predefined knowledge base as its knowledge. Also, the **Iterate: LLM Knowledge base** works as a menu. It either responds due to one of the [labelled links](/studio/flows/links.md#labelled-links) or [dialog triggers](/studio/flows/links.md#dialog-triggers-that-are-triggered-by-a-user-intent) being triggered, or otherwise responds from the LLM.

<figure><img src="/files/0uSEbEbhuqnIASA9qxWE" alt=""><figcaption><p>Example of how to use the node in your Flow</p></figcaption></figure>

In the above example, the **Iterate: LLM Knowledge base** will match the intents associated with the two labelled links "Talk to a human" and "Done". When the user doesn't appear to be asking for one 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 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](/studio/ai/prompts.md) 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](/studio/ai/prompts.md) which contains the instructions and content the LLM can use when generating a response              |                       |
| AI Knowledge base     | The [knowledge base](/studio/ai/knowledge-bases.md) for the LLM to use to generate answers to the user                                  |                       |
| 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 |

## Limitations

The knowledge base limitations are described in the [knowledge base page in the AI section](/studio/ai/knowledge-bases.md).

## Resources

* [LLM Knowledge base](/store/skills/llm-knowledge-base.md)
* [Iterate: Iterate](/studio/flows/nodes/iterate-iterate.md)
* [Iterate: LLM](/studio/flows/nodes/iterate-llm.md)
* [Links](/studio/flows/links.md)
* [Knowledge bases](/studio/ai/knowledge-bases.md)


---

# 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://manuals.dialox.ai/studio/flows/nodes/iterate-llm-knowledgebase.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.
