Introduction
You can add knowledge items to your chatbot in the same way as you add other content: by adding a turn. With a Knowledge item turn, you can either add the entire knowledge base to your bot, or a specific category of the knowledge base. Also, you can add knowledge base items at various points in your chatbot.
Let's start with a simple example: add the entire knowledge base to the Welcome message of your pizza bot. That way, your user can order a pizza, and if the order.pizza intent isn't matched, the question is looked up in the knowledge base. Here's how to do it.
Adding a complete knowledge base:
- In your dialog, determine the turn where you want to insert the knowledge base. In our example, we want it to be the fallback for when the order.pizza intent is not matched, so we need to add a turn to the no.response turn.
- In the Turn editor, select turn type Knowledge base to add a knowledge base turn.
- Select the category of knowledge items that you want to include. For our example, we're going to provide access to all available knowledge items, so we select all.
- Select the sub-category of knowledge items if you want to narrow down the set of available knowledge items even more. Again, we're going to leave this to all, to make sure that we have all knowledge items available.
- Select the assigned turn. When you include a knowledge item turn in the lower part of your dialog tree, you can choose at which particular turn you want them to become available for your user. For now, we'll leave it to the default.
- Set the confidence threshold. This determines how well the user question should match the knowledge item title and keywords before your bot returns an answer. More on that XXXX here.
- Save the knowledge base turn.
Your chatbot will now look like this: a knowledge base turn with an indication of category and subcategory (all/all) and two extra turns:
- Found knowledge base: a turn for when the user question has been matched with a knowledge item. From here, you can continue building your bot.
- No knowledge base: when a user question cannot be matched to a knowledge item, use the no knowledge base turn to create a fallback intent and let your user ask another question.