Bot is a new fashion word. This session will explain you what’s a bot, what’s not a bot, how to build a bot using the Microsoft Bot Framework, how to include language recognition using LUIS.ai. The session will be illustrated by a real bot built to connect various information from my own house, garden, wine cellar and health as well as a real production Lego bot!
ITCamp 2017 - Laurent Ellerbach - Bot. You said bot? Let's build a bot then...
1. Bot. You said bot? let build bot then!
A developer introduction to a new world of apps
Laurent Ellerbach
laurelle@microsoft.com
Technical Evangelist Lead
Microsoft Central and Eastern Europe
https://blogs.msdn.com/laurelle
https://github.com/ellerbach
2. Many thanks to our sponsors & partners!
GOLD
SILVER
PARTNERS
PLATINUM
POWERED BY
5. Bots are not: Artificial Intelligence (AI)
• Bots can be simple task automation utilities
• Example: Password reset bot. There’s no AI here. Just
ask a couple of security validation questions, then
reset the password
• They may have AI as well, if the scenario applies
6. Bots are not: Natural language only
• The more your bot depends on natural language, the riskier the user
experience becomes. Typing isn’t always the best option.
• Move away from natural language as quickly as possible in the
navigation.
• “Drive” the user as much as you can (menus, choices, etc)
• Typing a lot on a mobile device: Bad experience
• Example: AzureBot “stop vm1” is a command, not natural language.
Less typing = better
7. Bots are not: Text interfaces only
• Bot channels are evolving quickly to support richer
experiences: Media, buttons, custom controls. These are
coming. Text is not the best experience for everything,
sometimes all you want is a button, or an image, or a
link…
• Examples:
• Skype allows audio and 3D bots as well.
• Slack, Facebook and Skype have buttons/custom UIs
10. Bots are apps
• They solve problems, like apps
• They are cross platform, you can run them anywhere, on
any device
• They are actually easier to build and deploy across
platforms than apps
• Very similar capabilities: Push notifications? Check.
• You can publish your bot instantly on Facebook, Skype,
Slack, Kik, email, custom hardware devices, anything.
11. Where to start?
• https://dev.botframework.com/
• One platform for multiple channels
• Same code, can be specific per
channel as well
• Fully REST API
17. How do we build great bots?
1. Start by asking what problem are we trying to solve. Refine until it
looks like a tangible problem and not “magic”
2. Ask how a bot will be a better experience. User experience is
EVERYTHING
3. Avoid too much natural language. Careful with unrealistic
expectations. Natural language recognition is limited. Menus work
great. Commands work great. Buttons, etc.
4. Collect data. Pump it to Azure. Use the same architecture you would
use with IoT scenarios (IoT hub, stream analytics, power BI, etc). You
can only analyze and improve your bot if you’re collecting metrics
for it
5. Iterate, improve
19. What about authentication?
• Every channel generate a unique encrypted ID per
user (for web, context lost when browser closed)
• Authentication can be done thru any method using
external webpage and calling back the bot thru web
API
– Example available on Github
• Objects are serialized so context data stored per user
21. A raspberry in the garden
• RPi v2 running Linux with Mono +
Atmega328
• Posting info on a Windows Gateway
• Connected to Azure IoT Hub
22. The Sprinkler board v3
• Raspberry Pi 2
• Windows IoT Core
• Code ported from
.NetMF
• Not that straight forward
(web server, UWP concept)
• Offer much simpler and
modern development
• Added connection to
Azure IoT Hub
24. The bot architecture: example with email
Raspberry PI running
Linux and node.js
Azure IoT Hub
Message
(picture)
SQL Azure
Blob storage
Web App, Bot framework
Bot providers
25. Natural language recognition
• Part of Azure Cognitive
services
• Natural language
recognition
• Few native languages
supported so far
• http://www.luis.ai
26. Integration of external services
• Magic of API
• Netatmo connected thermostat, getting temperature,
programs, changing presence mode
• Endless possibilities of integration (my next steps: wine cellar
inventory, weight…)