Skip to main content

Apply NLP to your Chatbot

In this section, you will be able to apply the NLP (Natural Language Processing) capability to your chatbot flow (Please make sure you have already mastered the procedure for building a basic chatbot of Facebook or WhatsApp).

Before you start the implementation, please check if your NLP engine has been integrated to WOZTELL. WOZTELL currently supports the integration of Google Dialogflow & Microsoft LUIS.

tip

You should also study the NLP training documentation of the corresponding platform before you integrate with the WOZTELL Bot Builder.

What is your result?

When being presented with a Yes/No question by a chatbot, the most straightforward option is to answer Yes/No (trigger a button payload or a text payload with the keyword "Yes" or "No".

Yes/No Question
Yes/No Question

In the case that you have matched your NLP intent with a proper response, user can input anything beyond Yes/No. The trigger with the matching NLP intent will trigger the chatbot to repond appropriately.

NLP Example
NLP Example

Sample Tree Structure

NLP Sample Tree Structure
NLP Sample Tree Structure

Getting Hands-on

Create an NLP Integration Node

  1. Head to the part of a tree where you want to add the NLP capability.

  2. Create a tree node and name it as "NLP Integration". This node is for WOZTELL to pass the user input to the NLP engine.

  3. Create a pre-defined Any Text trigger, so that all textual input from the user will be captured.

  1. Toggle on "NLP". Follow the steps below to set up this part:
  • Select Google Dialogflow or LUIS for "Platform".
  • Select the connected Dialogflow agent or LUIS App Name from Integration dropdown.
  • Select a Locale with your trained intent (E.g. en, zh-hk, etc).

You should have these information in the integrations you created for Google Dialogflow or LUIS.

Trigger & NLP Settings
Trigger & NLP Settings
  1. For LUIS v3.0, the options "Get all intents" and "Log and export for training" are available in the NLP settings. Users can either ignore or select one of the two options.
LUIS v3.0 NLP Settings
LUIS v3.0 NLP Settings

Create a Tree Node with Intent Trigger

  1. Create a tree node and name it as with the intent name. This node is for WOZTELL to match the intent received from the NLP engine and then give out an appropriate response.

  2. You may create your NLP Trigger according to which engine you are using in the "NLP Integration" tree node.

For Google Dialogflow, please create the trigger under Dialogflow in the Basic tab. You can set it up with the following steps:

  • Select the connected Dialogflow agent from Integration dropdown.
  • Select a Locale with your trained intent (E.g. en, zh-hk, etc).
  • Select the specific Intent as trigger (the intent is โ€œCat Loverโ€ in the below example).
Google Dialogflow Trigger
Google Dialogflow Trigger

For Luis, please create the trigger under LUIS in the Basic tab. You can set it up with the following steps:

  • Copy and paste the intent name from LUIS console onto the trigger.
Add Trigger & Paste Intent
Add Trigger & Paste Intent
  1. After the NLP trigger has been setup, you can create an appropriate response or redirect to an appropriate tree node containing the response (i.e. Text Response: Great! I love cats too.).

  2. Check and see if you can produce the expected outcome.