Top Banner
Introducing the Azure Bot Service Lab code: https://github.com/vflorusso/botrevolution
39

Bot Revolution lab at Codemotion Milan 2016

Jan 19, 2017

Download

Software

gjuljo
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Bot Revolution lab at Codemotion Milan 2016

Introducing the Azure Bot Service

Lab code: https://github.com/vflorusso/botrevolution

Page 2: Bot Revolution lab at Codemotion Milan 2016

Chat Bots are services that people interact with through conversation and messaging.

Page 3: Bot Revolution lab at Codemotion Milan 2016
Page 4: Bot Revolution lab at Codemotion Milan 2016
Page 5: Bot Revolution lab at Codemotion Milan 2016
Page 6: Bot Revolution lab at Codemotion Milan 2016

The Bot Framework Emulator is a desktop application that allows bot developers to test and debug their bots on localhost or running remotely through a tunnel.

Page 7: Bot Revolution lab at Codemotion Milan 2016
Page 8: Bot Revolution lab at Codemotion Milan 2016
Page 9: Bot Revolution lab at Codemotion Milan 2016

When you finish writing your bot, you need to

• Register the bot to generate the bot’s app ID and password

• connect the bot to channels of your choice

• and (optionally) publish it.

Page 10: Bot Revolution lab at Codemotion Milan 2016
Page 11: Bot Revolution lab at Codemotion Milan 2016

If you're running your bot behind a firewall or other network boundary and want to connect to an external channel, you will need to install and configure tunneling software (i.e. ngrok).

Page 12: Bot Revolution lab at Codemotion Milan 2016
Page 13: Bot Revolution lab at Codemotion Milan 2016
Page 14: Bot Revolution lab at Codemotion Milan 2016
Page 15: Bot Revolution lab at Codemotion Milan 2016
Page 16: Bot Revolution lab at Codemotion Milan 2016
Page 17: Bot Revolution lab at Codemotion Milan 2016
Page 18: Bot Revolution lab at Codemotion Milan 2016
Page 19: Bot Revolution lab at Codemotion Milan 2016
Page 20: Bot Revolution lab at Codemotion Milan 2016
Page 21: Bot Revolution lab at Codemotion Milan 2016
Page 22: Bot Revolution lab at Codemotion Milan 2016
Page 23: Bot Revolution lab at Codemotion Milan 2016
Page 24: Bot Revolution lab at Codemotion Milan 2016
Page 25: Bot Revolution lab at Codemotion Milan 2016

Many messaging channels provide the ability to attach richer objects, such as media and reach cards.

In the Bot Connector we map our attachment data structure to media attachments and rich cards on each channel.

There are are several types of cards supported:

Page 26: Bot Revolution lab at Codemotion Milan 2016
Page 27: Bot Revolution lab at Codemotion Milan 2016

Create your

own LU model

Train by providing

examples

Deploy to an HTTP

endpoint and

activate on any

device

Maintain model

with ease

Page 28: Bot Revolution lab at Codemotion Milan 2016

Go to luis.ai:Sign in with your Microsoft account

(MSA). If you don’t have MSA, you will

have an option to create one.

Get started by creating a New App and

entering some basic information.

Next, you will be presented with the

Application Editor Workspace that will

allow you to create and train your own

language understanding model.

Page 29: Bot Revolution lab at Codemotion Milan 2016

Intents:Intents are actions that a user wants your app to take or the information they would like to obtain.

Example intents could include getting weather, booking tickets, adding a calendar entry or operating a light fixture.

Add one or more of user intents that you expect your app to handle by clicking + next to Intents item in the in the left-hand panel of the Editor Workspace.

X

Page 30: Bot Revolution lab at Codemotion Milan 2016

Entities:Entities are real world objects such as persons, locations, organizations, products, etc. that can be denoted with a proper name. Entities can be abstract or have a physical existence.

Entities can be generic (location, celebrity, datetime) or more specific (Seattle, Satya Nadella, June)

Add one or more entities that you expect your app to recognize by clicking + next to Entities item in the left-hand panel of the Editor Workspace.

Several commonly used pre-built entities (e.g. datetime, number) are also available to be added to the app by clicking + next to Pre-built Entities.

X

Page 31: Bot Revolution lab at Codemotion Milan 2016

Seed the system with more examples:Enter more examples of queries that you expect your users to make.

As you enter each one, you will need to:

• select the name of the correct intent from the dropdown

• label your entities that appear in each utterance by clicking on the entity and choosing corresponding label from the list

• pre-built entities get automatically labeled in grey

The more examples you provide, the more accurate the predictions.

X

Page 32: Bot Revolution lab at Codemotion Milan 2016

As you click Train at left bottom corner of the page, LUIS:Generalizes from the examples you provided.

Uses logistic regression classifiers to recognize intents.

Uses conditional random field to determine the entities.

Last train completed: 9/10/2016, 3:33:38 PM

Page 33: Bot Revolution lab at Codemotion Milan 2016

Deploy the model to an HTTP endpoint:Click the Publish button in the upper left-hand corner.

The URL that you see appear after a few moments makes your model available as a web service.

Page 34: Bot Revolution lab at Codemotion Milan 2016

Deploy the model to an HTTP endpoint:Click the Publish button in the upper left-hand corner.

The URL that you see appear after a few moments makes your model available as a web service.

Page 35: Bot Revolution lab at Codemotion Milan 2016

X

What’s the weather in

Berlin

The weather is sunny

with a temperature of

88°F. (data provided by Foreca

http://www.foreca.com)

Activate model from your application on any device:Update the URL with the parameter for the user query.

The response received from LUIS will contain the list of detected intents and entities together with the confidence scores.

You can now use this information in your app. For our example, we could next call the weather service and display the response in our app UI:

Page 36: Bot Revolution lab at Codemotion Milan 2016
Page 37: Bot Revolution lab at Codemotion Milan 2016

A new Bot Service is available on Azure!

Page 38: Bot Revolution lab at Codemotion Milan 2016

http://aka.ms/botresources

https://www.luis.ai/

https://azure.microsoft.com/services/bot-service/

https://channel9.msdn.com/Events/

Page 39: Bot Revolution lab at Codemotion Milan 2016