Make Chatbot Smarter with Wit.ai
Wit.ai is an AI and Natural Language Processing engine provided by Facebook. Using Wit.ai or any Natural Language Processing engine helps your bot adapt much better to free-style inputs from users and provide the correct answers which weren’t taken care of by your flow-based design.
Enable Wit.ai or other NLP integrations to the following Convoboss features:
- Using your NLP entities within connector conditions in the Main Flow Editor
Use Wit.ai in Training
Training is a much more adaptive version of Keyword Training. A well-trained bot can respond to diversified ranges of input by users.
For example, if you train your bot with the keyword "booking", it can (and should) respond to both of the following requests "Can I book a table" and "I need a table" instead of rejecting the later one.
Main flow as a best-case scenario for your bot but your users do not always have to follow a predefined path. They might want to exit the current flow and ask your bot other topics that flash through their minds. By using Keyword, you can train your bot to handle some of the expected topics or casual small talks, thus increasing end-users’ satisfaction with your bot.
Use Wit.ai in Flow Editor
In the Convoboss platform, NLP can be used to increase the flexibility and power of the connectors conditions in the Flow Editor. However, this requires that you already have an already-trained Wit.ai app with predefined Entities and Intents. (See Wit.ai for more information about Entity and Intent).
You can utilize NLP to increase the chance of:
- Matching the right connector between blocks by analyzing the semantics of the whole sentence instead of single words.
- Reading and extracting the necessary information from the sentence.
Wit.ai is an optimal choice to provide your bot this ability through the natural language processing engine.
Integrate Wit.ai to Convoboss
Before activating Wit.ai in Convoboss, you need to enable the integration with an app in your Wit.ai account.
Step 1: Set up Wit.Ai account
1. Access to your Wit.ai account at https://wit.ai/home
2. Select an app and open Settings, then copy the code in the Server Access Token.
Step 2: Connect Convoboss to Wit.Ai
1. Access to your Convoboss account and select a bot
2. Go to Bot Builder > Integrations
3. Enable Wit.ai's integration and fill the copied code above to the Server Access Token (see image).
4. Click on the Save button to save all settings
Congrats! Now you can start using Wit.ai in the Flow Editor and Training.
Use Wit.AI for Training
After building a seamless flow in the Flow Editor, you can make your bot more lively and interactive by adding some randomness or funny questions. Training will support you to improve chat conversations and make your bot smarter.
In the example below, you can train your chatbot on how to respond to customers.
Step 1: Define a Set
Set is a group of bot responses for a specific topic. Think of set like a group of related topics.
In this example, we will create a set "Small Talk", let's open Keyboard in Convoboss editor and click on New set. Then you need to consider "Minimum Confidence" provided by Wit.ai. "Minimum Confidence" is the minimum ratio of confidence for analyzed results.
Step 2: Create a New dialogue
Dialogue is a group of related questions and answers. There are two ways to define the response for a dialog:
Method 1: Using a block and text that the bot will respond to users automatically
Method 2: Writing as many the different types of text responses as possible
Use Wit.ai in the Flow Editor
(Before continuing with this section, we assume that you are already familiar with and have trained content in your Wit.ai app.)
You can start solving the problem: Matching the connector between blocks by analyzing the semantics of the whole sentence instead of single words in the given example:
Sometimes, a part of the flow requires your bot to be able to understand the user’s response, but the designed connector is only able to read a part of the user response and can be misleading. Take a look at the example below:
In this scenario, the bot might trigger the wrong outgoing connector when a user responds with a phrase like "I don’t like any city" due to the condition of the block Smart Response containing the word "city", so the bot will respond incorrectly to a user.
What should we do to change this behavior?
Step 1: Train your chatbot
Firstly, we need to create an entity in the app associated with the bot.
For the example above, we will train entity, "favorite_city", with the value is "live" in response to "I want to live in Danang" phrase.
Step 2: Update the flow
Next, you can apply the trained entity into the flow. Then you can change the connector condition between Question and Smart Response.
After changing the condition, the chatbot will respond with Smart Response when the user's response is similar to the sample answer (the trained sample phrases), which is accompanied by the accurate rate greater than or equal to 50%, provided by Wit.ai.
For more information, please visit the official documentation page: https://wit.ai/docs