The QnA Ability (Question-and-Answer) allows users to ask questions that the bot will attempt to match with the best answer it can identify in it's knowledge base.
This ability uses the functionality provided by Microsoft in it's QnAMaker.ai site. This is where you can go and configure a knowledge base with Questions & Answers that the bot will reference.
A knowledge base can be built up from multiple FAQ-style websites, or a range of supported documents. You also have the option of manually editing or creating a knowledge base.
In order to link the knowledge base from QnAMaker to a bot, the following fields need to be completed in the settings:
- subscription key - the key to your subscription on QnAMaker.ai
- knowledge base id - the id for the knowledge base that you want the bot to use.
Using the QnA ability
Asking a question
Depending on how many abilities the bot has been setup up, the interaction with the bot may differ.
QnA Ability only: When a bot only has the QnA ability to it, any interaction will be pushed through the knowledge base to try and get a match.
An example of asking a question is:
- What browsers are supported?
The bot will take this and attempt to match it to the knowledge base.
Multiple abilities: When other abilities have also been added to the bot, a keyword needs to be used in order for the bot to realize that the following question should be matched against the knowledge base, and not pushed through it's default LUIS model.
An example in this case is:
- I have a knowledge base question
These 'triggers' will depend on how the ability was setup. After this initial question, the bot will then prompt the user with 'What is your knowledge base question?'
The video available here shows the full process, from knowledge base setup, to using the published bot.