Boost your Bot's IQ

Boost your Bot's IQ

The talk is about how to add intelligence to the bot using Language Understanding Service (LUIS), Microsoft Bot Framework - NodeJS and Azure Services.

https://github.com/ksivamuthu/boost-bots-iq

- Introduction - Components of the chat-bot framework

- Bot Builder SDK for NodeJS - Closer look on the Microsoft's Bot Builder SDK for NodeJS by walking through Dialogs, Actions and State Data management

- Designing conversational flow - Managing conversation flow is an essential task in building bots. How a bot is able to perform core tasks elegantly and handle interruptions gracefully.

- Add Intelligence to Bot - How to train LUIS models and add intelligence to Bot

- Demo - Chatbot that demonstrates the conversational flow and LUIS Language processing.

F90901a95c7fbb99b541e8189838cf43?s=128

Sivamuthu Kumar

June 14, 2018
Tweet

Transcript

  1. 3.

    HELLO! I am Sivamuthu Kumar - Working as Architect in

    Computer Enterprises Inc - I am here to connect with you all. - You can reach me on @ksivamuthu
  2. 4.

    HELLO! I am Raksha - A Bot Guru - Co-presenter

    of this session - Enlighten dumb bots and help them transformed into smarter bots
  3. 5.

    Why Chatbot? ❏ People have a deep affection for intelligent

    conversation. ❏ Chatbot can help to bring brands to the user in user’s favorite messaging app / channel. @ksivamuthu
  4. 6.

    What is Chatbot? ❏ A chat robot , a computer

    program that simulates human conversation, or chat, through artificial intelligence. ❏ It can be used to get things done or for fun. @ksivamuthu
  5. 8.

    User chats with bot Contextual Analysis by AI Real-time response,

    Personalized Interactions @ksivamuthu How does it work?
  6. 9.

    @ksivamuthu Chatbot Architecture NLP - Natural Language Processing NLU -

    Natural Language Understanding NLG - Natural Language Generation
  7. 11.

    - Tools and services to build great bots that are

    conversing with the user - Open source SDK in Javascript (NodeJS), C# - Chat emulator Bot Builder - Connects your bots to text / sms, Skype, Slack, Facebook Messenger, O365, Direct Line in app etc. - Fast scalable message routing Developer Portal - Parse natural language using LUIS. - Cognitive Services enable your bot to see, hear, and interpret in more human ways Cognitive Services @ksivamuthu Microsoft Bot Framework
  8. 13.

    Tools for Development ❏ NodeJS ❏ VSCode - VSCode can

    do anything. ❏ Azure Functions for Visual Studio Code - Create, debug, manage, and deploy Azure Functions directly from VS Code ❏ Azure Functions Pack - Package Azure Functions for optimization. @ksivamuthu
  9. 15.

    Bot Framework Emulator ❏ Debug bots running on localhost ❏

    Remote debugging (ngrok) ❏ Message Inspector ❏ Bot Transcripts ❏ Inspect Language Services ❏ Speech Recognition ❏ Manage Bot Resources @ksivamuthu
  10. 19.

    Key Concepts ❏ Chat Interface ❏ Context or Memory of

    a Bot ❏ Loops, Splits and Recursion ❏ Integration with Legacy systems ❏ Handoff ❏ Character, Persona ❏ NLP Component @ksivamuthu
  11. 21.

    Conversation Flow - Waterfall ❏ Collect information from the user

    or guide the user through a sequence of tasks in waterfall dialog. ❏ The tasks are implemented as an array of functions where the results of the first function are passed as input into the next function, and so on. ❏ Handle interruptions and gracefully switch the context @ksivamuthu
  12. 24.

    Prompts @ksivamuthu Prompt type Description Prompts.text Asks the user to

    enter a string of text. Prompts.confirm Asks the user to confirm an action. Prompts.number Asks the user to enter a number. Prompts.time Asks the user for a time or date/time. Prompts.choice Asks the user to choose from a list of options. Prompts.attachment Asks the user to upload a picture or video.
  13. 27.

    State Data @ksivamuthu The Bot Builder Framework enables your bot

    to store and retrieve state data that is associated with a user, a conversation, or a specific user within the context of a specific conversation. Development / Testing: - In Memory Data Storage Production: - Manage State data with Cosmos DB - Manage State data with Table Storage
  14. 28.

    State Data @ksivamuthu Storage Containers Scoped to Description userData User

    Data that is saved for user on the specified channel privateConversation Data Conversation Data that is saved for user within the context of particular conversation on the specified channel conversationData Conversation Data that is saved in the context of particular conversation on the specified channel dialogData Dialog Data that is saved for the current dialog only. The property is cleared when the dialog is removed from stack.
  15. 32.

    LUIS - Overview • Language Understanding Intelligent Service (LUIS) is

    NLP as a service • NLP is a mechanism to extract the intention (Intent) and relevant information (Entity) from user input. • Using machine learning, LUIS allows developers to build applications which receives user input (Utterances) in a natural language and parses to find what action (Intent) needs to be performed with supplied parameters (Entity). @ksivamuthu
  16. 34.

    Anatomy of an intent Are there any Chinese restaurants within

    3 miles from my house that is open now ? Entities Values Cuisine Chinese Distance 3 miles Reference My house Condition Open now @ksivamuthu Intent - Restaurants.Search
  17. 37.

    Make UX a Top Priority ❏ Does the bot easily

    solve the user’s problem with the minimum number of steps? ❏ Does the bot solve the user’s problem better/easier/faster than any of the alternative experiences? ❏ Does the bot run on the devices and platforms the user cares about? ❏ Is the bot discoverable? Do the users naturally know what to do when using it? @ksivamuthu
  18. 41.

    Application Insights ❏ Add the instrumentation Key to the Bot

    ❏ Instrument the code using App Insights ❏ Track dialog flows and custom events ❏ Application Insights - Dashboard @ksivamuthu
  19. 44.

    Knowledge Search Language Cognitive Services Vision Speech Computer Vision Face

    Emotion Content Moderator Video Video Indexer Cognitive Vision Text Analytics Bing Spell Check LUIS Translator Text Content Moderator Speech to Text Text to Speech Speaker Recognition Speech Translation Bing Web Search Bing Custom Search Bing Video Search Bing Image Search Bing Visual Search Bing Entity Search Bing News Search Bing Autosuggest QnA maker Recommendations @ksivamuthu
  20. 45.

    Links ★ Microsoft Bot Framework Docs https://docs.microsoft.com/en-us/azure/bot-service ★ Bot Builder

    SDK https://github.com/Microsoft/BotBuilder ★ Boost your Bot’s IQ - Demo https://github.com/ksivamuthu/boost-bots-iq ★ Boost your Bot’s IQ - Slides http://siva.shortcm.li/oaVaJo @ksivamuthu