Upgrade to Pro — share decks privately, control downloads, hide ads and more …

A gentle introduction on Building an intelligen...

Pycon ZA
October 11, 2019

A gentle introduction on Building an intelligent Chatbot in Python by Paulus Shituna

Chatbots have the potential to save any individual’s time, hassle, and tedium by automating mundane tasks. Today almost every company has a chatbot deployed to engage with the users. Some of the ways in which companies are using chatbots are: Information distribution & customers support. So In this talk, I am going to take you through step-by-step on how to develop a chatbot in python; by exploring some of the its attributes, Classes, Reflections, Instances, API integrations, database, Dictionaries and interfaces. Since this will be purely introduction talk, I expect the audiences to be intermediate and beginners.

Pycon ZA

October 11, 2019
Tweet

More Decks by Pycon ZA

Other Decks in Programming

Transcript

  1. Paulus Shituna PyCon Namibia University of Namibia Adviser: Prof Rodriguez

    Puente A gentle introduction on Building an intelligent Chatbot in Python
  2. Chabbot (chatterbot) Is a computer program that attempts to simulate

    the conversation or “chatter” of a human being via text or voice interactions. Basically, it receives the command from the user and responds back in a satisfactory way to the user. 24-hour a day availability at reduced costs Compatibility with all devices, including mobile, social networks, and even SMS
  3. Chatbot Usages Many sectors like E-commerce, Education, Finances, HR, Healthcare

    each and every place where there is a need for certain information to be responded back or certain action to be taken based on simple text or voice query by the user. Chatbots Market worth 3,172.0 Million USD by 2021 which will only increase based on the NLP improvements and the AI improvements. Chatbots expected to cut business costs by $8 billion by 2022.
  4. Types of Chatbots There are to types of bots 1.

    Rule-Based Chatbots 2. AI-Based Chatbots
  5. Rule-Based Chatbots provided with a list of set answers for

    a set of queries a user might use the chatbot for. The bots can handle simple queries but fail to manage complex ones.
  6. AI-Based Chatbots uses some heuristic to select a response from

    a library of predefined responses. This makes them more intelligent as they take word by word from the query and generates the answers.
  7. AIML-(Rule-Based Chatbots) A.L.I.C.E., or Artificial Linguistic Internet Computer Entity, was

    the first example of a bot created using AIML. AIML is an XML based markup language meant to create artificial intelligent applications. AIML makes it possible to create human interfaces while keeping the implementation simple to program, easy to understand and highly maintainable.
  8. Basic Tags: There are around 14 tags that we normally

    use in AIML. 1. <aiml>: Defines the beginning and end of an AIML document 2. <category>: Defines the knowledge in a knowledge base. 3. <pattern>: Defines the pattern to match what a user may input. 4. <template>: Defines the response of an to user’s input.
  9. More Tags: 1. <star>: Used to match wildcard * character(s)

    in the <pattern> Tag. 2. <srai>: Multipurpose tag, used to call/match the other categories. 3. <random>: Used <random> to get random responses. 4. <li>: Used to represent multiple responses. 5. <set>: Used to set value in an AIML variable. 6. <get>: Used to get value stored in an AIML variable. 7. <that>: Used to respond based on the context. 8. <topic>: Used to store a context so that later conversation can be done based on that context. 9. <think>: Used to store a variable without notifying the user. 10. <condition>: Similar to switch statements in a programming language. It helps bot to respond to match the input.
  10. Random responses in AIML file: Responds randomly when it receives

    a message that starts with “One time I “. The * is a wildcard that matches anything.