Friday, February 23, 2018 4:18 PM by Oleksandr Krakovetskyi

Azure Cognitive Services #5: QnA Maker

It's free, easy-to-use, REST API and web-based service that trains AI to respond to user's questions in a more natural, conversational way.

Nowadays there are dozens of services that allow users and developers to create chatbot and run it in a very short time. One of the easiest ways to do this task is to use Q&A Maker created by Microsoft.

Microsoft Q&A Maker is a free, easy-to-use, REST API and web-based service that trains AI to respond to user's questions in a more natural, conversational way. Compatible across development platforms, hosting services, and channels, QnA Maker is the only question and answer service with a graphical user interface — which means you don’t need to be a developer to train, manage, and use it for a wide range of solutions.

With optimized machine learning logic and the ability to integrate industry-leading language processing with ease, QnA Maker transform masses of information into distinct, helpful answers.

Bot creation

Thus, let’s create our bot with Microsoft QnA Maker. Open in your browser https://qnamaker.ai/. If you don’t have Microsoft account create it.

1

Firstly, on the main page press GET STARTED. After that, your workspace loads. To proceed click Create new service button on the upper menu.

2

Specify your service name in the “Service Name” field. After that, you have to provide knowledge base to the service. You can either indicate URl of your FAQ and Q&A Maker will parse it automatically or upload your own file. Note, that your FAQ should meet special requirements in both cases.

3

However if you want to create question-answer knowledge base on your own you should select Create button.

That will lead you to the page, where you have to add your question-answer pair into knowledge base.

4

Don’t forget to press “Save and retrain” button to refresh your knowledge base. However, note, that your previously published will not reflect knowledge base changes, until you publish it again. In the “Test” section you can check your bot.

5

For some additional information visit following pages: https://qnamaker.ai/Documentation/Quickstart https://qnamaker.ai/Documentation/Faqs https://docs.microsoft.com/en-us/azure/cognitive-services/qnamaker/home

QnA Maker provides a REST endpoint that you can call from your custom application. However, if you want a quick way to set up a QnA Maker bot, you can use the Azure Bot Service. Bot Service provides the core components for creating bots, including the Bot Builder SDK for developing bots and the Bot Framework for connecting bots to channels.

Create a new bot service

1) First of all create or log in to your Azure account.

2) Click the New button found on the upper left-hand corner of the Azure portal, then select AI + Cognitive Services > Web App bot.

6

3) A new panel with information about the Web App Bot will open. Click the Create button to start the bot creation process.

4) The Bot Service creation form will open. Fill it with the requested information (see the image below). In the Bot template section choose the Question and Answer bot template.

7

5) Click *Create

Confirm that the bot has been deployed by checking the Notifications. The notification will change from Deployment in progress... to Deployment succeeded. Click Go to resource button to open the bot's resources panel.

8

For additional information visit this page.

Once the bot is created, you will need to do the following steps to complete the setup.

1) At Azure portal, open the newly created Web App Bot resource.

2) Click on "Application Settings", which is on the left side, and in the App Settings list, add QnASubscriptionKey and QnAKnowledgebaseId. The corresponding values can be obtained from the KB Settings page in http://qnamaker.ai.

Application Settings:

9

QnASubscriptionKey and QnAKnowledgebaseId:

10

Paste QnASubscriptionKey and QnAKnowledgebaseId here:

10

You will get this message after the successful update.

11

3) The QnAMaker-enabled Azure bot service app is now ready to use. To try it out click on "Test in Web Chat" to chat with your QnA bot.

12

Conclusions

QnA Maker is a service which allows you to create bot that is designed to conduct FAQ-like conversations in a quick and convenient way, even without coding. It also supports some useful features, as online learning (users of your app can make the model more precise, by specifying correct answers and adding more variations to knowledge base questions). It can also be integrated with LUIS, to improve the service accuracy. Unfortunately, there is no Microsoft SDK, which would allow to build such services locally.

other posts

Thursday, February 15, 2018 7:24 PM

Azure Cognitive Services #4: Speech API

An instrument providing abilities to create different speech-enabled features in developer's applications.

Thursday, February 15, 2018 11:13 AM

Azure Cognitive Services #3: Translator Speech API

Cloud-based machine translation service.

Tuesday, February 13, 2018 11:11 AM

Azure Cognitive Services #2: Custom Speech Service

Сloud-based speech recognition service allowing to train model for your own purposes.