video

How to Make an AI Chat Bot for Website Customer Support

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.

Initial setup

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:

Customise the feel & look of your chat window in the Integrations tab

Customise the feel & look of your chat window in the Integrations tab

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.

Product / service / project name and description

Product / service / project name and description

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.

How to structure the knowledge base?

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.

In the rest of this article, we copy raw content from the example DHL FAQ pages and apply some simple best practices to format it into a ready-to-go well-structured knowledge base.

Copy the raw text

As a first step, let’s just go through the 6 subpages of the FAQ, copy all text…

Copy all text

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:

There are issues with using text as it is: 1. hidden links, 2. mixed up sections titles and headings, 3. lists which would span several paragraphs

There are issues with using text as it is: 1. hidden links, 2. mixed up sections titles and headings, 3. lists which would span several paragraphs

  1. 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.
  2. 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.
  3. 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.

Raw text used directly results in a poorly formatted knowledge base

Raw text used directly results in a poorly formatted knowledge base

We will go through the following list of steps which can also be treated as a non-comprehensive list of best practices.

Best practices (non-comprehensive list)

  1. If you want to include links, include them within text and explain what they contain.
  2. Make sure each paragraph is coherent and contains some relevant information.
  3. You don’t need to provide question & answer pairs. Provide just answers.
  4. Turn multiline lists into comma-separated ones.

#1 If you want to include links, include them within text and explain what they contain.

Consider the following item to be added to the knowledge base:

Knowledge base item containing a link

Knowledge base item containing a link

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.

Question & answer merged into a coherent paragraph explicitly pointing to a link

Question & answer merged into a coherent paragraph explicitly pointing to a link

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:

AI pointing to a link in a conversation

AI pointing to a link in a conversation

#2 Make sure each paragraph is coherent and contains some relevant information.

We will now go through how to properly include the following item in the knowledge base:

Knowledge item containing question and answer

Knowledge item containing question and answer

Pasting it directly into the knowledge base ends up with incoherent paragraphs:

Item containing question and answer pasted directly into the knowledge base

Item containing question and answer pasted directly into the knowledge base

The Packaging. paragraph only containing a title of a section should be removed.

Removed a paragraph only containing a title of a section

Removed a paragraph only containing a title of a section

In the next step, we will finish formatting by merging question and answer into one paragraph.

#3 You don’t need to provide question & answer pairs. Provide just answers.

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.

Item containing question and answer - fully formatted

Item containing question and answer - fully formatted

#4 Turn multiline lists into comma-separated ones.

We will now go through formatting the following complex item to be included in the knowledge base:

Multi-line list item

Multi-line list item

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.

Multi-line list item - fully formatted

Multi-line list item - fully formatted

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:

Short conversation on solving an issue to do with printing shipping labels

Short conversation on solving 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.

Share this article:

comments powered by Disqus