Azure's QnA Maker
Last updated
Last updated
Introduction
QnA Maker is a web based NLP service provided by Microsoft Azure. The service adds a natural conversational layer over your data. Acquire now supports ‘Azure QnA Maker’ chatbot along with many other 3rd party chatbots. QnA Maker can be installed and used easily alongside the Acquire Chat Widget.
Quick Setup
QnA Maker allows users to create many knowledge base resources (question and answer sets). Where you can add multiple question-answer pairs as per your requirement. To integrate “QnA Maker” with “Acquire Chat Widget” you need to provide a few parameters.
Follow the simple steps given below to install the “Acquire Chat Widget” integrated with “QnA Maker”.
1. First login to your Microsoft Account to access “QnA Maker” platform, Go to https://www.qnamaker.ai/ and follow the Sign In procedure or Signup procedure (if you don't already have an account).
2. Next, select “Create a knowledge base” which will initiate the procedure to create a new knowledge base resource.
3. STEP 1 > (A) To create a QnA Service in Microsoft Azure. Click on “Create a QnA Service” to open Azure Portal.
4. STEP 1 > (B) Create an account on Azure Portal.
5. STEP 1 > (C) You must complete the required fields in the presented form, as shown below, to create a QnA service.
Provide a name for your Azure service under “Name” and also under the “App Name” field. Select Subscription, Pricing Tier and any other relevant details as per your requirement and click on “Create”.
Please note: creating a new Azure service may take some time.
6. STEP 2 > Once you have created the QnA service, you can continue the procedure to create the QnA Maker knowledge base resource. Select the Default Directory in “Microsoft Azure Directory ID”, select the “Azure subscription name” and “Azure QnA service” that you just created in the previous step.
7. STEP 3 > Enter a new name for the knowledge base resource under “Name your KB”.
8. STEP 4 > If you have already have a set of question-answer pairs in .docx / .pdf format OR on a web page, you can populate your knowledge base with those question-answer pairs. You can also add some default question-answer pairs provided in the “Chit-chat” section.
9. STEP 5 > Click on “Create your KB” to complete the process.
10. Once you have created a new knowledge base resource, you will be redirected to the editor of the newly created knowledge base resource, here you can add question-answer pairs into your knowledge base resource using “Add QnA pair”.
11. You can add many alternate phrases for every question using “Add Alternative Phrasing” , you can also add quick replies or prompts using “Add follow-up prompt”.
12. After adding the question-answer pairs, “Save and Train” your knowledge base resource, and then “Publish” your knowledge base resource. You can also test your knowledge base resource before making it live.
13. Once your knowledge base resources has been successfully created you will be presented with page shown similar to below.
Under the Postman tab you will be presented with a few details similar to the one shown below:
POST /knowledgebases/<knowledge_base_id>/generateAnswer Host: https://<app_url>/qnamaker Authorization: EndpointKey <endpoint_key> Content-Type: application/json {"question":"<Your question>"} |
Make a note of the “knowledge_base_id”, “app_url”, “endpoint_key”, as these values will help you connect the "QnA Maker" service with the "Acquire Chat Widget".
If you have an existing knowledge base resource, you can find their details as follows:
Go to https://www.qnamaker.ai/Home/MyServices > My knowledge bases,
Click on the “View Code” button, you will see a snippet like the one shown above.
You can also find your APP URL in the Azure Portal:
Sign into https://portal.azure.com/ > Select All resources > Select the App service created previously from the list of items > Go to Overview. You will be able to get your APP URL as shown below:
14. Open Acquire Bot Store , and click on “Azure QnA Maker”.
15. Complete the following required details “app_url”, “endpoint_key”, “knowledge_base_id” that you noted earlier (from the Postman tab) and click “Install It”.
16. Go to “Triggers” and apply “Azure QnA Maker” Chatbot.
17. Finally, you have successfully integrated the "Acquire Chat Widget" using the question-answer pairs you added to the "QnA Maker" service.