What is Bot?
Bot is the renamed version of an earlier concept called Remote Procedure Call. In those days, for an interaction between a server and a client, we needed human interference. Since we are evolving with digital, we adapt to the same technique with an enhanced feature. We can simply term it as an updated version of RPC.
Bot is nothing but an autonomous program which is used to interact with the humans or machines in a predictable way.
Type of Bot
- Language – Applies the Machine Learning techniques for conversation.
- QnA Maker - FAQ
- Speech – Converts the voice to text, like Alexa devices.
- Search – Search Engine
- Vision – Analysis and identification of the data present in the multimedia files.
Life Cycle
- Design - We must design the bot which provides great usability experience. This is our primary focus.
- Develop - We can develop a bot using the C# /Node /Cognitive Services
- Test - The developed bot must be tested to ensure that it meets the requirement. In order to facilitate this, we can test the bot in Bot Emulator.
- Publish - The developed application needs to be shipped to the target platform.
- Connect - Integrate the bot with the various application.
- Evaluate - Evaluating bot services data.
In this article, we are going to see how a QnA Bot can be created and how it can be connected to some other application.
Step 1
Create a QnA Maker Service.
Link: https://www.qnamaker.ai/
Click on "Create a QnA Service". It will launch the Azure portal.
Enter the Name & Subscription and relevant details. The important thing to note here is the pricing tier. It should be F0 (which is free).
For demo purposes, we won’t be dealing with the insights. So, I have disabled the App Insights option. Once all the details have been filled, click on "Create". After the Azure deployment operation, the selected resource will be created.
Step 2
Step 3
Enter the name of your knowledge base.
Multi-turn extraction
The term defines that in some cases, the response can be defined in a single shot. It would require some follow-up questions and provide the final answer.
Step 4 - Create the KB
Once we have created the KB, we have to provide the list of QnA Pairs for the KB.
Publish the FAQ KBA which we created earlier.
Step 5 - Integrate QnA With Bot
Login to Azure Portal, create a resource, and in the market place, search for Web App Bot.
Provide the details for the bot - enter the subscription, Resource Group, and other details. Click on "Create".
QnA Auth Key
QnA Maker Service deals with two kinds of keys - subscription keys and endpoint keys.
Subscription Keys
Endpoint Keys
Used to access the knowledge base endpoint to get a response for a user query.
How to Get the QnA Auth Key?
Link
https://www.qnamaker.ai/UserSettings
In the QnA Maker Portal, go to User Account - Service Settings.
Bot Template Selection
Here, we want to develop a FAQ bot, so we must select "Question and Answer" as a template and click on "Create".
App ID Creation
Before we create a bot, finally, we need to create an App ID and Password if the auto-creation of app id and password doesn’t work. Just click on "Create App ID" in the App Registration Portal. It will launch the application registration pool. Generate the App ID & Password for your application.
Step 6
While testing the bot, once the bot is created under the resource group, you can see many entries.
Click on the SaiFAQ Web App Bot. It will navigate to another window. Select the "Test your bot in online web chat" option.
Integrate with SharePoint
Using the "Connect" option, select the bot to channel (SharePoint).
Connect to your SharePoint site by embedding the code to the iframe and publish the page.
In this article, we have had the basic idea of FAQ bot and bot principles and concepts. In the upcoming article, we will discuss LUIS and Cognitive Services.