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".
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.
Sample Tree Structure
Getting Hands-on
Create an NLP Integration Node
Head to the part of a tree where you want to add the NLP capability.
Create a tree node and name it as "NLP Integration". This node is for WOZTELL to pass the user input to the NLP engine.
Create a pre-defined Any Text trigger, so that all textual input from the user will be captured.
- 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.
- 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.
Create a Tree Node with Intent Trigger
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.
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).
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.
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.).
Check and see if you can produce the expected outcome.