CHAT BOT USING MICROSOFT AZURE BOT SERVICE & LUIS

What is Azure Bot Service ?

For introduction to chat bots please refer this link here

Azure Bot Service is a intelligent, serverless bot development service introduced by Microsoft Azure on Azure Portal. This service is used to develop conversational bots with the help of various templates, cognitive services by Microsoft.

LUIS : LUIS is the Language Understanding Intelligent Service. LUIS enables developers to build smart applications that can understand human language and react accordingly to user requests.

For more information on LUIS visit here

Prerequisites for building a chat bot on Microsoft Azure Portal:

  • MSDN account for Azure
  • Knowledge of any one of the languages (C# or Node JS)
  • Basic knowledge of Artificial intelligence

Building a Simple Chat Bot

#1 – Go to Azure Portal and search for Bot Service under Data + Analytics

#2 – Create a BOT by filling the details like Bot Name, Subscription(default), Resource Group(Create New), and Location of your Choice.

Click on Create

#3 – After clicking on create it will take some seconds to create your BOT. After the Bot is created, you have to create  Microsoft App ID and password.

Click on Create  Microsoft App ID and password in above pic.

Copy the App Id and Password and Go back to form and fill it there.

#4 – In the same window, choose the preferred language for Coding, C# or Node JS.

Also Azure provide multiple templates for developing BOT, as shown below:

  • Basic
  • Form
  • Proactive
  • Language Understanding (using LUIS)
  • Question and Answer

Choose the t appropriate template, we have chosen Language Understanding (using LUIS).

Check on ‘I agree’ and proceed. Again it will take some seconds time to configure and build the BOT.

#5 – After this it will ask you to connect your bot to LUIS. so click on sign in.

#6 – This is how you console will look like after every thing is ready.

#7 – Now go to LUIS portal , your app will automatically be listed under my apps. Click on your app to customize.

This will open your LUIS app Dashboard with all analytics about your app and a side menu with attributes to customize the service.

Before proceeding further it is necessary to understand building intents and entities for the Chat Bot, It is similar to what I explained in my previous post for AWS LEX.

IntentsAn intent represents actions the user wants to perform. It is a purpose or goal expressed in a user’s input, such as booking a flightpaying a bill, or finding a news article. How to Add intents?

Utterances:  An utterance is the textual input from the user, that your app needs to interpret. It may be a sentence, like “Book me a ticket to Delhi”. How to add Utterances?

Entities: An entity represents an instance of a class of object that is relevant to a user’s intent. In the utterance “Book me a ticket to Paris”, “Paris” is an entity of type location. How to add Entities?

In this example,  “Location” is the entity for utterance “Book a flight to Delhi” for Intent “Book Flight”

#8 – Train & Publish the app from LUIS portal.

#9 – Now go back again to Azure Portal to access the LUIS HTTPS API in your BOT.

Write the Node JS Code to access the JSON data returned by the LUIS API and providing appropriate response to users queries (Utterances) .

#10- Save the code & Test the BOT

Here it is, Your BOT is ready!

For deploying the chat bot to different channels like Skype or Slack etc. Please visit here

Advertisements

3 thoughts on “CHAT BOT USING MICROSOFT AZURE BOT SERVICE & LUIS

  1. Nice post. I learn something totally new and challenging on blogs I stumbleupon every day. It will always be useful to read content from other writers and use something from their web sites. |

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s