Sunday, August 13, 2017

How can I build an intelligent chat bot?


Here is a Look at the 2 NLP vs Machine Learning:
  1. NLP/NLU: Natural Language Processing (NLP) and Natural Language Understanding (NLU) attempt to solve the problem by parsing language into entities, intents and a few other categories. Different NLP platforms may have different names however the essence is moreso the same.
    1. Here are categories:
      1. Agents correspond to applications. Once you train and test an agent, you can integrate it with your app or device.
      2. Entities: represent concepts that are often specific to a domain as a way of mapping natural language phrases to canonical phrases that capture their meaning.
      3. Intents represent a mapping between what a user says and what action should be taken by your software.
      4. Actions correspond to the steps your application will take when specific intents are triggered by user inputs. An action may have parameters for specifying detailed information about it.
      5. Contexts are strings that represent the current context of the user expression. This is useful for differentiating phrases which might be vague and have different meaning depending on what was spoken previously.
    2. Here are a few NLP Platforms:
      1. API: Conversational UX Platform for Bots, Apps, Devices, Services,
      2. WIT: Wit - landing ,
      3. LUIS: Language Understanding Intelligent Service (beta)
  2. Machine Learning: The ‘other’ option is to build your own NLP/NLU by using Machine Learning. One of the first things to consider will be the type of model you want to build.
  • Do you prefer Retrieval Based Model or a Generative Model?
RETRIEVAL-BASED VS. GENERATIVE MODELS
Retrieval-based models (easier) use a repository of predefined responses and some kind of heuristic to pick an appropriate response based on the input and context. The heuristic could be as simple as a rule-based expression match, or as complex as an ensemble of Machine Learning classifiers. These systems don’t generate any new text, they just pick a response from a fixed set.
Generative models (harder) don’t rely on pre-defined responses. They generate new responses from scratch. Generative models are typically based on Machine Translation techniques, but instead of translating from one language to another, we “translate” from an input to an output (response).
Open Domain: I can ask a question about any topic… and expect a relevant response. (Harder) Think of a long conversation around refinancing my mortgage where I could ask anything.
Closed Domain: You can ask a limited set of questions on specific topics. (Easier). What is the Weather in Miami?
You will also have to consider things like: Context, Personality, Evaluation Models, etc…
Here is a NLP & Machine Learning Tutorial with Code & Github: Ultimate Guide to Leveraging NLP & Machine Learning for your Chatbot
You can also check out Bot Tools, Templates & Workshops: Chatbot Tools
You can learn more at Chatbots Life & Follow me on Twitter

No comments:

Post a Comment