Conversational Chat Design
This guide will show you how to design a Chat support agent with the knowledge of your internal documentation.
Adding context
Adding Context to your Action is a crucial step in the design process. Context is the knowledge that your Action will use to answer questions. In this example we will be using the Klu documentation as our context.
Before we dive into creating an agent, let's first set up the context for your agent. Navigate to the Integrations
tab on the left hand side and from there go to the Context Library
tab.
There click on the Add Context
button and add in the name and description of your context. For this example we are going with:
Name
Klu DocsDescription
Klu DocumentationLoader
Crawler
In the optional configuration section you add the homepage and the max_depth of the crawler. For this example we are going with:
Homepage
https://docs.klu.aiMax Depth
1000 (this is how many pages the crawler will go through and index for you)
Replace the values above with your support documentation. Once you are done, click on the Create Context
button.
This will kick off a little background task which will go through your documentation and index it for you.
Creating the Chat Action
We have the context ready and it is now time to set up our Chat Action. From the list of options let's select the Document Search
option.
Once you are in the action creation modal you can give your Action a name and a description. For this example we are going with:
Name
Klu Support agentDescription
Answers customer feedback questionsContext
Klu Docs
Prompt Template
You are a helpful customer support agent.
You answer customer queries based on the Klu.ai documentation with gusto!
If you are unsure or don't have enough information, suggest emailing support.
Starting a conversation session
- Name
Session
- Type
- Description
A session is a conversation between a user and an agent. Within a session the agent has memory of previous questions.
From the action edit page click on the Start Conversation
button. This will take you to a new page where you can ask your question and start the conversation. The agent will rememeber all of your questions within a conversation and Klu will dynamically manage the prompt size for you.
Now let's ask our support agent how to create a new action. As you can see below it answered the question in a detailed matter. You can tweak the prompt to suit your needs and enhance it by doing few shot learning and show it a few examples that fit with your brand guidelines.
With Klu, you have a full list of all the conversations that happened. So you can see exactly how the agent behaves over time.
Deploy your Agent
Deploying an agent with Klu is as easy as creating an action. From the deploy model you will be presented with the standard 4 options:
- Shareable Public URL
- API call (with a cURL example)
- Python SDK
- TypeScript SDK
You will be ready to integrate this into your product in no time.