Share via


Create BOT from FAQ page with no coding --- QnA Maker as new member of Cognitive Services

New comer of Cognitive Services --- QnA Maker

Now new service of Microsoft Cognitive Services is available, which named QnA Maker.

We can make Q&A bot service without any coding from Q and A lists or web (such as FAQ pages). It works as web services and accessible thru web APIs, or you can develop your own bot quickly using it as AI engine --- no coding either on Azure Bot Service (which works as Azure Functions).

You can even add some varieties to both of Qs and As manually from its GUI interface.

bluesky_20161222_01

* Please be noticed this is available in English so far and other language may not work correctly.

How to develop Q&A bot from your FAQ pages and/or list

Create New Q&A Service

Go to QnA Maker page, and select [Create New Service] from top bar.

Input FAQ website URL. (let’s see if we use Azure support FAQ page.)

You can add some custom list, using *.tsv files (encoded by Unicode, UTF-16) which contains only pairs of Q&A listed delimiting by tabs. Or, just type Q&A pairs at next page.

bluesky_20161222_02

At [Knowledge Base] page, see FAQ page or your list converted as Q&A knowledge base, which you can add and/or customize at this page.  Click [Test] at left bar and go to bot testing page.

bluesky_20161222_03

Test & train your Q&A Bot

At [Test] page, you can directly check how it works. Type question which user suppose to input, and see how your bot answers. It answers and suggests some alternate choices at left panel, you can edit it as a pair to your input. You can edit questions as well as at right panel which to have same answer. Click [Save and retrain] at upper bar, to let Q&A Bot trained.

bluesky_20161222_04

Publish your bot

Once you publish your bot, it works as web service, which accessible via web API binding keys, shown at "knowledgebases" and "Subscription-Key".

bluesky_20161222_05

How to create Q&A bot on Azure Bot Service

Go to Azure Portal, create new Bot Service from menu. Once Bot Service created, set up Microsoft App ID and password to your bot. (Please see Azure Bot Service tutorial for detail.)

Now Choose “QnA Maker” at [Choose a template] section. Now you can either create new QnA Maker app or use existing one.

bluesky_20161222_06 bluesky_20161222_07

