Apart from building dialogs in your chatbot, you can also add content from knowledge items to your chatbot. Knowledge items are single turn question-answer pairs that are stored in a separate knowledge base in Spotler AIgent. You can find the Spotler AIgent knowledge base under Build > Knowledge.
Spotler AIgent has one knowledge base for all chatbots that use the same language. This way, you create and maintain your knowledge items in one place whilst still able to include the items in all of your, for instance, English-speaking chatbots.
You can sort your knowledge items on title, category, keyword(s), source or whether it is published. by using the icons on the right-hand side of each knowledge item, you can duplicate, rename or delete an individual item.
Create a new knowledge item
To create a knowledge item, click on Create new knowledge item.
- Add a meaningful title to your knowledge item. The chatbot uses this title for recognition, so make sure the title concerns the actual question that the chatbot can ask.
- Add a category and sub category.
- Add meaningful keywords. You can add a keyword by typing a word and clicking on the plus-sign. It would be useful to add words here that chatbot users will likely use when they ask for information.
- Type the answer the chatbot should give if any of these keywords is mentioned in the text box under Body.
- Check the Published checkbox to make sure the knowledge item will be published.
- Click on Save or Save & Back to save the knowledge item.
By clicking on Sync TOPdesk, you can sync the content of your TOPdesk to your Spotler AIgent knowledge base. Read more in the article: How do I import articles from TOPdesk to Spotler AIgent?
Confidence threshold and question recognition
Knowledge items are not matched through intents and Natural Language Processing. Instead, matching is done on a combination of the title and the keywords of a knowledge item.
Tuning the confidence threshold
If you want to increase the chance of a user question being matched with a knowledge item, you can tune the confidence threshold of the knowledge base.
The confidence threshold is the degree of confidence that your bot has in whether the user question matches a knowledge item. The higher the confidence level, the narrower your results will be.
When you set the confidence threshold to 0.99, the user needs to type the exact title of a knowledge item for it to be returned by your chatbot. Even leaving out a question mark or letter would already result in a non-match.
Adding a complete knowledge base to your chatbot
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.
Step 1: 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.
Step 2: In the Turn editor, select turn type Knowledge base to add a knowledge base turn.
Adding parts of a knowledge base
In addition to adding the entire knowledge base in the chatbot flow, it is also possible to add a portion of the knowledge base.
Add specific knowledge items
In the previous topic, we added the entire knowledge base to the opening turns of our chatbot. Now, let's have a look at how to make available specific information for a specific user question. We'll take the pizza.topping example, and add some information on diet and allergies here.
- In your dialog, navigate to the bot question that asks the user to give their choice of pizza toppings. This turn will have a user turn for capturing the desired topping, and a no.response for capturing any other questions that a user may have.
- Add a knowledge base turn to the no.response turn to direct users to the knowledge base.
- At this point in your dialog, your user is probably less interested in opening times or whether the restaurant does deliver at home. So let's limit the questions that can be asked here by selecting Category Menu information and Sub-category Diet and allergies.
- Select an assigned turn. This is the turn from which your user can start asking the selected items. When you've embedded your knowledge base turn rather deep in you bot, this allows you select other point in your chatbot from which your user can also access these questions.
- Set the confidence threshold. Read more about question recognition and confidence threshold here.
Categories and subcategories
Categories and sub-categories help you to keep your knowledge items organised. But there's more to it: they also determine which knowledge items are available in your chatbot. Let's have a closer look.
Start of your chatbot: many answers
When you select category and sub-category all, the entire knowledge base is open. Each user question will be checked against each knowledge item. This is great when your user is at the start of your bot: the user questions will be quite broad, so it is a good thing to have many answers available.
Specific flows: specific answers
But imagine you designed a flow that is about ordering your pizza. At certain points in this flow, your user might have very specific questions. Take the pizza.topping intent from our example: here, the user might want to know whether there are vegan topics available, or whether a pizza is gluten-free. In that case, you could insert a knowledge base that only displays FAQ's about diets and allergies.