Clever data: Building a
chatbot from your database
Luis Beltrán
April 27th, 2019
Luis Beltrán
• Microsoft MVP in Developer Technologies
• Researcher and PhD student at Tomás Bata University in Zlín,
Czech Republic.
• Professor at Tecnológico Nacional de México in Celaya, Mexico.
@darkicebeam
luis@luisbeltran.mx
• A bot performs an action:
• Typically, bots react/respond to messages (conversational bots).
• Bots might run a background task.
• A bot detects a user’s intent.
• A bot is able to combine millions of data from different sources.
• A bot is available 24/7/365
• Any platform, anywhere.
• A bot uses AI to improve the user experience and keeps human effort
to a minimum.
Handoff to Human
Every company deals with this:
Handoff to Human
First
triage/data
collection
Simple and
repetitive
solutions
If it is simple and repetitive, it can
be coded. Bots can accelerate it
Handoff to Human
Bot to human hand off: Complete or supervised
Thank you for providing all this information. I
have John with me now who will take from here
and help you out
Hello, this is John. I understand your computer
won’t power on. Let’s take a look at some
service options
I’ve tried these steps, my computer still won’t turn on
Sounds lovely, thank you
I suggest us to request a hardware service. We can have one
of our service engineers look at your computer
Note to operator: It sounds like the user will need hardware
replacement, what next step should I take?
Apologize to
user
Suggest
hardware
service
Let me type
What is the Bot Framework?
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
LUIS
Query over database via
Azure Search
Form
Filling
QnA
C#
Customer’s
Business Logic
& DataBot Connector
Cortana Direct Line
What?
• Tools for building REST Web Sites
• Services to enrich
• Mechanisms for receive events
• Data to debug and analyze
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
Bot web service
Your bot code
Entity
Extraction
Speech
Vision/Face
Natural
Language
Translation
+ Microsoft Cognitive Services
Search
Emotion
Knowledge
API
…
Message input <> output
State Management
Bot Connector Service
Conversation Canvas/Channels
……
…
Other services, APIs,
Databases, Azure Machine
Learning, Azure Search,
etc…
Bot Builder SDK
Web Chat
Direct Line…
Email
Facebook
GroupMe
Kik
Skype
Slack
Telegram
Twilio (SMS)
An x-ray of a typical bot
Bot Builder SDK
Your bot code goes here
Bot Connector messages
Your bot
{
"type": "Message",
"id": "68YrxgtB53Y",
"conversationId": "DphPaFQrDuZDKyCez4AFGcT4vy5aQDje1lLGIjB8v18MFtb",
"language": "en",
"text": "You can say "/order" to order!",
"attachments": [ ],
"from": {
"name": "+12065551212",
"channelId": "sms",
"address": "+12065551212",
"id": "Ro52hKN287",
"isBot": false
},
"channelData": { SMS data here },
"botUserData": { your data here },
...
}
Bot
Connector
Bot Builder
SDK
Template
Your Bot LUIS
Publish to
Azure
Connect to
users
Add dialog
smarts
Bot Builder SDK Template
Language Understanding Intelligent Service (LUIS)
“I want to find
news about flight
delays”
{
“entities”: [
{
“entity”: “flight delays”,
“type”: “Topic”
}
],
“intents”: [
{
“intent”: “FindNews”,
“score”: 0.99853384
},
{
“intent”: “None”,
“score”: 0.07289317
},
{
“intent”: “ReadNews”,
“score”: 0.0167122427
},
{
“intent”: “ShareNews”,
“score”: 1.0919299E-06
}
]
}
Publish to Azure
Connect to Users
Add Dialog Smarts with Adaptive Cards
Notification Microsoft Teams Skype Android iOS
https://github.com/icebeam7
Bot scenarios
• Q & A
• Helpdesk
• Product selection
• Task automation
• Monitoring
• Expert Systems
Call to action
• Microsoft Bot Framework https://dev.botframework.com/
• Microsoft Cognitive Services https://microsoft.com/cognitive
• Bot Builder http://github.com/Microsoft/botbuilder
• LUIS https://luis.ai
• Docs https://aka.ms/azure/bots/overview/docs
¡Thank you for
your attention!
Luis Beltrán
Tomás Bata University in Zlín
Tecnológico Nacional de México en Celaya
luis@luisbeltran.mx luisbeltran.mx @darkicebeam
GitHub:
https://github.com/icebeam7
LinkedIn:
https://linkedin.com/in/luisantoniobeltran
SlideShare:
https://slideshare.net/icebeam
YouTube:
https://youtube.com/user/darkicebeam
About Me:
https://about.me/luis-beltran

