Before jumping into configuration let us understand the core concept first. For successful integration we will need to understand few features and its usage.
What is cognitive services?
Cognitive Services provides the best suite for having an interactive, automated model of an application. It helps to build powerful intelligence into applications to enable natural and contextual interactions.
Microsoft Cognitive Services provide us the ability to build apps with powerful algorithms using just a few lines of code. It works across devices and platforms, and with continuous enhancement, it's easy to set up.
Cognitive Services (preview) comes with a series of APIs, which can be used to enable natural and contextual interaction within your applications. Cognitive Services offers Language, Speech, Vision, Search, and Knowledge APIs.
It works 24/7 and never calls sick. More and more businesses and marketers are adopting chatbots to enhance productivity and collaboration which can improve the efforts of a whole team. Read here for more info
What is QnA Maker?
QnA Maker is a cloud-based API service that creates a conversational, question and answer layer over your data. QnA Maker enables you to create a knowledge-base(KB) from your semi-structured content such as Frequently Asked Question (FAQ) URLs, product manuals, support documents and custom questions and answers.
What is Azure Bot Service?
Azure Bot Service is Microsoft's artificial intelligence (AI) chatbot offered as a service on the Azure cloud service marketplace. Azure Bot Service offers the ability to add intelligent agents that are capable of conversation without having to commit the resources to develop one's own AI.
Now with above knowledge lets jump on setting up our QnAMaker.
Step 1: Login into https://www.qnamaker.ai and click on Create a knowledge base.
Step 2: Create a QnA service in Microsoft Azure. When you click on it you will be redirected to Azure. Here we to sign up first in case if your account doesn't exist. Post successful sign up now we will need to create our Azure QnA service for our KB(KnowledgeBase). (In our example we will use QnAMakerChatBot as name going forward instead of QnAMakerChatBot1)
Step 3: Connect your QnA service to your KB. After performing above step you can click on refresh button and you will notice Azure QnA Service is populated with above details.
Step 4: Name your KB. The knowledge base name is for your reference and you can change it at anytime.
Step 5: Populate your KB. you can skip this for now. We will cover this in step 7.
Step 6: Create your KB. Click on create your KB.
Step 7: Once our KB is created its time to power our KB with some data. There are multiple ways to add data to your KB such as URL, document, Excel, TXT. You can feed the data here to your KB. Once data is loaded you can click on Save and train.
Step 8: Once your KB is trained its time to publish the data to Azure. You can publish data by clicking Publish button. Post successful publish you can view the Postman and Curl details and now you can invoke your KB using Postman.
Step 9: Click on Create Bot and you will be redirected to Web App Bot screen with most of the details automatically pre-populated.
Note: It is advisable to Create Microsoft App ID.
Step 10: Now since we have created our web app we can go ahead and test it. Go to All Resources and select your Web App bot. You will be presented with many options. We need to choose test in Web Chat and we can test our Bot here.
Step 11: Now its time to integrate our Bot with other services like Microsoft Teams, skype, slack etc. In this example we will integrate our Bot with Microsoft teams.
Step 12: After selecting Microsoft Teams you will see 3 options: Messaging, Calling and Publish. Here we will use Messaging and click on save.
Now you can go back to channels and select Microsoft teams and it will open it in your system with integrated Bot. You can chat with your Bot now.