The world becomes a virtual reality and things like bots are gaining more and more popularity. Organizations start to use them to intelligently transform business processes such as customer services, helpdesks and information retrieval.
We will learn how we can leverage our existing skills in Azure to build intelligent creatures. We'll see how we can create a unique mix of services and frameworks like Microsoft Bot Framework, Azure Functions, Azure App Service, Node.js, Language Understanding Intelligent Service(LUIS) and Cognitive Services to accomplish our goals. The session shows at a glance the different integration options with services such as Skype, Microsoft Teams, Slack, Messenger and many others.
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Building intelligent creatures with Microsoft Azure Bot Service & Node.js
1. Nov 18, 2017
Sofia
var title = “Building intelligent
creatures with Azure Bot Service &
Node.js”;
var info = {
name: “Radoslav Gatev”,
blog: “www.gatevnotes.com”,
linkedIn: “linkedin.com/in/radoslavgatev”
};
2. Nov 18, 2017
agenda();
• Intro to bots and chatbots
• Bot Framework basics
• Deployment options
• Bot intelligence
• Bot publishing process
3. Nov 18, 2017
What is a bot?
• Application that performs one or more
automated tasks
• Yes, just an application
9. Nov 18, 2017
Why bots are the new apps?
• A lot easier to install than mobile apps.
• Easily distributed
• Mobile apps are expensive to build & maintain
• Lots of use-cases that don’t justify a mobile app.
• Messaging apps are ubiquitous
• Consumers are experiencing mobile app fatigue
• Bot interactions are intrinsically bi-directional
• Humans are hardwired for conversation
10. Nov 18, 2017
A few examples
• Weather bot
• Grocery bot
• News bot
• Life advice bot
• Personal finance bot
• Scheduling bot
• A bot that is your friend
• Others…
16. Nov 18, 2017
Payments
• Works across most major platforms
• Fast and simple payment experience
• Bring commerce capabilities to your Bot
• Works with Stripe & Microsoft Seller Center
19. Nov 18, 2017
Bot Connector
• Connects your bot to multiple channels
• Relays the two-way communication:
o Bot -> Channel
o Channel <- Bot
20. Nov 18, 2017
Bot Connector(2)
Your bot’s
endpoint
Bot
Connector
{
"type": "Message",
"id": "68YrxgtB53Y",
"conversationId": "DphPaFQrDuZlLGIjB8v18MFtb",
"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 },
...
}
21. Nov 18, 2017
Bot Builder SDK Basics(1)
• Activity types
o Message
o Conversation update
o Contact relation update
o Typing
o Ping
o Delete user data
o End of conversation
22. Nov 18, 2017
Bot Builder SDK Basics(2)
• Message types
o Plain text
o Spoken text
o Media attachments
o Rich cards
o Adaptive cards
o Buttons
23. Nov 18, 2017
Bot Builder SDK Basics(3)
• Dialogs(Your web service router)
o Waterfall as a model of conversation flow
o Dialog stack(LIFO)
o Reusable
o The state is persisted
o Various types
24. Nov 18, 2017
Bot Builder SDK Basics(4)
• Dialogs(Your web service router)
26. Nov 18, 2017
A sample waterfall
// Ask the user for their name and greet them by name.
bot.dialog('greetings', [
function (session) {
builder.Prompts.text(session, 'Hi! What is your
name?');
},
function (session, results) {
session.endDialog('Hello ${results.response}!');
}
]);
28. Nov 18, 2017
Deployment options
• Azure Bot Service
o Consumption plan(Azure Functions)
• Serverless hosting
• Pay only for what you use
• Infinite autoscale*
o App Service plan(Azure web app)
• Predefined capacity
• Predictable cost
• Any reachable web location
29. Nov 18, 2017
Demo: Azure Bot Service
• Setting up a sample bot with Azure Bot Service
30. Nov 18, 2017
Add some intelligence!
• Language Understanding Intelligent
Service(LUIS)
o Create language understanding models
o Train them
o Publish them
o Use them
31. Nov 18, 2017
NLU Services evaluation
https://github.com/sebischair/NLU-Evaluation-Corpora
39. Nov 18, 2017
Some links:
https://docs.microsoft.com/en-us/bot-framework/
https://github.com/Microsoft/BotBuilder
https://github.com/Microsoft/BotFramework-WebChat
https://docs.microsoft.com/en-us/bot-framework/azure-
bot-service-overview
https://www.nuget.org/packages/Microsoft.Bot.Client
https://www.luis.ai/
https://dev.botframework.com/
https://azure.microsoft.com/en-us/try/cognitive-services/
40. Nov 18, 2017
Thanks to our Sponsors:
General Sponsor:
Gold Sponsors:
Technological Partner:
Hosting Partner:
In-Kind Partner:
Silver Sponsors:
Notes de l'éditeur
Blogger
Open source – Ghost for Azure App Service
All contributions are welcomed!
Ask questions immediately!
Let’s make a discussion.
How many know anything about Azure?
Social networks are losing their value because people today don’t like to post their thoughts on social networks anymore.
People prefer privacy and they would like to rather share their ideas directly to those they want.
There are lots of use-cases that don’t justify a mobile app. – hairdresser app
Messaging apps are ubiquitous and dominate consumer’s mobile engagement - 5.6X higher 12-month retention than other mobile apps.
https://medium.com/making-meya/11-reasons-why-bots-are-the-new-apps-9bb3856d60a7
In China there is a bot called Xiaoice, built by Microsoft, that over 20 million people talk to.
The average user interacts with the service 60 times a month.
This year MS launched Ruuh, yet another chatbot – targets India mostly.
Generally MS made a lot of attempts to launch an intelligent chatbots.
Show them Murphy. Make them pick some famous person.
Guiding the user into the right direction
Framing him in order to get the job done
Azure Bootcamp 2017 experience.
Mention Microsoft Dynamics 365 integration – CRM & ERP
Rule based
No artificial intelligence
Trained to do one thing
As smart as it is programmed to be
Communicates in a structured manner
AI based – NLP techniques
Intermixed – One is used for fallback for the other.
Node.js uses restify.
The SDK is also compatible with Express and the use of other web app frameworks is possible with some adaptation.
Direct Line API - You can enable communication between your bot and your own client application by using the Direct Line API.
webchat – as an iframe or React component
Show how to create a sample bot.
Show channels.
Skype audio calls
Show them analytics
1.The bot sends a payment request.
2.The user signs in with a Microsoft account to provide payment, shipping, and contact information. Callbacks are sent to the bot to indicate when the bot needs to perform certain operations (update shipping address, update shipping option, complete payment).
3.The bot processes the callbacks that it receives, including shipping address update, shipping option update, and payment complete.
Web Chat is an open source control.-IFRAME
-React component
The Cortana channel enables you to extend Cortana by authoring Skills. Visit the Cortana developer portal to learn how to add your skills to Cortana.
The Bing channel allows users to discover and chat with your bot directly in the Bing search result page.
DEMO: Show the restaurant in bing
Skype for Business is now integrated with the Bot Framework, allowing your bots to be part of conversations on the Skype for Business canvas.
Conversation update: Indicates that the bot was added to a conversation, other members were added to or removed from the conversation, or conversation metadata has changed.
Contact relation update: Indicates that the bot was added or removed from a user's contact list.
Delete user data: GDPR, user has the right to be forgotten.
DEMO: show the explorer
State:
Per-user, per-session, per-user+session
Types:
-Bult int are Yes/No, String, Number, Choices
-Form slot filling(brancing, disambiguation, multi-turn), e.g. Profile(home address, post code)
-Use external service for NLU -Natural Language Understanding
Show them how to start a bot locally.
Notice something!
These can continue till infinity.
Orlin Pavlov – Vmesto Men.
От колко време мисля само за това,
Как да си деплойна сървиса!?
Mention Anton Boyko’s session.
Nothing but a good set of templates
How do you add some NLP? Regular expression joke!Features,
prebuilt domains like ontology
Build public models for sale. Users will pay with their subscription.
NLU = Natural language understanding
three corpora which can be used for evaluating chatbots or other conversational interfaces. Statistically normalized!
-190 questions and answers from https://askubuntu.com., Five intents, three entity types (Printer, Software, Version).
-100 questions and answers from https://webapps.stackexchange.com. Eight intents (ChangePassword, DeleteAccount, DownloadVideo, ExportData, FilterSpam, FindAlternative, SyncAccounts, None) and three entity types (WebService, OS, Browser).
-206 questions from a Telegram chatbot for public transport in Munich.