Building a AI agent

AI agents are smart bots that answer questions from a data source.

AI agents are all the rage these days, thanks to ChatGPT.

ChatGPT has opened a new way of asking questions and getting answers – that are accurate, brief, and quick.

Here are the steps to build your own AI agents:

Step 1: Creating a bot

Next, we need to build a bot that will speak with the visitor and use this knowledge base to fetch the answers to questions asked.

Go to Bot Builder > Build a bot > Inbound > Web

Step 2: Creating a AI agent block

Choose the "AI agent" block from the list and create a new AI agent from the right panel.

Step 3: Setting up the AI agent

The fundamentals of an AI agents are — Prompt, Functions, Paths, LLM settings.

Prompt

A prompt guides the AI on how you want the answer to be generated. Write a clear and concise instruction. Or you can use the "Generate prompt" button to get it auto-generated for you.

Learn more

Functions

Function allow the AI agent to dynamically execute a function to provide contexual responses. For example, you can create function to "fetch order status", "cancel a order" etc which allow the conversation to feel more natural and powerful.

Learn more

Paths

By default, the AI agent will run on a loop, answering any question it is asked. But if you want the AI agent to come outside of the execution loop, you can define paths.

Each path consists of a name, and a description that lets the AI know when should it take this path.

Every path you create displays a path on the canvas.

LLM settings

Depending on the scope of your project, you can choose the LLM model you prefer to use along with the max tokens used to provide a response and the temperature for the creativity in responses.

For each response the AI agent generates, a AI credit is consumed. Some models consume more credits while some less.

Learn more about AI credits

Step 4: Creating a knowledge base

Let's build a knowledge base, so the AI agent always refers to it when trying to generate an answer to a question.

  • Enable the "Use data from knowledge base" on the right panel

  • Create a Knowledge base

  • Start adding data sources

Learn more about knowledge base

NOTE:

  • More data sources, enable more accurate responses.

  • Train your website for more context about your business.

  • Setup refresh frequency for your website data sources, so that it is always up-to-date.

Step 5: Add your flow

Feel free to add more blocks if you have chosen to add paths in your AI agent.

Last updated

Was this helpful?