# Azure's QnA Maker

**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.&#x20;

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).

![](https://lh5.googleusercontent.com/HzsEqsoJoMwYX-XesL-9blGVRdHCwU8dvWfWhFor8GJ5ssit_EXhNg142j19lMlDvsqrcpeo86Bvl8lKbeeRs62z30X1ptvRYj4ftNP29-XkZEim9xBB821plzLLsVpUxsMFYbdS)

2\. Next, select “**Create a knowledge base**” which will initiate the procedure to create a new knowledge base resource.

![](https://lh4.googleusercontent.com/agb2u4Ex-f4CuVDiXN_KKj42y2Wvv-oOqlvMI6NnUVQYroc9OPepR961bxWL94MgQVV5EkvXAjhVhQKKTSsxH79oCzje7Cib-NkO_UpTeJUzZTyWUOkVEy315CGJ44fVtPT_hFJI)

3\. **STEP 1** > (**A)** To create a QnA Service in Microsoft Azure. Click on “**Create a QnA Service**” to open Azure Portal.

![](https://lh5.googleusercontent.com/lywMAb3ZNrkoT7RLhA0MviimOJJLqyIQAJd315u7DttswxsD-crXTQUBU9emFoWKdiK1_7Emg0rg0XSCkFvWC4XHsQtsjvaI9UFuZLi-c81fRk5QLoiGTnpuKuq7x4sqt1ACw_oz)

4\. **STEP 1** > **(B) Create an account** on Azure Porta&#x6C;**.**

![](https://lh5.googleusercontent.com/W57VyCSTa0eSGzxhr-IlYjGoNR0y_C398iaBHAcFJUoFK1I_fVMhp9XDKlzwPkHpRtVUczl8uoAPMpZKuaIDHJdzwijbhHlQc7F32EwsGDLGfqGp9nZ8Jlx1POBd4HttAp7jdwbV)

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*.

![](https://lh4.googleusercontent.com/ovUlfIipLBwiahkTYMScIITfEGRq_l90-3JX6vw6C48jeV7z38kZUkZgi1Jxe751ui3Q5Dm5k4SUwRI4hIZIpyROFWhBKtw5aNduTPYIS3ML4clpdqeFy4rdVFDURMKrJb9WdK0e)

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.

![](https://lh6.googleusercontent.com/6MHnO9ie0lLgbuxV4MV7BLtjl_-EzRVV9ppUY0M2B1JYhsP3vbMYbT5uDUZlumubK_tcWSQR9W5CDucg1bqyQPP_VuohjyYHQxMOfc-B2gKI6m2chY_hz2xT6MBLrTvcvRYolSnG)

7\. **STEP 3** > Enter a new name for the knowledge base resource under “**Name your KB**”.

![](https://lh3.googleusercontent.com/wB446EDugmWx-G0pPWjaraccqr1Zu2cGrW67_IUkVTK9GTvQvuFkHrxUh524Z2SrEFw-sjz9qlD9jB4oo1Gj6kvxpbyEljaUy-K0P3zDUi369vptRlwhvEy1ipowMZdR28cla7z2)

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.

![](https://lh3.googleusercontent.com/M6hdwJbhFyg7BvhsLqXdt7UezhCffhIH5vQxQSfzq0pZ3zOOWa6GR3CInUQP9yVyzbgOm9kJq5UUUT9MbZwa54Ok8YCwudsQUiLgCzWGTJbVaJJnw9_jsYChAJP1SyOK3RyejdsU)

9\. **STEP 5** > Click on “**Create your KB**” to complete the process.<br>

![](https://lh3.googleusercontent.com/kpRMeWf-q5fm-2ndcGDaL3VcXtRZK_LC36apxfDgXzn7nNxIxgO3orFKh1kN6oQFvjhe8kIgH_wGI0_m37UeLDIPyLDT8l6WjDit0n7KA6q8OBC0BMYHEi-ZkvN3gWThn4geAF4l)

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**”.

![](https://lh6.googleusercontent.com/CwK1Ig2a8BsMjhWvRgyBpvPvqpUJz5fvi1xruXfYQzFl14D2_4-DSnZhIN3xyMN5NLQZlP-tioiJ6yahBdi396VdbMcSCUpW12o_z-fEKgiDUXayB1oyIkznKBAFXoLoYXb8tEVK)

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**”.

![](https://lh4.googleusercontent.com/y7rUaIhfk_i_uRQvxqHWl7OOGEeH_riqJZAEmS8kWmcXa_lU7roolT98P8R_Ap-QYK8PLTrJmZcHs8z_ZXUFByuyfDM5TgO_hg5lCtCgBgnjgoiSnXbHPGiswp3nVA5KJe1ey1Ud)

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.

![](https://lh6.googleusercontent.com/A91Ev2rSpo-O9XRJ1RRwzYDbygyH-1q3ZDgIKb1BVBXkJBuaUV6UAy_rP2IiJmJs2YS7aoRdFzrIj-ZcbGDrLZs1CTJGnKNRco_eq-WcsCdBI7lbaNiqaIwcjlIPMRaufZxX3Xbv)

Under the **Postman tab** you will be presented with a few details similar to the one shown below:

| <p><strong>POST /knowledgebases/\<knowledge\_base\_id>/generateAnswer</strong></p><p><strong>Host: https\://\<app\_url>/qnamaker</strong></p><p><strong>Authorization: EndpointKey \<endpoint\_key></strong></p><p><strong>Content-Type: application/json</strong></p><p><strong>{"question":"\<Your question>"}</strong></p> |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

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:

![](https://lh5.googleusercontent.com/nODz1ayxVMsmOGdEbo8_V01xVbTkgkCdE9lujjiEAAC3x3jZwYnryjOpKZuCMyUK3yBWmC-d5oYqbnwqhYlwcYnNvFTCyHWlEkNCnv9mCJ_pHzeJSe4ErsNtrOG_uiKX01bIiker)

14\. Open [Acquire Bot Store](https://app.acquire.io/chatbot/store) , and click on “**Azure QnA Maker**”.&#x20;

![](/files/-LnQnB9DlKwW-cpvYODe)

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**”.

![](/files/-LnQnF68KEChM1lT8GRZ)

16\. Go to “**Triggers**” and apply “**Azure QnA Maker**” Chatbot.

![](/files/-LnQnJ7l-rTtnww42KbV)

17\. Finally, you have successfully integrated the "**Acquire Chat Widget**" using the question-answer pairs you added to the "**QnA Maker"** service.

![](/files/-LnQnNXbHkotzakY-SDl)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.acquire.io/master/chatbot-api/chat-bot/azure-qna-maker.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
