> ## Documentation Index
> Fetch the complete documentation index at: https://help.wotnot.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Answer AI

> The Answer AI block answers a single question using information from your Knowledge base and an LLM. Use it when you want an AI-generated answer at a specific point in a scripted flow without handing the entire conversation over to an AI Agent.

Process in which the Answer AI works,

1. User asks a question
2. AI generates the answer from a knowledge base

![Image](https://mintcdn.com/wotnot/YfQKl2QOkXpO0Wk_/images/image-37.png?fit=max\&auto=format\&n=YfQKl2QOkXpO0Wk_\&q=85\&s=bdd5a7eeb08b5d80d6ba1d69675e5b03)

> [!NOTE]
>
> Answer AI is available on all channels.

> [!NOTE]
>
> Answer AI uses AI credits each time it generates an answer. AI credit usage depends on the AI model and the response generated. See [AI credits](https://help.wotnot.io/account/billing.md) for more information about AI usage and plan availability.

# Using the Answer AI Block

Add the Answer AI block when you want your bot to answer a specific question from your knowledge base while keeping the rest of the conversation flow under your control.

# Configuration

### Knowledge Base

Select the **Knowledge base** that Answer AI should use to generate its response.

The selected knowledge base provides the information that Answer AI uses to answer the question. Make sure the knowledge base contains the information you expect the user to ask about.

[Learn more](https://help.wotnot.io/build/knowledge-base.md)

### Prompts

A prompt is nothing but an instruction that helps the LLM know what to remember and follow while generating an answer.

The more clear, concise and brief your instruction, the more accurate your answers will be from the AI.

Things to write in your prompt:

* **Objective** - What is its objective
* **Output format** - Typically would be HTML/markdown.
* **Writing style** - How should the answers be written.
* **Don'ts** - Clear instructions of what to avoid.
* **Examples** - Examples of question and answer.

[Learn more about Prompt](https://help.wotnot.io/build/prompts.md)

### Question Source

Choose where Answer AI should get the question it needs to answer.

You can use:

* **Latest user message** — Uses the user's most recent message as the question.
* **Variable** — Uses the value stored in a selected variable as the question.

Use a variable when the question is collected or generated earlier in the flow and you want Answer AI to respond to that specific value.

### Fallback Behaviour

A fallback helps prevent the bot from providing an unsupported response when the required information is not available.

Depending on your flow, you can use the fallback to:

* Tell the user that the information is unavailable.
* Ask the user to rephrase the question.
* Route the conversation to another block.
* Transfer the conversation to a human agent.

Keep the fallback message clear so the user knows what they can do next.

### Execute Functions

Execute Functions allows Answer AI to use configured functions while generating an answer. Functions can retrieve real-time information from an external system or perform an action, instead of relying only on the information available in the knowledge base.

* Use **Execute Functions** when the answer requires **dynamic data, an API call, or an action** that cannot be provided by the knowledge base alone.
* You can select multiple functions from the dropdown.

For example, if a user asks **“Where is my order?”**, Answer AI can execute an **Order Status** function that retrieves the latest order status from your system and uses the result to respond:

> “Your order #12345 is out for delivery and is expected to arrive today.”

![Image (5) 4](https://mintcdn.com/wotnot/ez0GlzggSLvSJ5j6/images/image-\(5\)-4.png?fit=max\&auto=format\&n=ez0GlzggSLvSJ5j6\&q=85\&s=df06e486045ec9449af731cd9194df30)

# Advance Settings

![Image](https://mintcdn.com/wotnot/ez0GlzggSLvSJ5j6/images/image-453.png?fit=max\&auto=format\&n=ez0GlzggSLvSJ5j6\&q=85\&s=8c1e2a03d8ebbf284d473b980bd748c3)

### AI Model

Select which AI model (e.g., GPT-3, GPT-4) you want to use for generating responses. Models offered:

* Open AI
* Anthropic
* Google Gemini
* Custom Models *(Available on Enterprise plan)*

[See the supported models list](https://app.mintlify.com/wotnot/wotnot/~/60b3940f-3b2f-47f2-a162-0878087880d3)

### Max Tokens

A **token** is a small unit of text that an AI model processes when reading your question, knowledge base content, or generating a response.

**Example:**

If a user asks:

> “What is your refund policy?”

The AI breaks the text into smaller pieces called **tokens** before processing it.

* **1 token ≈ 4 characters** but actual token usage may vary depending on the language, words, and AI model.
* Shorter responses use fewer credits, and longer or more complex responses use more. You only pay for what you actually use.

> [!TIP]
>
> **Value should be between 1 - 2000**

### Temperature

You can control whether you would like to receive unique responses every time a question is asked or get the same response every time the question is asked.

Define a number between 0 and 1. Nearer to 1 gives you distinct responses; nearer to 0 gives you fix responses. By default, we keep the number as **0.5**.

### Chunks

When the AI is asked a question, it first fetches relevant content from the knowledge base, which is then sent to the LLM model to generate an answer.

The more relevant content the AI can fetch, the more chances of accurate responses are.

The number indicates the number of relevant responses which will be fetched from the knowledge base.

Select the number of knowledge base **chunks** Answer AI should use when generating a response.

> [card] Choose a value between 1 and 10 from the dropdown.
>
> * A lower number uses fewer chunks and can produce a more focused response.
> * A higher number gives Answer AI more relevant knowledge base content to consider when answering the question.

### Collect Feedback

For every AI generated response, we allow the user to submit feedback about the generated answer.

This helps you know how helpful are AI's answers.

### Answer Source

Displays the URL of the content source from where the answer was referenced from. This only works for knowledge bases built using a website URL.

### Include Chat History

Enabling this will include the entire chat history of the chat when answering any question.

This helps when user asks follow-up questions as 'its pricing', and the LLM would be aware that your previous question was about WotNot, so you meant "WotNot's pricing'.

### Add an info message

Displays an info icon with helper text to provide additional context about this message.

You can add Text and Description here.

> [!NOTE]
>
> **Available only in WEB CHANNEL**

![Image (6) 4](https://mintcdn.com/wotnot/ez0GlzggSLvSJ5j6/images/image-\(6\)-4.png?fit=max\&auto=format\&n=ez0GlzggSLvSJ5j6\&q=85\&s=318541508dee61fb6c72f358dfd82375)

# Output Path

**Self Loop**

After the AI answers the user's question, the conversation remains active. The user can continue asking relevant questions without starting a new conversation.

![Image (4) 5](https://mintcdn.com/wotnot/ez0GlzggSLvSJ5j6/images/image-\(4\)-5.png?fit=max\&auto=format\&n=ez0GlzggSLvSJ5j6\&q=85\&s=7f5eaa8eae43d191929a78ea98a8257f)

**Fallback path**

The **Fallback path** is triggered when the LLM model fails to return a response due to an outage.

You can use this path to define an alternative flow for the user when the AI is unable to generate a response. You can connect another block to the Fallback path based on how you want to handle the situation.

**Example**

If the **Answer AI** block fails to generate a response, you can connect the **Talk to Human** block to the Fallback path:

```text theme={null}
Answer AI
    ↓
Fallback path
    ↓
Talk to Human
```

![Image](https://mintcdn.com/wotnot/ez0GlzggSLvSJ5j6/images/image-449.png?fit=max\&auto=format\&n=ez0GlzggSLvSJ5j6\&q=85\&s=1b74f3ff2390a149527ed11d9ee69152)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.