SlideShare una empresa de Scribd logo
1 de 128
Descargar para leer sin conexión
Build a chatbot, from Zero to Hero
bot revolution
Lab code: https://github.com/gjuljo/botworkshop
Chat bots are services that people interact with
through conversation and messaging.
Source: Conversational Interfaces, STCI Research (March 2016)
Hipmunk Bot & Reselling
Casey Neistat Bot & Affiliate Marketing
LMFAO’s FooBot & Cross promotion (Uber)
Westworld Bot (Aeden) & Viral Marketing
https://discoverwestworld.com
A new wave for user interfaces technology?
Conversational
Interfaces
(teenies)
Mobile
Apps
(noughties)
Web
Apps
(90’s)
Desktop
GUI
(80’s)
Your bot code
Entity
Extraction
Speech
Bot
Clipboard w
entities
Natural
Language
Translation
+ Intelligent Services
Bing
Knowledge
User
Preferences
Image
Intelligence
…
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)
Bot Builder SDK
Your code goes here
https://blogs.msdn.microsoft.com/uk_faculty_connection/2016/11/28/
creating-my-first-chatbot-using-microsoft-cognitive-services-and-
python/
https://github.com/yuyabee/bot_framework
https://github.com/zabirauf/ex_microsoftbot
https://github.com/jgoalby/fsharpstarterbot
https://github.com/bots4j/msbotframework
The Bot Framework Emulator is a desktop application that allows bot
developers to test and debug their bots on localhost or running remotely
through a tunnel.
When you finish writing your bot, you need to
• Register the bot to generate the bot’s app ID and password
• connect the bot to channels of your choice
• and (optionally) publish it.
If you're running your bot behind a firewall or other network boundary and
want to connect to an external channel, you will need to install and configure
tunneling software (i.e. ngrok).
Many messaging channels provide the ability to attach richer objects, such as
media and reach cards.
In the Bot Connector we map our attachment data structure to media
attachments and rich cards on each channel.
There are are several types of cards supported:
Create your
own LU model
Train by providing
examples
Deploy to an HTTP
endpoint and
activate on any
device
Maintain model
with ease
Are there any vegetarian restaurants within 3 miles
from my house that is open now?
Entity: distanceEntity: type
Entity: reference Entity: condition
Intent: FIND_RESTAURANT
Go to luis.ai:
Sign in with your Microsoft account (MSA).
If you don’t have MSA, you will have an
option to create one.
Get started by creating a New App and
entering some basic information.
Next, you will be presented with the
Application Editor Workspace that will
allow you to create and train your own
language understanding model.
Intents:
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 clicking +
next to Intents item in the in the left-
hand panel of the Editor Workspace.
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 clicking + next to
Entities item in the left-hand panel of the
Editor Workspace.
Several commonly used pre-built entities (e.g.
datetime, number) are also available to be
added to the app by clicking + next to Pre-
built Entities.
Seed the system with
more examples:
Enter more examples of queries that you
expect your users to make.
As you enter each one, you will need to:
• select the name of the correct intent from
the dropdown
• 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 examples you provide, the more
accurate the predictions.
As you click Train at
left bottom corner of
the page, LUIS:
Generalizes from the examples you
provided.
Uses logistic regression classifiers to
recognize intents.
Uses conditional random field to
determine the entities.
Deploy the model to
an HTTP endpoint:
Click the Publish button in the upper left-
hand corner.
The URL that you see appear after a few
moments makes your model available as a
web service.
Deploy the model to
an HTTP endpoint:
Click the Publish button in the upper left-
hand corner.
The URL that you see appear after a few
moments makes your model available as a
web service.
Activate model from
your application on
any device:
Update the URL with the parameter
for the user query.
The response received from LUIS will
contain the list of detected intents
and entities together with the
confidence scores.
You can now use this information in
your app. For our example, we could
next call the weather service and
display the response in our app UI:
What’s the weather in
Berlin
The weather is sunny
with a temperature of
88°F. (data provided by Foreca
http://www.foreca.com)
1 Extract questions and answers
QnA Maker extracts all possible pairs of questions and answers
from user provided content – FAQ URLs, documents and
editorial content.
2 Test, train and publish
Through QnA Maker’s easy-to-use GUI, you can edit, remove
or add pair before testing and training the knowledge base
and publishing your knowledge base as an API endpoint.
3 Integrates with other APIs and solutions
QnA Maker integrates with other APIs seamlessly and at scale. Use
QnA Maker with Cognitive Services such as Language Understanding
Intelligent Service and create something as elegantly simple as a chat
bot that answers FAQs, or as complex as an interactive virtual guide.
https://www.comune.roma.it/pcr/it/urp_faq.page
https://qnmaker.ai
knowledgebaseId
subscriptionKey
• fuzzy search keeps users from having to type exact matches;
• search scores allow us to determine the confidence of the results;
2. guiding a user through a conversation that facets and filters a dataset until
it finds what a user is looking for.
https://github.com/ryanvolum/AzureSearchBot
Faceted navigation is a filtering mechanism that
provides self-directed drilldown navigation in
search applications.
QUERY KEY
SERVICE NAME
INDEX NAME
LUIS, QnA Maker and Search are all powerful tools in
building knowledge bots, but how do we choose which
one to use?
Can we use them together?
Language
Speech
Search
Machine
Learning
Knowledge Vision
Spell
check
Speech API
Entity linking
Recommendation
API
Bing
autosuggest
Computer
vision
Emotion
Forecasting
Text to
speech
Thumbnail
generation
Anomaly
detection
Custom
recognition
(CRIS)
Bing
image search
Web language
model
Customer
feedback
analysis
Academic
knowledge
OCR, tagging,
captioning
Sentiment
scoring
Bing
news search
Bing
web search
Text analytics
Cognitive Services APIs
https://www.microsoft.com/cognitive-services
Translator Text API
Text Analytics API
Sentiment analysis Key phrase extraction
Topics detection Language detection
Bot Connector Service
Load Balancer
xxx.mybot.com
Bot Connector Service
Web App (PaaS)
xxx.mybot.com
Bot Connector Service
http://botwork-test.azurewebsites.net/api/messages http://botwork.azurewebsites.net/api/messages
test botwork
TESTDEV STAGE (BLUE) PROD (GREEN)
TESTDEV STAGE PROD
Telemetry is collected at each
tier: mobile applications, server
applications and browser1
Telemetry arrives in the Application
Insights service in the cloud where
it is processed & stored
Get a 360° view of the application
including availability, performance
and usage patterns3
2
Azure Application Insights
require('dotenv-extended').load();
var appInsights = require("applicationinsights").setup().start();
...
bot.dialog('/alfa', [
function (session) {
appInsights.client.trackEvent("alfa");
session.send("Great, this is alfa");
session.endDialog();
}
]);
bot.dialog('/beta', [
function (session) {
appInsights.client.trackEvent("beta");
session.send("Great, this is beta");
session.endDialog();
}
]);
...
https://docs.microsoft.com/en-us/azure/application-insights/app-insights-nodejs
https://github.com/CatalystCode/bot-fmk-dashboard
Hey, here’s what we’ve learned so far doing these things.
Come back tomorrow and we might have some new
learnings to share
Browsing the same old information on a new platform is
not very useful: it’s missing personalization.
Chatbot is expected to be conversational: a simple search
bar can fits fine in a web page.
What makes a bot great:
• It’s not how much AI it has
• It’s not how much natural language it offers
• It’s not whether it uses voice or not
It’s just whether it solves user’s needs in the quickest
and easier way comparted to other options
A bot with a single dialog and 100 LUIS intents is a bad design:
Events
Stages
Amenities
Music
Comedy
Film
Theater
• Guide the user
• Save time
• Help the user discover what your bot can do
What music would
you like?
(by the way, next
time you could just
type “I’m looking
for a song named
xyz” and I will know
what to do)
Hipmunk (Skype) Alterra (Telegram)
When given the choice of rich controls, text and voice, user
will choose:
1st UI controls
2nd Text
3rd Voice, only if options above aren’t possible
(i.e. driving a car)
When the conversation is the interface, experience design is all about
crafting the right words.
https://www.fastcodesign.com/3054934/the-next-phase-of-ux-designing-chatbot-personalities
The software must be doing a good job, because people know it’s a robot,
but still feel the need to say ‘thank you’.
Set the expectations.
Is you bot like HAL 9000, R2-D2 or Roomba?
Your journey is just started,
a bright future ahead.
https://unsplash.com/@austinban
http://aka.ms/botresources
https://www.luis.ai/
https://azure.microsoft.com/services/bot-service/
https://channel9.msdn.com/Events/

Más contenido relacionado

La actualidad más candente

Chat Bots Presentation 8.9.16
Chat Bots Presentation 8.9.16Chat Bots Presentation 8.9.16
Chat Bots Presentation 8.9.16
Samuel Adams, MBA
 

La actualidad más candente (20)

What is a chatbot?
What is a chatbot?What is a chatbot?
What is a chatbot?
 
Microsoft power virtual agents
Microsoft power virtual agentsMicrosoft power virtual agents
Microsoft power virtual agents
 
Build your First Chat Bot using Power Virtual Agents (PVA)
Build your First Chat Bot using Power Virtual Agents (PVA)Build your First Chat Bot using Power Virtual Agents (PVA)
Build your First Chat Bot using Power Virtual Agents (PVA)
 
Chat Bots Presentation 8.9.16
Chat Bots Presentation 8.9.16Chat Bots Presentation 8.9.16
Chat Bots Presentation 8.9.16
 
The Chatbots Are Coming: A Guide to Chatbots, AI and Conversational Interfaces
The Chatbots Are Coming: A Guide to Chatbots, AI and Conversational InterfacesThe Chatbots Are Coming: A Guide to Chatbots, AI and Conversational Interfaces
The Chatbots Are Coming: A Guide to Chatbots, AI and Conversational Interfaces
 
Chatbots - An Introduction
Chatbots - An IntroductionChatbots - An Introduction
Chatbots - An Introduction
 
Let's Build a Chatbot!
Let's Build a Chatbot!Let's Build a Chatbot!
Let's Build a Chatbot!
 
Chatbot ppt
Chatbot pptChatbot ppt
Chatbot ppt
 
SAP Success Factors & UiPath
SAP Success Factors & UiPathSAP Success Factors & UiPath
SAP Success Factors & UiPath
 
Build an AI based virtual agent
Build an AI based virtual agent Build an AI based virtual agent
Build an AI based virtual agent
 
The rise of Chatbots – Airtouch presentation over Chatbot Use Cases
The rise of Chatbots – Airtouch presentation over Chatbot Use CasesThe rise of Chatbots – Airtouch presentation over Chatbot Use Cases
The rise of Chatbots – Airtouch presentation over Chatbot Use Cases
 
Conversational AI– Beyond the chatbot hype
 Conversational AI– Beyond the chatbot hype Conversational AI– Beyond the chatbot hype
Conversational AI– Beyond the chatbot hype
 
Chat bots
Chat botsChat bots
Chat bots
 
CHATBOT PPT-2.pptx
CHATBOT PPT-2.pptxCHATBOT PPT-2.pptx
CHATBOT PPT-2.pptx
 
ChatGPT Deck.pptx
ChatGPT Deck.pptxChatGPT Deck.pptx
ChatGPT Deck.pptx
 
What is power apps
What is power appsWhat is power apps
What is power apps
 
Chat bot technologies overview
Chat bot technologies overviewChat bot technologies overview
Chat bot technologies overview
 
Conversation UIs & Chatbots an introduction
Conversation UIs & Chatbots an introductionConversation UIs & Chatbots an introduction
Conversation UIs & Chatbots an introduction
 
Chatbots
ChatbotsChatbots
Chatbots
 
Intro to power apps
Intro to power appsIntro to power apps
Intro to power apps
 

Similar a Chatbot development workshop with the Microsoft Bot Framework

Advanced Virtual Assistant Based on Speech Processing Oriented Technology on ...
Advanced Virtual Assistant Based on Speech Processing Oriented Technology on ...Advanced Virtual Assistant Based on Speech Processing Oriented Technology on ...
Advanced Virtual Assistant Based on Speech Processing Oriented Technology on ...
ijtsrd
 

Similar a Chatbot development workshop with the Microsoft Bot Framework (20)

API Workshop Series Part 2: The Future of Intelligent User Interactions
API Workshop Series Part 2: The Future of Intelligent User InteractionsAPI Workshop Series Part 2: The Future of Intelligent User Interactions
API Workshop Series Part 2: The Future of Intelligent User Interactions
 
Bot Revolution lab at Codemotion Milan 2016
Bot Revolution lab at Codemotion Milan 2016Bot Revolution lab at Codemotion Milan 2016
Bot Revolution lab at Codemotion Milan 2016
 
Designing for conversation
Designing for conversationDesigning for conversation
Designing for conversation
 
8 Flutter App Development Tools Developers Must Use For Your Project.pdf
8 Flutter App Development Tools Developers Must Use For Your Project.pdf8 Flutter App Development Tools Developers Must Use For Your Project.pdf
8 Flutter App Development Tools Developers Must Use For Your Project.pdf
 
Mat Velloso - Bots in the real world
Mat Velloso - Bots in the real worldMat Velloso - Bots in the real world
Mat Velloso - Bots in the real world
 
Azure Chat Bot application
Azure Chat Bot application Azure Chat Bot application
Azure Chat Bot application
 
Which Is The Best AI Tool For Mobile App Development_.pdf
Which Is The Best AI Tool For Mobile App Development_.pdfWhich Is The Best AI Tool For Mobile App Development_.pdf
Which Is The Best AI Tool For Mobile App Development_.pdf
 
Tweet Tracking App Design Document
Tweet Tracking App Design DocumentTweet Tracking App Design Document
Tweet Tracking App Design Document
 
Your First Assistant App with DialogFlow + Firebase
Your First Assistant App with DialogFlow + FirebaseYour First Assistant App with DialogFlow + Firebase
Your First Assistant App with DialogFlow + Firebase
 
Tech talk - Microsoft A.I.
Tech talk - Microsoft A.I.Tech talk - Microsoft A.I.
Tech talk - Microsoft A.I.
 
Using Chatbots in Extension Programming
Using Chatbots in Extension ProgrammingUsing Chatbots in Extension Programming
Using Chatbots in Extension Programming
 
Advanced Virtual Assistant Based on Speech Processing Oriented Technology on ...
Advanced Virtual Assistant Based on Speech Processing Oriented Technology on ...Advanced Virtual Assistant Based on Speech Processing Oriented Technology on ...
Advanced Virtual Assistant Based on Speech Processing Oriented Technology on ...
 
Build an app from scratch using teams app studio for ms teams
Build an app from scratch using teams app studio for ms teamsBuild an app from scratch using teams app studio for ms teams
Build an app from scratch using teams app studio for ms teams
 
"Build AI Compliant Whatsapp-like Chat App Using Qiscus SDK" by Evan Purnama ...
"Build AI Compliant Whatsapp-like Chat App Using Qiscus SDK" by Evan Purnama ..."Build AI Compliant Whatsapp-like Chat App Using Qiscus SDK" by Evan Purnama ...
"Build AI Compliant Whatsapp-like Chat App Using Qiscus SDK" by Evan Purnama ...
 
Leveling up your bot with language intelligence!
Leveling up your bot with language intelligence!Leveling up your bot with language intelligence!
Leveling up your bot with language intelligence!
 
Solvion Trendwerkstatt - Microsoft Azure + Bots
Solvion Trendwerkstatt - Microsoft Azure + BotsSolvion Trendwerkstatt - Microsoft Azure + Bots
Solvion Trendwerkstatt - Microsoft Azure + Bots
 
IRJET- Artificial Intelligence Based Chat-Bot
IRJET-  	  Artificial Intelligence Based Chat-BotIRJET-  	  Artificial Intelligence Based Chat-Bot
IRJET- Artificial Intelligence Based Chat-Bot
 
api.ai presentation
api.ai presentationapi.ai presentation
api.ai presentation
 
Revolutionize the way you work with AI and ChatGPT..gslides (2).pdf
Revolutionize the way you work with AI and ChatGPT..gslides (2).pdfRevolutionize the way you work with AI and ChatGPT..gslides (2).pdf
Revolutionize the way you work with AI and ChatGPT..gslides (2).pdf
 
Combining the Power of Bots and Microsoft Azure to Build the Apps of the Future
Combining the Power of Bots and Microsoft Azure to Build the Apps of the FutureCombining the Power of Bots and Microsoft Azure to Build the Apps of the Future
Combining the Power of Bots and Microsoft Azure to Build the Apps of the Future
 

Más de gjuljo

InterConnect2015 ICP3222 A MDD Approach to Agile Development of IoT Applications
InterConnect2015 ICP3222 A MDD Approach to Agile Development of IoT ApplicationsInterConnect2015 ICP3222 A MDD Approach to Agile Development of IoT Applications
InterConnect2015 ICP3222 A MDD Approach to Agile Development of IoT Applications
gjuljo
 

Más de gjuljo (20)

Azure deployments and ARM templates
Azure deployments and ARM templatesAzure deployments and ARM templates
Azure deployments and ARM templates
 
Azure Monitoring Overview
Azure Monitoring OverviewAzure Monitoring Overview
Azure Monitoring Overview
 
Going serverless with azure functions
Going serverless with azure functionsGoing serverless with azure functions
Going serverless with azure functions
 
Microsoft Azure Technical Overview
Microsoft Azure Technical OverviewMicrosoft Azure Technical Overview
Microsoft Azure Technical Overview
 
DevOps in the Cloud with Microsoft Azure
DevOps in the Cloud with Microsoft AzureDevOps in the Cloud with Microsoft Azure
DevOps in the Cloud with Microsoft Azure
 
Microservices Architecture: Labs
Microservices Architecture: LabsMicroservices Architecture: Labs
Microservices Architecture: Labs
 
Microservices Architectures: Become a Unicorn like Netflix, Twitter and Hailo
Microservices Architectures: Become a Unicorn like Netflix, Twitter and HailoMicroservices Architectures: Become a Unicorn like Netflix, Twitter and Hailo
Microservices Architectures: Become a Unicorn like Netflix, Twitter and Hailo
 
IBM Business Connect 2015 - Bluemix Overview
IBM Business Connect 2015 - Bluemix OverviewIBM Business Connect 2015 - Bluemix Overview
IBM Business Connect 2015 - Bluemix Overview
 
FORUM PA 2015 - Microservices with IBM Bluemix
FORUM PA 2015 - Microservices with IBM BluemixFORUM PA 2015 - Microservices with IBM Bluemix
FORUM PA 2015 - Microservices with IBM Bluemix
 
IBM Bluemix Introdution for Hackathons
IBM Bluemix Introdution for HackathonsIBM Bluemix Introdution for Hackathons
IBM Bluemix Introdution for Hackathons
 
IBM Bluemix Hackathon Accelerator
IBM Bluemix Hackathon AcceleratorIBM Bluemix Hackathon Accelerator
IBM Bluemix Hackathon Accelerator
 
IBM Bluemix and the Internet of Things - Workshop
IBM Bluemix and the Internet of Things - WorkshopIBM Bluemix and the Internet of Things - Workshop
IBM Bluemix and the Internet of Things - Workshop
 
Codemotion Rome 2015 IBM Bluemix and Docker
Codemotion Rome 2015 IBM Bluemix and DockerCodemotion Rome 2015 IBM Bluemix and Docker
Codemotion Rome 2015 IBM Bluemix and Docker
 
Codemotion Rome 2015 Bluemix Lab Tutorial
Codemotion Rome 2015 Bluemix Lab TutorialCodemotion Rome 2015 Bluemix Lab Tutorial
Codemotion Rome 2015 Bluemix Lab Tutorial
 
Codemotion Rome 2015 - Microservices with IBM Bluemix and DevOps Services
Codemotion Rome 2015 - Microservices with IBM Bluemix and DevOps ServicesCodemotion Rome 2015 - Microservices with IBM Bluemix and DevOps Services
Codemotion Rome 2015 - Microservices with IBM Bluemix and DevOps Services
 
Hybrid Cloud with IBM Bluemix, Docker and Open Stack
Hybrid Cloud with IBM Bluemix, Docker and Open StackHybrid Cloud with IBM Bluemix, Docker and Open Stack
Hybrid Cloud with IBM Bluemix, Docker and Open Stack
 
InterConnect2015 ICP3222 A MDD Approach to Agile Development of IoT Applications
InterConnect2015 ICP3222 A MDD Approach to Agile Development of IoT ApplicationsInterConnect2015 ICP3222 A MDD Approach to Agile Development of IoT Applications
InterConnect2015 ICP3222 A MDD Approach to Agile Development of IoT Applications
 
IBM Bluemix Tech Meetup 18-02-2015
IBM Bluemix Tech Meetup 18-02-2015IBM Bluemix Tech Meetup 18-02-2015
IBM Bluemix Tech Meetup 18-02-2015
 
IBM Bluemix saves the game
IBM Bluemix saves the gameIBM Bluemix saves the game
IBM Bluemix saves the game
 
IBM Bluemix on the go - Giulio Santoli (Mobility Hackathon)
IBM Bluemix on the go - Giulio Santoli (Mobility Hackathon)IBM Bluemix on the go - Giulio Santoli (Mobility Hackathon)
IBM Bluemix on the go - Giulio Santoli (Mobility Hackathon)
 

Último

Último (20)

Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 

Chatbot development workshop with the Microsoft Bot Framework

  • 1. Build a chatbot, from Zero to Hero bot revolution Lab code: https://github.com/gjuljo/botworkshop
  • 2.
  • 3. Chat bots are services that people interact with through conversation and messaging.
  • 4. Source: Conversational Interfaces, STCI Research (March 2016)
  • 5. Hipmunk Bot & Reselling
  • 6.
  • 7.
  • 8. Casey Neistat Bot & Affiliate Marketing
  • 9. LMFAO’s FooBot & Cross promotion (Uber)
  • 10. Westworld Bot (Aeden) & Viral Marketing https://discoverwestworld.com
  • 11.
  • 12. A new wave for user interfaces technology? Conversational Interfaces (teenies) Mobile Apps (noughties) Web Apps (90’s) Desktop GUI (80’s)
  • 13.
  • 14.
  • 15. Your bot code Entity Extraction Speech Bot Clipboard w entities Natural Language Translation + Intelligent Services Bing Knowledge User Preferences Image Intelligence … 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) Bot Builder SDK Your code goes here
  • 17.
  • 18.
  • 19.
  • 20.
  • 21. The Bot Framework Emulator is a desktop application that allows bot developers to test and debug their bots on localhost or running remotely through a tunnel.
  • 22.
  • 23.
  • 24. When you finish writing your bot, you need to • Register the bot to generate the bot’s app ID and password • connect the bot to channels of your choice • and (optionally) publish it.
  • 25.
  • 26. If you're running your bot behind a firewall or other network boundary and want to connect to an external channel, you will need to install and configure tunneling software (i.e. ngrok).
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40. Many messaging channels provide the ability to attach richer objects, such as media and reach cards. In the Bot Connector we map our attachment data structure to media attachments and rich cards on each channel. There are are several types of cards supported:
  • 41.
  • 42.
  • 43.
  • 44. Create your own LU model Train by providing examples Deploy to an HTTP endpoint and activate on any device Maintain model with ease
  • 45. Are there any vegetarian restaurants within 3 miles from my house that is open now? Entity: distanceEntity: type Entity: reference Entity: condition Intent: FIND_RESTAURANT
  • 46. Go to luis.ai: Sign in with your Microsoft account (MSA). If you don’t have MSA, you will have an option to create one. Get started by creating a New App and entering some basic information. Next, you will be presented with the Application Editor Workspace that will allow you to create and train your own language understanding model.
  • 47. Intents: 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 clicking + next to Intents item in the in the left- hand panel of the Editor Workspace.
  • 48. 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 clicking + next to Entities item in the left-hand panel of the Editor Workspace. Several commonly used pre-built entities (e.g. datetime, number) are also available to be added to the app by clicking + next to Pre- built Entities.
  • 49. Seed the system with more examples: Enter more examples of queries that you expect your users to make. As you enter each one, you will need to: • select the name of the correct intent from the dropdown • 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 examples you provide, the more accurate the predictions.
  • 50. As you click Train at left bottom corner of the page, LUIS: Generalizes from the examples you provided. Uses logistic regression classifiers to recognize intents. Uses conditional random field to determine the entities.
  • 51. Deploy the model to an HTTP endpoint: Click the Publish button in the upper left- hand corner. The URL that you see appear after a few moments makes your model available as a web service.
  • 52. Deploy the model to an HTTP endpoint: Click the Publish button in the upper left- hand corner. The URL that you see appear after a few moments makes your model available as a web service.
  • 53. Activate model from your application on any device: Update the URL with the parameter for the user query. The response received from LUIS will contain the list of detected intents and entities together with the confidence scores. You can now use this information in your app. For our example, we could next call the weather service and display the response in our app UI: What’s the weather in Berlin The weather is sunny with a temperature of 88°F. (data provided by Foreca http://www.foreca.com)
  • 54.
  • 55.
  • 56. 1 Extract questions and answers QnA Maker extracts all possible pairs of questions and answers from user provided content – FAQ URLs, documents and editorial content. 2 Test, train and publish Through QnA Maker’s easy-to-use GUI, you can edit, remove or add pair before testing and training the knowledge base and publishing your knowledge base as an API endpoint. 3 Integrates with other APIs and solutions QnA Maker integrates with other APIs seamlessly and at scale. Use QnA Maker with Cognitive Services such as Language Understanding Intelligent Service and create something as elegantly simple as a chat bot that answers FAQs, or as complex as an interactive virtual guide.
  • 58.
  • 60.
  • 62.
  • 63. • fuzzy search keeps users from having to type exact matches; • search scores allow us to determine the confidence of the results; 2. guiding a user through a conversation that facets and filters a dataset until it finds what a user is looking for. https://github.com/ryanvolum/AzureSearchBot
  • 64.
  • 65.
  • 66. Faceted navigation is a filtering mechanism that provides self-directed drilldown navigation in search applications.
  • 67.
  • 69.
  • 70. LUIS, QnA Maker and Search are all powerful tools in building knowledge bots, but how do we choose which one to use? Can we use them together?
  • 71.
  • 72. Language Speech Search Machine Learning Knowledge Vision Spell check Speech API Entity linking Recommendation API Bing autosuggest Computer vision Emotion Forecasting Text to speech Thumbnail generation Anomaly detection Custom recognition (CRIS) Bing image search Web language model Customer feedback analysis Academic knowledge OCR, tagging, captioning Sentiment scoring Bing news search Bing web search Text analytics Cognitive Services APIs
  • 75.
  • 76.
  • 77. Text Analytics API Sentiment analysis Key phrase extraction Topics detection Language detection
  • 78.
  • 79.
  • 80.
  • 81.
  • 82.
  • 83. Bot Connector Service Load Balancer xxx.mybot.com Bot Connector Service Web App (PaaS) xxx.mybot.com
  • 84.
  • 85.
  • 86.
  • 87.
  • 88.
  • 89.
  • 90.
  • 91.
  • 92.
  • 93. Bot Connector Service http://botwork-test.azurewebsites.net/api/messages http://botwork.azurewebsites.net/api/messages test botwork
  • 94.
  • 95. TESTDEV STAGE (BLUE) PROD (GREEN)
  • 96.
  • 97.
  • 99.
  • 100.
  • 101.
  • 102. Telemetry is collected at each tier: mobile applications, server applications and browser1 Telemetry arrives in the Application Insights service in the cloud where it is processed & stored Get a 360° view of the application including availability, performance and usage patterns3 2 Azure Application Insights
  • 103.
  • 104. require('dotenv-extended').load(); var appInsights = require("applicationinsights").setup().start(); ... bot.dialog('/alfa', [ function (session) { appInsights.client.trackEvent("alfa"); session.send("Great, this is alfa"); session.endDialog(); } ]); bot.dialog('/beta', [ function (session) { appInsights.client.trackEvent("beta"); session.send("Great, this is beta"); session.endDialog(); } ]); ... https://docs.microsoft.com/en-us/azure/application-insights/app-insights-nodejs
  • 105.
  • 106.
  • 107.
  • 109.
  • 110.
  • 111. Hey, here’s what we’ve learned so far doing these things. Come back tomorrow and we might have some new learnings to share
  • 112.
  • 113. Browsing the same old information on a new platform is not very useful: it’s missing personalization. Chatbot is expected to be conversational: a simple search bar can fits fine in a web page.
  • 114.
  • 115. What makes a bot great: • It’s not how much AI it has • It’s not how much natural language it offers • It’s not whether it uses voice or not It’s just whether it solves user’s needs in the quickest and easier way comparted to other options
  • 116.
  • 117. A bot with a single dialog and 100 LUIS intents is a bad design:
  • 118.
  • 119. Events Stages Amenities Music Comedy Film Theater • Guide the user • Save time • Help the user discover what your bot can do What music would you like? (by the way, next time you could just type “I’m looking for a song named xyz” and I will know what to do)
  • 120. Hipmunk (Skype) Alterra (Telegram)
  • 121. When given the choice of rich controls, text and voice, user will choose: 1st UI controls 2nd Text 3rd Voice, only if options above aren’t possible (i.e. driving a car)
  • 122.
  • 123.
  • 124. When the conversation is the interface, experience design is all about crafting the right words. https://www.fastcodesign.com/3054934/the-next-phase-of-ux-designing-chatbot-personalities The software must be doing a good job, because people know it’s a robot, but still feel the need to say ‘thank you’.
  • 125. Set the expectations. Is you bot like HAL 9000, R2-D2 or Roomba?
  • 126. Your journey is just started, a bright future ahead. https://unsplash.com/@austinban
  • 127.