Microsoft Azure QnA maker is a cloud API which lets us to create question and answer bot in minutes. In QnA knowledge base, the questions and answers can be added from your existing website FAQ data or import from a file.
- Create an Azure Resource Group
- Create an Azure QnA maker service
- Create a knowledge base
- Add question & answers and Test
Step 1: Create a Resource Group:
Login to Azure portal. For creating an Azure QnA maker service we need a Resource Group to be available first. So, create a Resource at Central US region. Resource Groups are easy for monitoring and maintenance.
Step 2: Create Azure QnA maker:
In the Azure portal homepage go to “New Resource” and type “QandA maker” in the search text box
Note: For now i will go with the default location “West US” instead of “UK South” as i got errors while creating knowledge base.
Once its completed. Go to the resource group and check it has all the below supporting services are created like App Service, App Service Plan, Cognitive Services and Search service as they are the core for our QnA bot.
Step 3: Create a knowledge base
Now we are ready to create our questions and answers for our Bot. Open the QndA maker api website https://www.qnamaker.ai/ login with your azure portal credentials.
It would say we don’t have any existing knowledge base.
Lets create a new one by clicking “Create a knowledge base”. There are 3 steps to follow, here we can skip step 1 as we have already created our QnA service, so lets move on with step 2.
In step 2 select our Azure subscription, available QnA service and language.
Skip step 4 which allows you to point to a FAQ website page to extract the question answers from or to add questions answers by uploading a file or we can manually create in this knowledge base web interface itself. For now we will create it manually so I will leave them blank.
After the knowledge base is created the web interface allows us to add question and answers by clicking “add Qna pair” button. Once you added them you can “Save and train”.
Step 4: Add questions & answer and Test
After the knowledge base is created the web interface allows us to add question and answers by clicking “add QnA pair” button. Once you added them you can “Save and train”.
Finally click on “Test” to test it online here itself like an emulator. In the emulator as a normal user type “SharePoint” and hit enter, in fraction of seconds the bot gets the answer from your knowledge base. Fantastic 😊.
Thanks for reading my blog. Here we learned how to create a Azure QandA bot service and tested it. In next article we will see how to integrate it in a SPFX webpart. #Sharingiscaring.