How-To guides

Create AI Chatbot using Microsoft Bot Framework

Gartner Summits projects that more than 85% of customer interactions will be managed without a human by 2020. Chatbots are expected to be the number one consumer application of AI over the next five years according to TechEmergence. There are well-known platforms for building chatbot, such as IBM Watson, Microsoft Bot Framework, LUIS, Wit.ai, Api.ai, Chatfuel, and others.

Microsoft Bot Framework has its own Bot Builder SDK that includes .NET SDK and Node.js SDK. The entire system consists of three parts: Bot Connector, Developer Portal, and Bot Directory. The framework provides the Direct Line REST API, which can be used to host a bot in an application or website. It is open source and available to all on Github, and it supports automatic translation to more than 30 languages.

Microsoft Bot Framework understands users’ intents. It is possible to incorporate LUIS for natural language understanding, Cortana for voice, and the Bing APIs for search.

We are going to use Azure Bot Service which provides an integrated environment that is purpose-built for bot development, enabling us to build, connect, test, deploy, and manage bots, all from one place. It is powered by Microsoft Bot Framework and Azure Functions, which means that bot will run in a server-less environment on Azure that will scale based upon demand.

Following is what we are going to do :

  1. Create Q&A knowledge base.
  2. Create Azure service bot.
  3. Enable Web chat channel on the bot.
  4. Embed the web chat on the website.

For creating Q&A knowledge base,we are going to use Microsoft QnA Maker ,it s 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.

Microsoft QnA Maker Launch Page

QnA Maker is primarily meant to provide a FAQ data source which can be queried from either Bot/Application. QnA Maker is offered as one of several templates in Azure Bot Service which enables rapid intelligent bot development powered by Microsoft Bot Framework, and run in a server less environment, scales based on demand.Also note currently there is a limit of a 20MB knowledge base.

Pre-requisites:

  1. Microsoft Account for generating AppID for your bot.
  2. Microsoft Azure subscription to use Azure Bot service

We will head over to Microsoft QnA Maker to create Q&A knowledge base.

  1. Once you login,click ‘Create new service’ to create new knowledge base.
  2. On the Next page, check if the questions,answers are proper.If you want to edit answers / questions,you can do it in this step.

    Check if the uploaded questions,answers are proper

  3. Click on ‘Test’ section on the left to test/train the Q&A model you’ve created.Check if the service is able to retrieve the correct answer for particular question.If its not able to retrieve,choose the correct answer from the alternatives given.If you want to provide alternative phrasing for the same question,there is an option on the right.Once you’re done with testing,choose ‘Save and retrain’.
    Check the boxed portions,this where we test,train & add alternative phrasing to the question
    Lets test it with the questions we have uploaded
    Add multiple phrasing to the same question
    Test if we get the same answer for the alternate we added
    Check if the questions we have added is updated to QnA knowledge base
    Now lets check for negative scenarios by giving some irrelevant questions.Correct the response appropriately

    Correct the answer appropriately

  4. Visit the ‘Settings’ tab to check if all of them are proper.

    Review the settings

  5. Once verified,click on ‘Publish’ button
    Click on ‘Publish’ button

    Congratulations! we have published service

Now that we have published service,next step is to create bot which we will see in the next post.

If you’ve any questions,please post it in the comments section.

Like this post? Don’t forget to share it!

Summary
Article Name
Create AI Chatbot using Microsoft Bot Framework
Description
In this post,we look at how to create AI Chatbot using Microsoft Bot Framework
Author
Publisher Name
upnxtblog
Publisher Logo
Karthik

Allo! My name is Karthik,experienced IT professional.Upnxtblog covers key technology trends that impacts technology industry.This includes Cloud computing,Blockchain,Machine learning & AI,Best mobile apps, Best tools/open source libs etc.,I hope you would love it and you can be sure that each post is fantastic and will be worth your time.

Share
Published by
Karthik

Recent Posts

Navigating Volatility: Investing in Crypto Derivatives and Risk Management Strategies

The cryptocurrency market is famed for its volatility, presenting each opportunity and demanding situations for…

1 week ago

How Game Developers Use AI in Mobile Games in 2024?

Games since time immemorial have been winning at captivating the users and teleporting them onto…

1 week ago

The Impact of AI on Software Development

We are living within an innovation curve wherein cutting-edge technologies are making a hustle and…

2 weeks ago

AI Tools for Research Paper Writing: Learn What They Can Do

Whether it’s the healthcare industry or the automobile sector, artificial intelligence has left its impact…

3 weeks ago

Embracing Innovation: 5 Ways AI is Transforming the Landscape in 2024

Facts only- The big Artificial Intelligence push is unraveling in 2024. No, it wasn’t merely…

4 weeks ago

The Startup Guide to Acquiring Exceptional Developers

In the fiercely competitive world of Hire Developers for Startup, success hinges not just on…

1 month ago

This website uses cookies.