Clever data building a chatbot from your database

  • 1.
    Clever data: Buildinga chatbot from your database Luis Beltrán April 27th, 2019
  • 2.
    Luis Beltrán • MicrosoftMVP in Developer Technologies • Researcher and PhD student at Tomás Bata University in Zlín, Czech Republic. • Professor at Tecnológico Nacional de México in Celaya, Mexico. @darkicebeam luis@luisbeltran.mx
  • 4.
    • A botperforms an action: • Typically, bots react/respond to messages (conversational bots). • Bots might run a background task. • A bot detects a user’s intent. • A bot is able to combine millions of data from different sources. • A bot is available 24/7/365 • Any platform, anywhere. • A bot uses AI to improve the user experience and keeps human effort to a minimum.
  • 6.
    Handoff to Human Everycompany deals with this:
  • 7.
    Handoff to Human First triage/data collection Simpleand repetitive solutions If it is simple and repetitive, it can be coded. Bots can accelerate it
  • 9.
    Handoff to Human Botto human hand off: Complete or supervised
  • 10.
    Thank you forproviding all this information. I have John with me now who will take from here and help you out Hello, this is John. I understand your computer won’t power on. Let’s take a look at some service options I’ve tried these steps, my computer still won’t turn on Sounds lovely, thank you I suggest us to request a hardware service. We can have one of our service engineers look at your computer Note to operator: It sounds like the user will need hardware replacement, what next step should I take? Apologize to user Suggest hardware service Let me type
  • 11.
    What is theBot Framework? 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 LUIS Query over database via Azure Search Form Filling QnA C# Customer’s Business Logic & DataBot Connector Cortana Direct Line What? • Tools for building REST Web Sites • Services to enrich • Mechanisms for receive events • Data to debug and analyze 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
  • 12.
    Bot web service Yourbot code Entity Extraction Speech Vision/Face Natural Language Translation + Microsoft Cognitive Services Search Emotion Knowledge API … Message input <> output State Management Bot Connector Service Conversation Canvas/Channels …… … Other services, APIs, Databases, Azure Machine Learning, Azure Search, etc… Bot Builder SDK Web Chat Direct Line… Email Facebook GroupMe Kik Skype Slack Telegram Twilio (SMS) An x-ray of a typical bot Bot Builder SDK Your bot code goes here
  • 13.
    Bot Connector messages Yourbot { "type": "Message", "id": "68YrxgtB53Y", "conversationId": "DphPaFQrDuZDKyCez4AFGcT4vy5aQDje1lLGIjB8v18MFtb", "language": "en", "text": "You can say "/order" to order!", "attachments": [ ], "from": { "name": "+12065551212", "channelId": "sms", "address": "+12065551212", "id": "Ro52hKN287", "isBot": false }, "channelData": { SMS data here }, "botUserData": { your data here }, ... } Bot Connector
  • 14.
    Bot Builder SDK Template Your BotLUIS Publish to Azure Connect to users Add dialog smarts
  • 15.
  • 17.
    Language Understanding IntelligentService (LUIS) “I want to find news about flight delays” { “entities”: [ { “entity”: “flight delays”, “type”: “Topic” } ], “intents”: [ { “intent”: “FindNews”, “score”: 0.99853384 }, { “intent”: “None”, “score”: 0.07289317 }, { “intent”: “ReadNews”, “score”: 0.0167122427 }, { “intent”: “ShareNews”, “score”: 1.0919299E-06 } ] }
  • 18.
  • 19.
  • 20.
    Add Dialog Smartswith Adaptive Cards Notification Microsoft Teams Skype Android iOS
  • 21.
  • 22.
    Bot scenarios • Q& A • Helpdesk • Product selection • Task automation • Monitoring • Expert Systems
  • 23.
    Call to action •Microsoft Bot Framework https://dev.botframework.com/ • Microsoft Cognitive Services https://microsoft.com/cognitive • Bot Builder http://github.com/Microsoft/botbuilder • LUIS https://luis.ai • Docs https://aka.ms/azure/bots/overview/docs
  • 24.
    ¡Thank you for yourattention! Luis Beltrán Tomás Bata University in Zlín Tecnológico Nacional de México en Celaya luis@luisbeltran.mx luisbeltran.mx @darkicebeam GitHub: https://github.com/icebeam7 LinkedIn: https://linkedin.com/in/luisantoniobeltran SlideShare: https://slideshare.net/icebeam YouTube: https://youtube.com/user/darkicebeam About Me: https://about.me/luis-beltran