Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Breaking into Bots

685 views

Published on

Step into the world of conversational Bots. Taking over platforms one by one, chat bots are becoming the newest applications wanted and needed by enterprises and consumers everyday. This presentation goes step by step on prerequisite tools, building a chat bot, deploying it to the cloud, and how to get it running on different platforms. This is an ideal session for those who are familiar with Node.js and would like to apply it to something new.

Published in: Technology
  • A 7 Time Lotto Winner Stepped Up to Share His Secrets With YOU ♣♣♣ http://t.cn/Airfq84N
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Breaking into Bots

  1. 1. Introduction To Bots
  2. 2. What Can Bots Do? @Saelia
  3. 3. 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
  4. 4. 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
  5. 5. The Story MHacks @Saelia
  6. 6. @Saelia
  7. 7. The Solution Hackathon Bot @Saelia
  8. 8. http://portal.azure.com @Saelia
  9. 9. 1. Find your endpoint URL on Azure 2. Register Your Bot 3. Save App ID and App Password @Saelia
  10. 10. s /api/messages
  11. 11. Web App Settings: 2. MICROSOFT_APP_PASSWORD
  12. 12. Let’s get coding! #BotFramework @Saelia
  13. 13. @Saelia
  14. 14. 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());
  15. 15. bot.dialog('/', function (session) { session.send("Hello World"); });
  16. 16. 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]) }] ) …........... );
  17. 17. 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
  18. 18. 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') }] );
  19. 19. 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");
  20. 20. 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') }] );
  21. 21. @Saelia
  22. 22. Smarter Not Harder! Using LUIS @Saelia
  23. 23. https://www.luis.ai/ Microsoft Cognitive Services @Saelia
  24. 24. Types of Bots
  25. 25. Rule-Based Bots AI-Based Bots (uses NLP)
  26. 26. { “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 } ] }
  27. 27. I want to use Microsoft technology to hack and win a Surface Pro 4 sponsor action prize @Saelia
  28. 28. Demo Time @Saelia
  29. 29. 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

×