Learn how to create an AI Chat Bot that can answer questions from your customers.
Most companies, as they grow, have to deal with a growing volume of repetitive questions from their customers or users. Repetitive, however, does not mean that customers will start choosing to read through FAQ pages and find answers for themselves. It also doesn’t mean always the same or predictable enough for a simple if-this-then-that chat bot to work well enough.
In this example, I will show you how to take a typical FAQ (as can be found on the DHL website) and use it to build a knowledge base for the Quickchat AI chat bot that can have a conversation with a customer, provide support and answer their questions.
The very first steps you would take when setting up your AI chat bot in the Quickchat dashboard is by going to the Integrations tab and customising the look & feel of your chat window:
Once that’s done, we are ready to move on to the Knowledge base tab. First, we need to specify in a word or two the name of the product, service or project our AI will be talking about. In this case, DHL Shipping is a sensible choice. In the Short description field, we’re going to put DHL are specialists in international shipping and courier delivery services.
What’s left is the knowledge base field which is bulk of the work we need to do and the main focus of this blog post.
Your Quickchat knowledge base is expected to come in a format that is extremely flexible - paragraphs of text of up to 150 words. That means they can be as short as a single sentence or bullet point or contain as many as 8-10 sentences.
We should try to ensure every paragraph contains some useful information and is relatively self-contained - makes sense when read in isolation (see best practice #2 below for more details).
Is there any specific structure of the knowledge base that’s optimal? In this example our original source is an FAQ but in your case it could be any of (or a mix of): - articles or blog posts - internal documentation and databases - slides, presentations, Excel spreadsheets, Word documents, PDFs - notes in Evernote, Notion, OneNote, etc. - example conversations - video/audio transcripts
The way the Quickchat knowledge base works, any text can be copy-pasted to be used by your AI. But in order to achieve optimal performance, it helps to give it a proper structure and avoid some common pitfalls.
As a first step, let’s just go through the 6 subpages of the FAQ, copy all text…
and paste it all into one document. What we end up with is a single text with diverse formatting where we can immediately spot a number of issues that would arise if we were to paste it directly into the Quickchat knowledge base:
- We want our AI to be able to refer people to additional information using links which need to be properly included in the knowledge base. Scroll down to see how we get this done.
- Section titles and headings, when pasted as-is into the knowledge base, would be treated as separate paragraphs which don’t contain any easily interpretable information. They should be removed or merged with other paragraphs. We get to that below.
- Similarly, each item in a multiline list would be treated as a single paragraph. Such a list should be reformatted into a single paragraph, for example as a comma-separated list as we do it below.
In the next section, we will go through suggested steps that can be taken to improve formatting of the knowledge base. If we were to paste raw text into the Quickchat knowledge base, it would look like the image on the left below. Our goal is to format the knowledge base to be more coherent like the one on the right.
We will go through the following list of steps which can also be treated as a non-comprehensive list of best practices.
- If you want to include links, include them within text and explain what they contain.
- Make sure each paragraph is coherent and contains some relevant information.
- You don’t need to provide question & answer pairs. Provide just answers.
- Turn multiline lists into comma-separated ones.
Consider the following item to be added to the knowledge base:
Rather than simply paste it into the knowledge base, what we want to do is to reformat it into a single coherent paragraph which explicitly points to the link as an additional resource.
Please note how:
- question has been incorporated into the paragraph starting with If you want to import your medication into the U.S., …
- second sentence was rephrased to point to a link included at the end
This way, the AI will be able to point to the link in a conversation like so:
We will now go through how to properly include the following item in the knowledge base:
Pasting it directly into the knowledge base ends up with incoherent paragraphs:
The Packaging. paragraph only containing a title of a section should be removed.
In the next step, we will finish formatting by merging question and answer into one paragraph.
The above formulation still has a problem in that one paragraph is an unanswered question which only gets answered in a different paragraph. However, simply removing the question leaves us with a Yes. as an answer that lacks proper context. That’s why we include the context from the deleted question by replacing Yes. with a full answer: You are allowed to use your own packaging when shipping with DHL.
We will now go through formatting the following complex item to be included in the knowledge base:
The two bullet-point lists contain a list of steps to be completed on Internet Explorer or Microsoft Edge browsers, respectively. We will put them in separate paragraphs and turn multiline lists into comma-separated ones. Since those are separate paragraphs, it is also important to add some additional context which we are going to achieve by prepending Here is how to add DHL as trusted site on….
Note how by doing so, we created two self-contained paragraphs describing how to add DHL as trusted site on a particular browser. Simultaneously, when needed, they will be used as additional information to the paragraph on issues with the shipping label print screen.
Test your AI in conversation
The final step is to test your AI in conversation and adjust your knowledge base as you move along. You will be able to do that easily in the Quickchat dashboard in the Preview window. Here is an example exchange going through an issue to do with printing shipping labels:
If this blog post inspired you to start your own project, head over to quickchat.ai and Start Building! If you’d like to talk to someone on the Quickchat.ai team or discuss a custom solution, please get in touch.