Comments

  • Anonymous
    February 27, 2017
    HI,I really want to use the QandA bot, but I want to use it for the enterprise and not publically. Is it possible to deploy the created bot inside the firewall only??Thanks,Sachin
    • Anonymous
      March 08, 2017
      Sachin, thank you for your comment, and I'm sorry I haven't noticed for while :(QnA Maker works on Azure, and strict access is on request as below.https://cognitive.uservoice.com/forums/578689-qna-maker/suggestions/18165322-restrict-access-to-authenticated-user
  • Anonymous
    March 01, 2017
    Excellent. I just tried this and works fine.
    • Anonymous
      March 08, 2017
      Vishal, thank you for your comment and using QnA Maker!
  • Anonymous
    March 08, 2017
    hi, thanks for the article. I have create my FAQ bot, and i try to use javascript query the json, but and the sample code, 2 parameters confused me, one is params and the second one is {body}. What is the diff between params and body?if i post a message to bot, just like "hi"is that {body} will be:{"question": "hi"};and what is the params input values? var params = { // Request parameters };
    • Anonymous
      March 08, 2017
      the fully sample code is here JSSample $(function() { var params = { // Request parameters }; $.ajax({ url: "https://westus.api.cognitive.microsoft.com/qnamaker/v2.0/knowledgebases/create?" + $.param(params), beforeSend: function(xhrObj){ // Request headers xhrObj.setRequestHeader("Content-Type","application/json"); xhrObj.setRequestHeader("Ocp-Apim-Subscription-Key","{subscription key}"); }, type: "POST", // Request body data: "{body}", }) .done(function(data) { alert("success"); }) .fail(function() { alert("error"); }); });
    • Anonymous
      March 08, 2017
      sorry, i post the wrong code, here is the real onePOST - Generate answer var params = { // Request parameters }; $.ajax({ url: "https://westus.api.cognitive.microsoft.com/qnamaker/v2.0/knowledgebases/{knowledgeBaseID}/generateAnswer?" + $.param(params), beforeSend: function(xhrObj){ // Request headers xhrObj.setRequestHeader("Content-Type","application/json"); xhrObj.setRequestHeader("Ocp-Apim-Subscription-Key","{subscription key}"); }, type: "POST", // Request body data: "{body}", }) .done(function(data) { alert("success"); }) .fail(function() { alert("error"); }); });
    • Anonymous
      May 11, 2017
      Simon, sorry for late reply. I hope your issue cleared...Please try StackOverflow, since here is too small spaces for codes.https://stackoverflow.com/questions/tagged/microsoft-cognitive
  • Anonymous
    March 13, 2017
    Currently we are creating a chat bot and we are using both LUIS and QnA in the chat-bot with azure chat-bot framework to respond to user inputted question. is there any way to identify which API to hit (QnA or LUIS) after we get the question on our server? We are currently facing ambiguity in the API as we have two different endpoints one for LUIS and one for QnA.
    • Anonymous
      May 11, 2017
      Nikhil,What about using "scores" for reliability check? e.g. call QnA Maker first and LUIS later.
  • Anonymous
    March 21, 2017
    Excellent work, you people save a lot of time to learn Machine Learning algorithm and do classification and scoring, I was trying to make same kind of product and fixed my problem, thanks
    • Anonymous
      May 11, 2017
      Thanks Vineet!
  • Anonymous
    April 03, 2017
    Hi, couple of questions: 1) if I have a huge knowledge base in question and answer format, should I use qnamaker only vs using LUIS and intent/ entity. I am finding Qnamaker to be very easy for mass FAQs for users... 2) if Qnamaker is the way to go, when to use LUIS? 3) can Qnamaker and LUIS integrate? Thanks
    • Anonymous
      May 11, 2017
      Hi Asher,1)It depends volume and complications of Qs. It maybe better to use Azure Search.2)LUIS is natural language sentence classifier and entity extractor. QnA Maker is rather search engine that define closest Q&A on list.3)No function to connect QnA Maker & LUIS direct. But you can integrate LUIS when you build a bot using QnA Maker (at app level).
  • Anonymous
    April 06, 2017
    I tried a sample and created a Q&A bot and used that template in Azure. I see the training done as alternative words is not getting in the azure search. I get results in Q&A test page. But the same is missing in Azure Web Bot. Can you guide if i am missing something?
    • Anonymous
      May 11, 2017
      Hi ceekay,Please create QnA Maker app first and create Bot Service from Azure Portal, choosing QnA Maker option (you need to use same account for both).
  • Anonymous
    May 12, 2017
    HI, I have deployed Q and A Maker and think it is great. However, I would like to know how I can format the actual text in the questions and answers. In other words, is there a list of options for applying styles or syntax to the text?TIA Rick
    • Anonymous
      May 12, 2017
      Hi Rick,You can get sample file from QnA Maker "Create New Service" page, or download from https://qnamaker.ai/Content/examples/ExampleFile.tsvSave your Q&A list as tab-separated format option (using Excel or appropriate tool).
      • Anonymous
        May 25, 2017
        HiWhen I click on "Download Chat Logs" in the Test window, nothing happens. Does anyone have an idea how to find the chat logs.Thanks in advanceRick
      • Anonymous
        May 26, 2017
        Thanks for the response.
  • Anonymous
    June 01, 2017
    For a non-programmer that successfully setup QnAMaker (very nice interface!), would it be easier to use Azure or Bot Framework to connect to Facebook Manager? Thanks!
    • Anonymous
      June 07, 2017
      Best to go with Azure. Skip Bot Framework. Problem solved.
      • Anonymous
        June 12, 2017
        Doug, thank you for update!
    • Anonymous
      June 12, 2017
      Doug, Bot Framework has Facebook Messenger connector. Create chatbot base with QnA Maker and deploy Azure Bot Services using it with no coding. You can find connector from Bot Services setting page.
  • Anonymous
    June 06, 2017
    Hi I have QnA Maker working well, but need to be able to interpret the chat logs, Is there a way to get the user name of anyone in a channel asking a question?TIARick
    • Anonymous
      June 12, 2017
      Rick,If you are using Bot Framework to deploy chatbot using QnA maker, you can get logs from bot layer.https://github.com/Microsoft/BotBuilder/issues/2073https://stackoverflow.com/questions/41309532/how-to-log-a-chat-conversation-with-bot-framework-c-sharp-bot-builder
  • Anonymous
    July 03, 2017
    Hello,Is there a way I can replace the "No Match Found" message in Q&A Maker?
  • Anonymous
    July 05, 2017
    Hi, I have successfully created my QnA and published too but when i am trying to integrate it with Bot Framework using https://qnamaker.ai/Documentation/ApiReference and https://katvharris.azurewebsites.net/blog/faqbots/, it's not working.When i am hitting QnA API url https://westus.api.cognitive.microsoft.com/qnamaker/v2.0/{qnamakerUriBase}/knowledgebases/{knowledgebaseId}/generateAnswer?question="Hi".It's always giving me resource not found.Can you please help me?Thanks.Sanjay
    • Anonymous
      July 05, 2017
      Updated QnA API :https://westus.api.cognitive.microsoft.com/qnamaker/v2.0/knowledgebases/{knowledgebaseId}/generateAnswer?question=”Hi”
    • Anonymous
      August 03, 2017
      Sanjavia,You need to bind your Q into body, not connect by "?" in URL ---https://westus.dev.cognitive.microsoft.com/docs/services/58994a073d9e04097c7ba6fe/operations/58994a073d9e041ad42d9ba9Just in case, please make sure you've published your QnA Maker app at first.Please refer & ask StackOverflow for your coding issue. Thanks!https://stackoverflow.com/search?q=%5Bazure%5D+QnA+Maker
  • Anonymous
    October 10, 2017
    Hello i am planning to create QnA maker for my project. I have azure ID and dev subscription but while accessing to qna maker services i got below error:QnA Maker needs permission to access resources in your organization that only an admin can grant. Please ask an admin to grant permission to this app before you can use it.”Could you please advise which Microsft team i should contact to provide this access.
    • Anonymous
      October 13, 2017
      Hi Ketan,Sorry to hear you can't sign-in. Please report it from "Feedback" in QnA Maker page (in upper tab).So far, please sign-in other Microsoft account to use QnA Maker: You can call it through API from everywhere (it requires only app id and subscription key which are generated in QnA Maker).
  • Anonymous
    October 20, 2017
    Hi! I have an issue when creating the bot. After clicking the "OK" button on the last screen I get the following error "Resource group 'BOT' could not be found." I have tried creating the resource group during bot service creation and using existing resource group but nothing works. I have a resource group named BOT and the only place I point to the resource group is when I provision the bot service. Any Idea how to fix this issue? Thanks!
    • Anonymous
      October 23, 2017
      Sorry to hear you have issue. Would you please search or ask at Stack Overflow (https://stackoverflow.com/). Thanks!