24
Building a BOT With an Intent

Building a bot with an intent

Embed Size (px)

Citation preview

Page 1: Building a bot with an intent

Building a BOTWith an Intent

Page 2: Building a bot with an intent

PRESENTED BY

Abhishek SurMicrosoft MVP (since 2011), Intel Software InnovatorSoftware Solution Architect, InSync Tech-Fin Solutions Ltd.

/abhi2434 /abhi2434 /in/abhi2434

Page 3: Building a bot with an intent

A comprehensive book on .NET Expert guide book with expert advices on development.

Part 1 includes Visual Studio, Memory Management, Windows 8, ASP.NET, WPF, Architecture etc.

A comprehensive book on .NET Expert guide book with expert advices on development.

Part 2 includes Debugging, WCF, Windows Phone, TestingTFS, Extensibility, Windows Azure etc.

Page 4: Building a bot with an intent

Agenda• What is BOT ?• How traditional bots are built ?• The Bot framework, why it exists? • Create a simple Bot using code• Connecting Cognitive Services to add an intent• Dialogs and Forms• Publishing and executing• Voice Calling Bots – How to ?• References & Samples

Page 5: Building a bot with an intent

Overview

Page 6: Building a bot with an intent

• A bot is a remote controlled software program that can interact with a human, do some automated tasks like searching in Bing, ordering pizza for you or giving recommendation based on your choices, just like a real human being. • Bots are software programs while ro-bots are mechanical as

well as software programs.• Examples, Siri, Cortana, SmarterChild of AOL messenger etc.

What is a Bot ?

Page 7: Building a bot with an intent

How Traditional bots are built?

Page 8: Building a bot with an intent

• Hell lot of language parsers to identify grammar and meaning of utterances.• Fixed response based on logic.• Strong dependence on database and AI. • Regular expressions to identify keywords.• Not easy, Complex code, Lots of research work.• Identify Domain knowledge and personality development just like

humans. • Separate set of API needed to provide integration to other services. • Expensive and needs to be marketed separately.

How traditional Bots are built?

Page 9: Building a bot with an intent

Why Bot Framework?

Page 10: Building a bot with an intent

• Easy to use and easy to learn.• Comprehensive documentation.• Years of experience on language understanding is provided

for free as service (LUIS). • Support for multiple languages and standards (REST, .NET,

NodeJS)• Supports built in integration with Microsoft Research AI

Service (LUIS) for natural language understanding. • Connector services to host BOTs over pre-existing channels

Features

Page 11: Building a bot with an intent

Architecture of BOTs

Page 12: Building a bot with an intent

Microsoft Cognitive Services

LUIS

Microsoft BOT Framework

Your BOT BOT Connector

Messages

Intents & Entities

Channels

Web Chat Skype Slack Facebook …

Other 3rd party APIs.

Page 13: Building a bot with an intent

• Bots are based on HTTP standards• Direct line APIs are used by each connector to communicate with

Bots.• Standard Authorization headers can be used for

BotAuthentication or even you can opt for custom authentication.• Conversation is based on pooling of HTTP Get.• Each conversation creates an ID to identify state.

• https://docs.botframework.com/en-us/restapi/directline/

Insights

Page 14: Building a bot with an intent

• Conversations are gradually becoming an integral part of digital life• It is hard for a service to have humans to respond to every

questions• Conversational User Interface developed by Microsoft and used in

Cortana is an example how a personal digital assistant can help you in daily life.• Easy to develop with new APIs. • Integration to common set of services.• A need of modern world.

Why BOT exists?

Page 15: Building a bot with an intent

Creating a Simple BOT with BOT Framework

DEMO

Page 16: Building a bot with an intent

Markdowns (for your reference)

Page 17: Building a bot with an intent

Connecting to BOT Connectors

DEMO

Page 18: Building a bot with an intent

Dialogs and Forms

Page 19: Building a bot with an intent

• Dialogs provides state full conversation• Dialog is a class implemented from IDialog maintains a stack of

conversation context. • Conversation state is stored as a State Service and is portable

across different machines. • Form flows provide guided conversation allowing the users to

choose path based on their own choices. • Wizard based approach implemented on top of Dialog Model.

Dialogs and Form flows?

Page 20: Building a bot with an intent

Dialogs and Forms

DEMO

Page 21: Building a bot with an intent

Skype Calling BOTs ?

DEMO

Page 22: Building a bot with an intent

• Documentation at https://docs.botframework.com• https://dev.botframework.com• https://github.com/Microsoft/BotBuilder• https://github.com/Microsoft/BotBuilder/tree/master/

CSharp/Samples• Bot related issues : [email protected]• Discuss at https://gitter.im/Microsoft/BotBuilder

References:

Page 23: Building a bot with an intent

Time for

Q&A

Page 24: Building a bot with an intent

Thank you !

/TechBhubaneswar

/TechBhubaneswar

www.techbhubaneswar.com #TechBhubaneswar2016

/abhi2434 /abhi2434 /in/abhi2434

Abhishek Sur

TechBhubaneshwar