Pages Menu
TwitterRssFacebook

Posted by on Mar 1, 2018 in Bot Framework | 0 comments

Building an FAQ Bot using Azure and QnAMaker without writing any code: Part 1

Building an FAQ Bot using Azure and QnAMaker without writing any code: Part 1

Anyone can now build a Bot with Artificial Intelligence that can answer questions and provide information. You DO NOT need to be a developer! In this 3 part series, I walk through exactly how to do this. You can also watch the video walkthrough here: youtube.com/watch?v=TA6a5unbSIM

In this first part, we’re going to concentrate on building the repository of information – where the answers are kept to the questions that people will have.

You likely already have a collection of frequently asked questions somewhere, as a webpage. We can reuse this for our bot and use it help us to quickly get up and running.

QnAMaker

We’re going to be using QnAMaker, which is a tool provided by Microsoft to help build artificial intelligence models based on question-answer pairs. In simple language: it turns your FAQ into AI!

Start by navigating to https://qnamaker.ai and signing in. Click Create New Service from the menu at the top.

Fill in a name, provide the URL of your FAQ page and click Create.  (if you don’t have an FAQ page then you can upload a document, or start from empty, but it’s easier to start with something populated, especially if you’re already put a lot of time into building one).

When you click Create, after a few moments you’ll be shown a list of question-answer pairs, which match up to your FAQs. In this example I’m using the QnAMaker FAQ page:

You can review this list, edit the answers, add extra entries etc. Importantly, you can also always come back here and modify this collection to ensure it’s always up to date.

We’ve only just started, but we can get a sneak peek of what our bot will look like already, by clicking the Test tab, which opens up a Web Chat window linked to your Knowledge Base:

It’s important to realize that QnAMaker is giving you way more than just a place to store question-answer pairs. Behind the scenes, a complex AI model has been generated which is used to analyze input and figure out the best response.You can ask various questions here to test out that artificial intelligence now.

In my example, one of the FAQs in the original webpage was “Is the QnA Maker Service free?”. That means that I although I can definitely ask that question, but also variants, such as “How much does the QnA Maker Service cost?” and QnAMaker will return the right answer, eliminating all the hard work usually associated with building complex conversation bots:

 

Ready to Publish

Once you’re happy with the state of your question-answer pairs and have done enough testing, it’s time to Publish your Knowledge Base. Publishing will give you access to an API endpoint which you can use to interact: you pass in the user question and the API will return the right answer.

To publish, click the Publish button in the top-right corner. You’ll be shown a list of changes that have been made since the last publish, which can be a good final-check before clicking Publish again to confirm the changes.

Your QnAMaker Knowledge Base is successfully published when you see the HTTP request shown on the screen:

If you’re familiar with APIs, this is a standard HTTP endpoint which can be called by a wide variety of surfaces, such as .NET, PowerShell, Ruby, Python – basically anything that call HTTP! That means that you can ‘sprinkle some AI’ into virtually any project involving questions and answers.

If you’re not familiar with APIs (because you’re NOT A DEVELOPER) then don’t worry – you can happily ignore this for now. Just make a note of the request somewhere, because we’re going to need it in Part 2, where we build out a bot to consume it.

Useful Post? Why not subscribe to my weekly newsletter of blog posts to make sure you don’t miss anything. This will include the next 2 posts in this series.

Post a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This site uses cookies to help make this website better. By continuing to use this site we’ll assume you’re OK with that (implied consent).

The thoughtstuff Blog is Stephen Fry proof thanks to caching by WP Super Cache