NLU

Natural Language Understanding

What is NLU?

Natural Language Understanding, or NLU for short, is the process by which a computer system e.g. a chat bot is able to "understand" what is intended by a human input phrase. The best way to understand NLU is by example:

User input: Where is the nearest parking lot?

NLU result:

{
  "intent": "parking_search",
  "confidence": 0.87,
  "entities": null
}

From the above example you can see that the NLU system understood the input phrase to mean that the user is looking for parking i.e. the parking_search intent, and it is 87% confident in this classification.

A typical NLU system would also be able to extract certain data, or "entities", from input phrases that the chat bot system would be able to use as more structured data. Again, an example would work best:

User input: I drive a 2010 Toyota RAV

NLU result:

{
  "intent": "car_model",
  "confidence": 0.88,
  "entities": {
    "year": 2010,
    "model": "Toyota RAV"
  }
}

From the above example you can see that the NLU system managed to extract the year and model from the input phrase in addition to classifying the intent.

In a general sense, you can view NLU as a method of extracting structured data from unstructured input oriented around natural human language.

As you can see, NLU is a very important component to building a chat bot that interacts with human users, where NLU allows the chat bot to understand the user's intent and then start a specific work flow for that intent.

Meya + NLU

The Meya platform does not prescribe any particular NLU system, but rather allows you to easily integrate best-in-class NLU providers with your Meya app.

Meya supports the following NLU providers:

NLU vs Quick Replies

Some chat bot platforms with built-in NLU often require you to use NLU at every flow step to process user input. This often leads to a lot of NLU training, instead we always recommend conversational designers to use a combination of NLU and buttons/quick replies to guide the user through flows.

NLU is great for handling broader and open ended phrases (these phrases typically occur at the start of a conversation when the user is requesting help/support) and then classifying an intent. Once you've classified the intent, we recommend creating flows that use richer UI components to navigate the user through the flow and to capture specific information.

Here is an example flow that uses NLU to trigger the flow, but then uses quick replies to navigate the user through the flow:

triggers:
  - expect: dialogflow
    integration: integration.dialogflow
    intent: reset_password

steps:
  - say: Is this for your own account, or are you the system admin?
    quick_replies:
      - text: My own account
        action: next
      - text: I'm the admin
        # Transfer to the admin reset flow
        action:  
        	flow: flow.admin.reset_password
          transfer: true
  
  - say: Go to the [forgot password page](https://example.com/forgot-password)
  - typing: on
  - delay: 2
  - say: Enter your email address, and click `Reset Password`
  - say: They system will send you an email containing a password reset link.
  - say: Did your receive the email?
    quick_replies:
      - text: Yes
        action:
          jump: reset
      - text: No
        action:
          jump: spam
  
  # Reset instructions and track CSAT
  - (reset)
  - say: Fill in the password reset form.
  - say: Make sure it's a strong password!
  - flow: flow.csat
  - end
  
  # Might be in spam
  - (spam)
  - say: Check your spam for the email.
  - say: Did you find it?
    quick_replies:
      - text: Yes
        action:
          jump: reset
      - text: No
        # Let's check if the user has an account
        action:
          flow: flow.account.check
   - end