SlideShare a Scribd company logo
1 of 40
Introduction
To Bots
What Can Bots Do?
@Saelia
Microsoft Knowledge Cloud
Tap into vast information, facts & actions on people, places and things from the web or your circle
Microsoft Bot Framework
Build your own conversational agents, and connect them wherever your users are talking
Microsoft Cognitive Services
Give smarts to your experiences with cutting-edge technologies for speech, vision, language and knowledge understanding
Build and deploy your web service with Azure’s industry-leading Platform-as-a-Service (PaaS) cloud infrastructure.
Microsoft Bot Distribution Channels
(Bing, Skype, Cortana/Win10, and third party clients like Slack, Kik, and Messenger)
Conversations as a Platform Technologies
Microsoft Azure
Chat bots
Bots / Chat bots are
conversational
interfaces
They have a human-like
online presence
A bot resides in a
messaging application as
a contact
The Story
MHacks
@Saelia
@Saelia
The Solution
Hackathon Bot
@Saelia
http://portal.azure.com
@Saelia
1. Find your endpoint
URL on Azure
2. Register Your Bot
3. Save App ID and
App Password
@Saelia
s /api/messages
Web App Settings:
2. MICROSOFT_APP_PASSWORD
Let’s get coding!
#BotFramework
@Saelia
@Saelia
var restify = require('restify');
var builder = require('botbuilder');
//=========================================================
// Bot Setup
//=========================================================
// Setup Restify Server
var server = restify.createServer();
server.listen(process.env.port || process.env.PORT || 3978, function () {
console.log('%s listening to %s', server.name, server.url);
});
// Create chat bot
var connector = new builder.ChatConnector({
appId: <Your App ID>
appPassword: <Your App Secret>
});
var bot = new builder.UniversalBot(connector);
server.post('/api/messages', connector.listen());
bot.dialog('/', function (session) {
session.send("Hello World");
});
The IntentDialog class lets you listen for the user to say a
specific keyword or phrase.
bot.dialog('/study', new builder.IntentDialog()
.matches(/^ready/i, [
function (session) {
session.send(quiz.Terms[index])
}])
.matches(/^flip/i, [
function(session) {
session. send(quiz.Def[index])
}]
)
…...........
);
Session object is passed to your dialog handlers any
time your bot receives a message from the user.
The session object is the primary mechanism used to
manage messages received from and sent to the user.
bot.dialog('/', function (session) {
session.send("Hello! Welcome to the MHacks Quiz Bot. Would you like to study today?")
session.beginDialog('/user');
});
@Saelia
bot.dialog('/subject', [
function (session) {
setTimeout(function(){
builder.Prompts.text(session, "What study set would you like today?" + quiz.Sets);
}, 2000)
},
function (session, results) {
quiz.GetTerms(results.response);
session.send("Ok! I got your flashcards! Send 'ready' to begin. Send 'flip' for definition. Send 'next'
for the next card. Send 'exit' when you are done")
session.beginDialog('/study')
}]
);
Different return types of prompts available:
builder.Prompts.text(session, "What's your name?");
builder.Prompts.number(session, "How many do you want?");
builder.Prompts.time(session, "When is your appointment?");
builder.Prompts.choice(session, "Which color?", "red|green|blue");
bot.dialog('/subject', [
function (session) {
setTimeout(function(){
builder.Prompts.text(session, "What study set would you like today?" + quiz.Sets);
}, 2000)
},
function (session, results) {
quiz.GetTerms(results.response);
session.send("Ok! I got your flashcards! Send 'ready' to begin. Send 'flip' for definition. Send 'next'
for the next card. Send 'exit' when you are done")
session.beginDialog('/study')
}]
);
@Saelia
Smarter Not Harder!
Using LUIS
@Saelia
https://www.luis.ai/
Microsoft Cognitive Services
@Saelia
Types of
Bots
Rule-Based Bots
AI-Based Bots
(uses NLP)
{
“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
}
]
}
I want to use Microsoft technology to hack and win a
Surface Pro 4
sponsor action prize
@Saelia
Demo Time
@Saelia
Sarah Sexton
Technical Evangelist
US DX Audience | Microsoft, Chicago
@Saelia
• Steps: http://aka.ms/MHacksChatBot
• Demo: MicrosoftCareerBot.azurewebsites.net
• GitHub.com/jennifermarsman/MicrosoftCareerBot
• Slides: http://aka.ms/BreakingIntoBots
• Docs: http://dev.botframework.com
Breaking into Bots

