uild, debug and deployfiles.informatandm.com/uploads/2018/10/build_debug_and...download bot...

33
#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM BUILD, DEBUG AND DEPLOY CHATBOTS Your First Serverless Bot #ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM Tara E. Walker Principal Software Engineer Microsoft @taraw

Upload: others

Post on 25-May-2020

23 views

Category:

Documents


0 download

TRANSCRIPT

#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM

BUILD, DEBUG AND DEPLOY

CHATBOTSYour First Serverless Bot

#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM

Tara E. WalkerPrincipal Software Engineer

Microsoft

@taraw

#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM

AGENDA

WHAT ARE BOTS & CONVERSATIONAL AI?

LANGUAGE UNDERSTANDING INTELLIGENCE SERVICE (LUIS)

CHATBOT DEVELOPMENT TOOLS

DEVELOPING A CHATBOT – DEMO

SUMMARY

#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM

WHAT ARE BOTS &CONVERSATIONAL AI?

THE NEXT TECHNOLOGY WAVE… Like The “Internet”?

WHAT IS A BOT?

Third-Party

Goals

• Start simple. Add complexity. No dead-ends

• Bot adapts to the user, based on context

• Composable and intelligent controls to manage complexity

Bot Controls

Query over database via Azure Search

Form filling

Q&A

Customer’s

business logic

and dataBot Connector

Web Chat

Cortana

Bing

Direct LineSkype for Business

Skype

What?

• Channels – 1st and 3rd party

• Hosting services – Azure Bot Service, Conversation Designer

• Tools – Emulators, WebChat, Client controls, SDK’s, Analytics

Why?

• Implements standard protocols

• Modeling conversations is hard. Tools help!

• UI across multiple canvases is hard. Cards

rock!

• Language understanding is hard

• Common and well understood patterns

LUIS

WHAT IS THE BOT FRAMEWORK?

BOTS ENABLE….................. • Perform one or more automated

tasks

• Use conversation as theinterface

• For both employees andcustomers

Answering

Coordinating

Listening

Observing

Anticipating

CONVERSATIONAL AI• Conversational apps are a category of AI-based

application solutions

• Imagine if technology could learn from us and discover ways to be helpful

Vision Speech KnowledgeLanguage Search

CONNECTING TO

COGNITIVE SERVICESBots are gateways to AI Services

Insightful customer contextIdentify customer and support history

Leverage customer journey for relevant actions

Case deflection with KnowledgeKB Cards

Case Management

6/08/16 59 Views

BOTS AS GATEWAY TO AI

Telegram

Email

Messenger

GroupMe

Skype

Slack

SMS

Web

Additional

Channels

Node js or .NetChatbot Web Application

Digital Agent

Azure Web App or Bot Service

Bot Connector

EndPoint

Bot Builder SDK

Cognitive API’s and

AI Services

Speech VisionLanguage

Machine

Learning

Cognitive

Services

Knowledge Search

Backend Systems and Services Authentication

MS Teams

CHATBOT HIGH LEVEL TECHNICAL

ARCHITECTURE

#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM

LANGUAGE UNDERSTANDING

INTELLIGENCE SERVICE (LUIS)

LUISLANGUAGE UNDERSTANDING

Fast: Add conversational intelligence

to your apps in minutes

Flexible:Activate models on any device

Expert:

Leverages MSR technology

Easy:

Use simple UX editor to create

language understanding models

Create models for your application to better understand intents like "turn on the lights", or entities such as "start a new jog/walk/hike/bikeride". Tune your model with in-depth performance visualizations.

Activate your language understanding models from your application on your phone, tablet, or any other device that has access to the Internet.

LUIS leverages innovative AI technology from Microsoft Research.

LUIS has a powerful dialog engine that enables you to maintain context, author and execute any dialog in just a few steps.

LUISLANGUAGE UNDERSTANDING

Add intents and entities1Intents:

• 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 navigating to

the intent page and clicking Add intent

LUISHOW LUIS WORKS

Add intents and entities (cont’d)

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 navigating to the entities page and

clicking on Add custom entity

• Several commonly used pre-built entities (e.g.

datetime, number) are also available to be added to

the app by clicking Add Pre-built Entities

LUISHOW LUIS WORKS

Provide more labeled examples2Seed the system with examples of utterances:

• Enter more examples of queries that you expect your users to

make per intent

• Navigate to the intent page

• Seed in examples of different patterns

• 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 diverse the examples you provide, the more better

generalization you should expect

LUISHOW LUIS WORKS

Use the model in your application3Activate model from your application on

any device:

• Call the LUIS Model via HTTP APIs

• LUIS provides detected intents and entities

• Use this information in your app.

What’s the weather in Berlin?

The weather is sunny with a temp of 88F.

LUISHOW LUIS WORKS

Notification Microsoft Teams Skype Android iOS

ADAPTIVE CARDSOPEN FRAMEWORK, MULTIPLE CANVASES

SPEECHDEEP INTEGRATION ACROSS THE BOT FRAMEWORK

SPEECH IN

PROTOCOLS

• A channel is the connection between the Bot Framework and communication apps.• Configuring a bot to directly run on a channel can be done on the Azure portal• The Bot Connector service enables your bot to exchange messages with channels configured in the Bot Framework Portal.• Bot connector service uses REST and JSON over HTTPS and enables authentication with JWT Bearer tokens

User Input

Response

Channels

Skype

Web chat

Cortana

Bot Connector

Service

Bot ServiceCognitive Services

(LUIS, QnAMaker,

Entity extraction, Speech, Search, Video Api)

Text,

Speech,

Media

Text,

Speech,

Media

Question

Intent processing(Az Search, APIs, database, Cosmos Db)

User

Intent

Response

CHATBOT CONVERSATION FLOW

#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM

CHATBOT DEVELOPMENT TOOLS

AZURE APP SERVICE EDITOR (BROWSER)

VISUAL STUDIO BOT TEMPLATE

• Bot framework emulator allows for testing and debugging bots locally and remotely

• Download bot framework emulator package from GitHub releases page

• To test bots remotely, you will need to install ngrok – a network tunneling software

• The Bot Framework Emulator integrates tightly with ngrok tunneling software and can launch it automatically when it is needed.

CHATBOT FRAMEWORK EMULATOR

#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM

DEVELOPING A CHATBOT

DEMO

#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM

SUMMARY

Bot Builder SDK

Build and connect intelligent bots

Powerful, easy-to-use framework

Start quickly with samples and templates

Open source on GitHub

Channels

Connect your bot to Teams, Skype, Cortana, or other channels

Configure channels via Azure Bot Service

User discovery of bots

Azure Bot service

Accelerated development

Give your bot intelligence with Cognitive Services

Engage your audience, wherever they are

CONVERSATIONAL AIBUILDING BOTS – FRAMEWORK

CONVERSATIONAL AIBUILDING BOTS – DEVELOPMENT

CONVERSATIONAL AI

User input Channels Business processBot intelligence

BUILDING BOTS – ENHANCING WITH AI

Azure Bot Service + Cognitive Services

http://bit.ly/BotServiceDocs

github.com/microsoft/botbuilder-dotnet

aischool.microsoft.com

GET STARTED RESOURCES

http://bit.ly/BotBuilderv4

aka.ms/LUIS

http://aipartner.microsoft.com

http://bit.ly/AzureBotService

aka.ms/AIServices

#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM

Thank You!Tara E. Walker@taraw