More Related Content

Viewers also liked

Building an Integrated Marketing Plan
Building an Integrated Marketing PlanBuilding an Integrated Marketing Plan
Building an Integrated Marketing PlanMargaret Dawson
 
The Invisible Giant that Mucks Up Our Marketing
The Invisible Giant that Mucks Up Our MarketingThe Invisible Giant that Mucks Up Our Marketing
The Invisible Giant that Mucks Up Our MarketingRand Fishkin
 
DataArt Innovation Showcase Omni-Channel Bots
DataArt Innovation Showcase Omni-Channel BotsDataArt Innovation Showcase Omni-Channel Bots
DataArt Innovation Showcase Omni-Channel BotsAlan Quayle
 
Why Startups Suck at Marketing
Why Startups Suck at MarketingWhy Startups Suck at Marketing
Why Startups Suck at MarketingRand Fishkin
 
2015 Marketing Strategy & Planning Template
2015 Marketing Strategy & Planning Template2015 Marketing Strategy & Planning Template
2015 Marketing Strategy & Planning TemplateRed Bamboo Marketing
 
A Primer On Digital Marketing in India (includes statistics, Digital Strategy...
A Primer On Digital Marketing in India (includes statistics, Digital Strategy...A Primer On Digital Marketing in India (includes statistics, Digital Strategy...
A Primer On Digital Marketing in India (includes statistics, Digital Strategy...Ethinos Digital Marketing
 
Marketing Plan Presentation Template
Marketing Plan Presentation TemplateMarketing Plan Presentation Template
Marketing Plan Presentation TemplateDemand Metric
 
Why Social Media Chat Bots Are the Future of Communication - Deck
Why Social Media Chat Bots Are the Future of Communication - DeckWhy Social Media Chat Bots Are the Future of Communication - Deck
Why Social Media Chat Bots Are the Future of Communication - DeckJan Rezab
 
Inside Google's Numbers in 2017
Inside Google's Numbers in 2017Inside Google's Numbers in 2017
Inside Google's Numbers in 2017Rand Fishkin
 

Viewers also liked (11)

Building an Integrated Marketing Plan
Building an Integrated Marketing PlanBuilding an Integrated Marketing Plan
Building an Integrated Marketing Plan
 
The Invisible Giant that Mucks Up Our Marketing
The Invisible Giant that Mucks Up Our MarketingThe Invisible Giant that Mucks Up Our Marketing
The Invisible Giant that Mucks Up Our Marketing
 
DataArt Innovation Showcase Omni-Channel Bots
DataArt Innovation Showcase Omni-Channel BotsDataArt Innovation Showcase Omni-Channel Bots
DataArt Innovation Showcase Omni-Channel Bots
 
Why Startups Suck at Marketing
Why Startups Suck at MarketingWhy Startups Suck at Marketing
Why Startups Suck at Marketing
 
B2B SEO in 2017
B2B SEO in 2017B2B SEO in 2017
B2B SEO in 2017
 
2015 Marketing Strategy & Planning Template
2015 Marketing Strategy & Planning Template2015 Marketing Strategy & Planning Template
2015 Marketing Strategy & Planning Template
 
A Primer On Digital Marketing in India (includes statistics, Digital Strategy...
A Primer On Digital Marketing in India (includes statistics, Digital Strategy...A Primer On Digital Marketing in India (includes statistics, Digital Strategy...
A Primer On Digital Marketing in India (includes statistics, Digital Strategy...
 
Marketing Plan Presentation Template
Marketing Plan Presentation TemplateMarketing Plan Presentation Template
Marketing Plan Presentation Template
 
Why Social Media Chat Bots Are the Future of Communication - Deck
Why Social Media Chat Bots Are the Future of Communication - DeckWhy Social Media Chat Bots Are the Future of Communication - Deck
Why Social Media Chat Bots Are the Future of Communication - Deck
 
SEO in 2017/18
SEO in 2017/18SEO in 2017/18
SEO in 2017/18
 
Inside Google's Numbers in 2017
Inside Google's Numbers in 2017Inside Google's Numbers in 2017
Inside Google's Numbers in 2017
 

Similar to Breaking into Bots

Azure Bot Services - Malaysia
Azure Bot Services - MalaysiaAzure Bot Services - Malaysia
Azure Bot Services - MalaysiaCheah Eng Soon
 
Microsoft Bot Framework (Node.js Edition)
Microsoft Bot Framework (Node.js Edition)Microsoft Bot Framework (Node.js Edition)
Microsoft Bot Framework (Node.js Edition)Jens Siebert
 
#BeBot Meetup - Chatbots & LUIS by Nick Trogh (Microsoft)
#BeBot Meetup - Chatbots & LUIS by Nick Trogh (Microsoft)#BeBot Meetup - Chatbots & LUIS by Nick Trogh (Microsoft)
#BeBot Meetup - Chatbots & LUIS by Nick Trogh (Microsoft)Faction XYZ
 
ESPC Teams week Microsoft Teams & Bot Framework – a Developer’s Perspective
ESPC Teams week Microsoft Teams & Bot Framework – a Developer’s PerspectiveESPC Teams week Microsoft Teams & Bot Framework – a Developer’s Perspective
ESPC Teams week Microsoft Teams & Bot Framework – a Developer’s PerspectiveThomas Gölles
 
[2019 Serverless Summit] Building Serverless Slack Chatbot on IBM Cloud Func...
 [2019 Serverless Summit] Building Serverless Slack Chatbot on IBM Cloud Func... [2019 Serverless Summit] Building Serverless Slack Chatbot on IBM Cloud Func...
[2019 Serverless Summit] Building Serverless Slack Chatbot on IBM Cloud Func...Tomomi Imura
 
Build an Intelligent Bot
Build an Intelligent BotBuild an Intelligent Bot
Build an Intelligent BotSorin Peste
 
Global office 365 developer bootcamp Slovenia 2018
Global office 365 developer bootcamp Slovenia 2018Global office 365 developer bootcamp Slovenia 2018
Global office 365 developer bootcamp Slovenia 2018Thomas Gölles
 
Microsoft teams & bot framework - A developer's perspective
Microsoft teams & bot framework - A developer's perspectiveMicrosoft teams & bot framework - A developer's perspective
Microsoft teams & bot framework - A developer's perspectiveThomas Gölles
 
Build a great conversationalist using Azure Bot Service 2018
Build a great conversationalist using Azure Bot Service 2018Build a great conversationalist using Azure Bot Service 2018
Build a great conversationalist using Azure Bot Service 2018Radoslav Gatev
 
Chatbots - A CMD for Humans (Ort Braude 2018)
Chatbots - A CMD for Humans (Ort Braude 2018)Chatbots - A CMD for Humans (Ort Braude 2018)
Chatbots - A CMD for Humans (Ort Braude 2018)Moaid Hathot
 
Azure Bot Framework
Azure Bot FrameworkAzure Bot Framework
Azure Bot FrameworkPhat Nguyen
 
Webinar - Building a ChatBot using IBM Watson Conversation Service
Webinar - Building a ChatBot using IBM Watson Conversation ServiceWebinar - Building a ChatBot using IBM Watson Conversation Service
Webinar - Building a ChatBot using IBM Watson Conversation ServiceThirdEye Data
 
Cross Platform Mobile App Development - An Introduction to Sencha Touch
Cross Platform Mobile App Development - An Introduction to Sencha TouchCross Platform Mobile App Development - An Introduction to Sencha Touch
Cross Platform Mobile App Development - An Introduction to Sencha TouchFolio3 Software
 
Building apps for microsoft teams - aossg
Building apps for microsoft teams - aossgBuilding apps for microsoft teams - aossg
Building apps for microsoft teams - aossgJenkins NS
 
Bot & AI - A Bot for Productivity
Bot & AI - A Bot for ProductivityBot & AI - A Bot for Productivity
Bot & AI - A Bot for ProductivityMarvin Heng
 
Bot-Tender: A Chat Bot Walks into a Bar - TechBash 2017
Bot-Tender: A Chat Bot Walks into a Bar - TechBash 2017Bot-Tender: A Chat Bot Walks into a Bar - TechBash 2017
Bot-Tender: A Chat Bot Walks into a Bar - TechBash 2017Eran Stiller
 
Introduction to BOT Framework- Global Azure Bootcamp 2017
Introduction to BOT Framework- Global Azure Bootcamp 2017Introduction to BOT Framework- Global Azure Bootcamp 2017
Introduction to BOT Framework- Global Azure Bootcamp 2017Jalpesh Vadgama
 
Da 0 all'AI conversazionale usando Microsoft Azure
Da 0 all'AI conversazionale usando Microsoft AzureDa 0 all'AI conversazionale usando Microsoft Azure
Da 0 all'AI conversazionale usando Microsoft AzureMarco Parenzan
 
Building a chat app with windows azure mobile
Building a chat app with windows azure mobileBuilding a chat app with windows azure mobile
Building a chat app with windows azure mobileFlavius-Radu Demian
 

Similar to Breaking into Bots (20)

Azure Bot Services - Malaysia
Azure Bot Services - MalaysiaAzure Bot Services - Malaysia
Azure Bot Services - Malaysia
 
Microsoft Bot Framework (Node.js Edition)
Microsoft Bot Framework (Node.js Edition)Microsoft Bot Framework (Node.js Edition)
Microsoft Bot Framework (Node.js Edition)
 
#BeBot Meetup - Chatbots & LUIS by Nick Trogh (Microsoft)
#BeBot Meetup - Chatbots & LUIS by Nick Trogh (Microsoft)#BeBot Meetup - Chatbots & LUIS by Nick Trogh (Microsoft)
#BeBot Meetup - Chatbots & LUIS by Nick Trogh (Microsoft)
 
ESPC Teams week Microsoft Teams & Bot Framework – a Developer’s Perspective
ESPC Teams week Microsoft Teams & Bot Framework – a Developer’s PerspectiveESPC Teams week Microsoft Teams & Bot Framework – a Developer’s Perspective
ESPC Teams week Microsoft Teams & Bot Framework – a Developer’s Perspective
 
[2019 Serverless Summit] Building Serverless Slack Chatbot on IBM Cloud Func...
 [2019 Serverless Summit] Building Serverless Slack Chatbot on IBM Cloud Func... [2019 Serverless Summit] Building Serverless Slack Chatbot on IBM Cloud Func...
[2019 Serverless Summit] Building Serverless Slack Chatbot on IBM Cloud Func...
 
Build an Intelligent Bot
Build an Intelligent BotBuild an Intelligent Bot
Build an Intelligent Bot
 
Global office 365 developer bootcamp Slovenia 2018
Global office 365 developer bootcamp Slovenia 2018Global office 365 developer bootcamp Slovenia 2018
Global office 365 developer bootcamp Slovenia 2018
 
Microsoft teams & bot framework - A developer's perspective
Microsoft teams & bot framework - A developer's perspectiveMicrosoft teams & bot framework - A developer's perspective
Microsoft teams & bot framework - A developer's perspective
 
Build a great conversationalist using Azure Bot Service 2018
Build a great conversationalist using Azure Bot Service 2018Build a great conversationalist using Azure Bot Service 2018
Build a great conversationalist using Azure Bot Service 2018
 
Chatbots - A CMD for Humans (Ort Braude 2018)
Chatbots - A CMD for Humans (Ort Braude 2018)Chatbots - A CMD for Humans (Ort Braude 2018)
Chatbots - A CMD for Humans (Ort Braude 2018)
 
20160930 bot framework workshop
20160930 bot framework workshop20160930 bot framework workshop
20160930 bot framework workshop
 
Azure Bot Framework
Azure Bot FrameworkAzure Bot Framework
Azure Bot Framework
 
Webinar - Building a ChatBot using IBM Watson Conversation Service
Webinar - Building a ChatBot using IBM Watson Conversation ServiceWebinar - Building a ChatBot using IBM Watson Conversation Service
Webinar - Building a ChatBot using IBM Watson Conversation Service
 
Cross Platform Mobile App Development - An Introduction to Sencha Touch
Cross Platform Mobile App Development - An Introduction to Sencha TouchCross Platform Mobile App Development - An Introduction to Sencha Touch
Cross Platform Mobile App Development - An Introduction to Sencha Touch
 
Building apps for microsoft teams - aossg
Building apps for microsoft teams - aossgBuilding apps for microsoft teams - aossg
Building apps for microsoft teams - aossg
 
Bot & AI - A Bot for Productivity
Bot & AI - A Bot for ProductivityBot & AI - A Bot for Productivity
Bot & AI - A Bot for Productivity
 
Bot-Tender: A Chat Bot Walks into a Bar - TechBash 2017
Bot-Tender: A Chat Bot Walks into a Bar - TechBash 2017Bot-Tender: A Chat Bot Walks into a Bar - TechBash 2017
Bot-Tender: A Chat Bot Walks into a Bar - TechBash 2017
 
Introduction to BOT Framework- Global Azure Bootcamp 2017
Introduction to BOT Framework- Global Azure Bootcamp 2017Introduction to BOT Framework- Global Azure Bootcamp 2017
Introduction to BOT Framework- Global Azure Bootcamp 2017
 
Da 0 all'AI conversazionale usando Microsoft Azure
Da 0 all'AI conversazionale usando Microsoft AzureDa 0 all'AI conversazionale usando Microsoft Azure
Da 0 all'AI conversazionale usando Microsoft Azure
 
Building a chat app with windows azure mobile
Building a chat app with windows azure mobileBuilding a chat app with windows azure mobile
Building a chat app with windows azure mobile
 

More from Sarah Sexton

HoloLens Unity Build Pipelines on Azure DevOps
HoloLens Unity Build Pipelines on Azure DevOpsHoloLens Unity Build Pipelines on Azure DevOps
HoloLens Unity Build Pipelines on Azure DevOpsSarah Sexton
 
A Whirlwind Tour of Recurrent Neural Networks
A Whirlwind Tour of Recurrent Neural NetworksA Whirlwind Tour of Recurrent Neural Networks
A Whirlwind Tour of Recurrent Neural NetworksSarah Sexton
 
Recurrent Neural Networks (RNN)
Recurrent Neural Networks (RNN)Recurrent Neural Networks (RNN)
Recurrent Neural Networks (RNN)Sarah Sexton
 
Developing for Consoles as an Indie in 2018
Developing for Consoles as an Indie in 2018Developing for Consoles as an Indie in 2018
Developing for Consoles as an Indie in 2018Sarah Sexton
 
Implementing LUIS in Node.js
Implementing LUIS in Node.jsImplementing LUIS in Node.js
Implementing LUIS in Node.jsSarah Sexton
 
Code camp HoloLens Build and Deploy
Code camp HoloLens Build and DeployCode camp HoloLens Build and Deploy
Code camp HoloLens Build and DeploySarah Sexton
 
How to Build and Deploy to HoloLens
How to Build and Deploy to HoloLensHow to Build and Deploy to HoloLens
How to Build and Deploy to HoloLensSarah Sexton
 
Getting Started with Microsoft Bot Framework
Getting Started with Microsoft Bot FrameworkGetting Started with Microsoft Bot Framework
Getting Started with Microsoft Bot FrameworkSarah Sexton
 
Word Play in the Digital Age: Building Text Bots with Tracery
Word Play in the Digital Age: Building Text Bots with TraceryWord Play in the Digital Age: Building Text Bots with Tracery
Word Play in the Digital Age: Building Text Bots with TracerySarah Sexton
 
Video game development for everybody
Video game development for everybodyVideo game development for everybody
Video game development for everybodySarah Sexton
 
Introduction to Unity3D and Building your First Game
Introduction to Unity3D and Building your First GameIntroduction to Unity3D and Building your First Game
Introduction to Unity3D and Building your First GameSarah Sexton
 
Building Your First Node.js App and Publishing to Azure
Building Your First Node.js App and Publishing to AzureBuilding Your First Node.js App and Publishing to Azure
Building Your First Node.js App and Publishing to AzureSarah Sexton
 
New High Score! Leaderboards in the Cloud
New High Score! Leaderboards in the CloudNew High Score! Leaderboards in the Cloud
New High Score! Leaderboards in the CloudSarah Sexton
 
Developing for Consoles as an Indie in 2015
Developing for Consoles as an Indie in 2015Developing for Consoles as an Indie in 2015
Developing for Consoles as an Indie in 2015Sarah Sexton
 

More from Sarah Sexton (15)

HoloLens Unity Build Pipelines on Azure DevOps
HoloLens Unity Build Pipelines on Azure DevOpsHoloLens Unity Build Pipelines on Azure DevOps
HoloLens Unity Build Pipelines on Azure DevOps
 
A Whirlwind Tour of Recurrent Neural Networks
A Whirlwind Tour of Recurrent Neural NetworksA Whirlwind Tour of Recurrent Neural Networks
A Whirlwind Tour of Recurrent Neural Networks
 
Recurrent Neural Networks (RNN)
Recurrent Neural Networks (RNN)Recurrent Neural Networks (RNN)
Recurrent Neural Networks (RNN)
 
Developing for Consoles as an Indie in 2018
Developing for Consoles as an Indie in 2018Developing for Consoles as an Indie in 2018
Developing for Consoles as an Indie in 2018
 
Implementing LUIS in Node.js
Implementing LUIS in Node.jsImplementing LUIS in Node.js
Implementing LUIS in Node.js
 
Mixed Reality
Mixed RealityMixed Reality
Mixed Reality
 
Code camp HoloLens Build and Deploy
Code camp HoloLens Build and DeployCode camp HoloLens Build and Deploy
Code camp HoloLens Build and Deploy
 
How to Build and Deploy to HoloLens
How to Build and Deploy to HoloLensHow to Build and Deploy to HoloLens
How to Build and Deploy to HoloLens
 
Getting Started with Microsoft Bot Framework
Getting Started with Microsoft Bot FrameworkGetting Started with Microsoft Bot Framework
Getting Started with Microsoft Bot Framework
 
Word Play in the Digital Age: Building Text Bots with Tracery
Word Play in the Digital Age: Building Text Bots with TraceryWord Play in the Digital Age: Building Text Bots with Tracery
Word Play in the Digital Age: Building Text Bots with Tracery
 
Video game development for everybody
Video game development for everybodyVideo game development for everybody
Video game development for everybody
 
Introduction to Unity3D and Building your First Game
Introduction to Unity3D and Building your First GameIntroduction to Unity3D and Building your First Game
Introduction to Unity3D and Building your First Game
 
Building Your First Node.js App and Publishing to Azure
Building Your First Node.js App and Publishing to AzureBuilding Your First Node.js App and Publishing to Azure
Building Your First Node.js App and Publishing to Azure
 
New High Score! Leaderboards in the Cloud
New High Score! Leaderboards in the CloudNew High Score! Leaderboards in the Cloud
New High Score! Leaderboards in the Cloud
 
Developing for Consoles as an Indie in 2015
Developing for Consoles as an Indie in 2015Developing for Consoles as an Indie in 2015
Developing for Consoles as an Indie in 2015
 

Recently uploaded

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 

Recently uploaded (20)

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

Breaking into Bots

  • 1.
  • 3. What Can Bots Do? @Saelia
  • 4. Microsoft Knowledge Cloud Tap into vast information, facts & actions on people, places and things from the web or your circle Microsoft Bot Framework Build your own conversational agents, and connect them wherever your users are talking Microsoft Cognitive Services Give smarts to your experiences with cutting-edge technologies for speech, vision, language and knowledge understanding Build and deploy your web service with Azure’s industry-leading Platform-as-a-Service (PaaS) cloud infrastructure. Microsoft Bot Distribution Channels (Bing, Skype, Cortana/Win10, and third party clients like Slack, Kik, and Messenger) Conversations as a Platform Technologies Microsoft Azure
  • 5. Chat bots Bots / Chat bots are conversational interfaces They have a human-like online presence A bot resides in a messaging application as a contact
  • 6.
  • 10.
  • 12.
  • 13.
  • 14. 1. Find your endpoint URL on Azure 2. Register Your Bot 3. Save App ID and App Password @Saelia
  • 16.
  • 17. Web App Settings: 2. MICROSOFT_APP_PASSWORD
  • 20. var restify = require('restify'); var builder = require('botbuilder'); //========================================================= // Bot Setup //========================================================= // Setup Restify Server var server = restify.createServer(); server.listen(process.env.port || process.env.PORT || 3978, function () { console.log('%s listening to %s', server.name, server.url); }); // Create chat bot var connector = new builder.ChatConnector({ appId: <Your App ID> appPassword: <Your App Secret> }); var bot = new builder.UniversalBot(connector); server.post('/api/messages', connector.listen());
  • 21.
  • 22. bot.dialog('/', function (session) { session.send("Hello World"); });
  • 23. The IntentDialog class lets you listen for the user to say a specific keyword or phrase. bot.dialog('/study', new builder.IntentDialog() .matches(/^ready/i, [ function (session) { session.send(quiz.Terms[index]) }]) .matches(/^flip/i, [ function(session) { session. send(quiz.Def[index]) }] ) …........... );
  • 24. Session object is passed to your dialog handlers any time your bot receives a message from the user. The session object is the primary mechanism used to manage messages received from and sent to the user. bot.dialog('/', function (session) { session.send("Hello! Welcome to the MHacks Quiz Bot. Would you like to study today?") session.beginDialog('/user'); }); @Saelia
  • 25. bot.dialog('/subject', [ function (session) { setTimeout(function(){ builder.Prompts.text(session, "What study set would you like today?" + quiz.Sets); }, 2000) }, function (session, results) { quiz.GetTerms(results.response); session.send("Ok! I got your flashcards! Send 'ready' to begin. Send 'flip' for definition. Send 'next' for the next card. Send 'exit' when you are done") session.beginDialog('/study') }] );
  • 26. Different return types of prompts available: builder.Prompts.text(session, "What's your name?"); builder.Prompts.number(session, "How many do you want?"); builder.Prompts.time(session, "When is your appointment?"); builder.Prompts.choice(session, "Which color?", "red|green|blue");
  • 27. bot.dialog('/subject', [ function (session) { setTimeout(function(){ builder.Prompts.text(session, "What study set would you like today?" + quiz.Sets); }, 2000) }, function (session, results) { quiz.GetTerms(results.response); session.send("Ok! I got your flashcards! Send 'ready' to begin. Send 'flip' for definition. Send 'next' for the next card. Send 'exit' when you are done") session.beginDialog('/study') }] );
  • 33.
  • 34.
  • 35. { “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 } ] }
  • 36. I want to use Microsoft technology to hack and win a Surface Pro 4 sponsor action prize @Saelia
  • 37.
  • 39. Sarah Sexton Technical Evangelist US DX Audience | Microsoft, Chicago @Saelia • Steps: http://aka.ms/MHacksChatBot • Demo: MicrosoftCareerBot.azurewebsites.net • GitHub.com/jennifermarsman/MicrosoftCareerBot • Slides: http://aka.ms/BreakingIntoBots • Docs: http://dev.botframework.com

Editor's Notes

  1. For those of you who don't know me, I'm Sarah Sexton, Microsoft Technical Evangelist, Indie Game Developer, blogger, and co-founder of the Voxelles: Chicago’s Women in Game Development. I also work extensively with Azure | Xamarin | Microsoft Bot Framework | HoloLens | UWP | Unity
  2. Bots can do a lot.
  3. You can think of bots or chat bots as conversational interfaces that are programmed to interact with humans in a life-like manner. Bots also have a human-like online presence as they are assigned their own name and profile.
  4. Bots reside in messaging applications and interact with the user to answer questions, give relevant results, fetch information from different sources and even entertain. For many users, the human-like responses that bots give is the number one reason that they prefer bots over apps nowadays.
  5. The Hackathon Story
  6. We want to #empower every developer to spice up any hackathon with the Microsoft Bot Framework. Add a conversational platform to any application you are building to take your project to the next level. They can be built for almost anything to help automate and create a more natural human interaction for everyday tasks. Join me in learning how to code a chat bot that helps you rock it at hackathons!
  7. My coworkers Kevin and Gabby created a flashcards bot using something called the Quizlet API! Th idea behind that bot was, if you are on the go, but would still like to study up on something, you could use this bot to study your Quizlet flashcards any time, any where.
  8. Prerequisites 1. You are going to need an Azure account. 2. Node.js 3. Quizlet Developer Account
  9. Once you have created your Azure account, it is time to create a web application for the Chat Bot to run on. This is where the endpoints for communication with your bot are created.
  10. Once your Web App is created and available in the 'All Resources' menu, go to your Web Apps Overview section and find the URL. Save that URL somewhere because it will come in handy later.
  11. After your web app has been created, you will need to register your bot on the bot framework site.
  12. Generate your Microsoft App Id and Password by pressing the 'Create Microsoft App ID and password.' Your App ID will automatically populate and you need to save your App password somewhere separately, because it will be hidden, until you regenerate a new one.
  13. Lastly, you will need to add your APP ID and APP PASSWORD to your Azure settings. Go back to your web app overview, and in the task panel, go down to Application Settings. Scroll down to the Application Settings section and fill in your APP ID and APP PASSWORD. The Key column should state MICROSOFT_APP_ID and the value is the App ID you got from Bot registration. For the App Password, the Key is MICROSOFT_APP_PASSWORD and the value is the App Password you got from Bot registration.
  14. First, create a new directory! In the working directory, you will need to initialize it as a Node project with “npm init”, then download the proper node modules with “npm install”.
  15. Create an app.js file in your directory, as seen here. You will also want to create another .js file that will communicate with the Quizlet API. (In this repository, the file is called api.js) In your app.js file you will need the following required code just to properly set up your bot: [slide] This is just the bare bones of the bot.
  16. Dialogs are used to manage the bot’s conversation with a user. They are called upon the same way a website calls on a webpage, via routing. '/' is the root dialog -- which is the first thing the bot will say when the user calls upon it. '/test' is a dialog named test. Let’s break down some components of this dialog.
  17. So what if you want to know how the user responds to a question, but you don’t need access to the answer data? There are Intents! The IntentDialog class lets you listen for the user to say a specific keyword or phrase. Once a user sends a response, you can see if their response "matches" certain words/phrases:
  18. Looking at this code, you see that the dialog starts with the root function; simply asking the user if they would actually run to the program. In every dialog, you see a parameter named session. The session object is passed to your dialog handlers anytime your bot receives a message from the user. The session object is the primary mechanism you’ll use to manage messages received from and sent to the user.
  19. In the '/subject' dialog, the user is prompted for what flashcard set they would like to study. Once they choose, GetTerms is called based on their decision and then the bot will go to the '/study' dialog. In the '/study' dialog, the act of looking at terms, "flipping" the card for the definition, moving to the next card and possibly exiting early is possible. Waterfalls are seen in several of the dialogs seen above. Waterfalls are used to let you collect input from the user using a sequence of steps. 
  20. In the '/subject' dialog, the user is prompted for what flashcard set they would like to study. Once they choose, GetTerms is called based on their decision and then the bot will go to the '/study' dialog. In the '/study' dialog, the act of looking at terms, "flipping" the card for the definition, moving to the next card and possibly exiting early is possible. Waterfalls are seen in several of the dialogs seen above. Waterfalls are used to let you collect input from the user using a sequence of steps. 
  21. Many dialogs will have several functions inside of them in which one function will be called after the other. Most waterfalls work by prompting the user for information in one function, passing the answer to the next function, then manipulating the answer received. All your parentheses, curly braces, and brackets have to properly enclose each route and their functions.
  22. THERE ARE TWO WAYS THAT BOTS WORK UNDER THE HOOD They either use ARTIFICIAL INTELLIGENCE, PRIMARILY NATURAL LANGUAGE PROCESSING to function and RULE-BASED BOTS. First let’s go through how RULE-BASED BOTS work. Rule based bots work by offering you multiple choice options. The answers are categorized in the bot and depending on that it helps you. They do not understand language and get stuck if you give an answer that is not part of their repository.  NOW LET’S TALK ABOUT AI-BASED BOTS. AI BASED BOTS ARE SMARTER AND MORE INTELLIGENT THAN RULE BASED BOTS. THEY UNDERSTAND THE CONTEXT AND INTENT OF USER. The artificial intelligence bots in the market today actually use a subset of AI, called natural language processing (NLP). But they get involved in the conversation and pick up keywords and phrases from the user’s requirement instead of searching for specific answers. Results are provided according to the mapping methods taught to these bots. AN AI-BASED BOT WOULD NOT GET STUCK IF THE USER RESPONDED WITH ‘YA’ INSTEAD OF ‘YES,’ UNLIKE A RULE-BASED BOT.
  23. If you want to learn more about the chat bots we’ve talked about here today, clone my GitHub repository at the URL above!