Adding NLP in Your Chatbot is Easier!
NLP  -  Nov 12, 2020

New Natural Language Processing Toolset for Instabot

We just released a tool that allows our clients to more easily integrate natural language processing (NLP) within your chatbot. This will allow you to add more robust power to your chatbot. Let’s start with the basics.

What is Natural Language Processing?
Natural language processing, or NLP for short, is a branch of artificial intelligence that helps computers understand what people are saying, interpret the meaning, and respond conversationally similar to a human. We created a whole presentation as to how NLP works and this will be helpful to read before you start reading more. You can see it here.

Why is NLP Useful in Your Chatbot?
Most chatbots start out as a decision tree. This is for a good strategy; it is beneficial for many reasons. Firstly, this allows you to help your users understand what your chatbot can do. Further, it provides useful analytics as to how to better optimize and design your conversation, as well as collect accurate training data for NLP.

NLP allows you to make your chatbot more robust. It can allow your chatbot the ability to understand free text responses. For example if your website visitor types the words, “What is the price?” the chatbot will understand that this person needs information about price for your products and services. This process works because you “train” your bot to understand what those phrases mean.

For example, if my user says, “What’s the price?” “Please provide the price” “Tell me the price”, this all means that they want pricing information. When you combine this with machine learning (so that the bot learns over time) your chatbot can answer hundreds or thousands of variations of questions about particular topics, and is no longer limited by a finite decision tree.

You can see this if you go to our website and ask our bot if it owns a cat. This is a commonly asked question, but not something we include in our decision-tree (as obviously, it’s not something we want to prompt people to ask us about/or inform them on.)

Why is Using NLP Easier Now?

We have added a new Dialogflow bot node. This allows you to easily connect NLP via a free Google Dialogflow account. You’ll be able to integrate Dialogflow in half the time and with no technical resources or help.

Start Using the NLP Node Now!

Sure, let’s set it up. You have 5 quick and easy steps, that should take 5 minutes to connect. Here is a recap and then we’ll go into the detailed steps.

 

StepsforExecuting.png

1.)    CREATE A DIALOGFLOW ACCOUNT + GET YOUR KEY

Create a Dialogflow Account: First, set up a Dialogflow Account.
Go to the URL: https://dialogflow.com/ and sign-up for a free account with a gmail address (this will not cost you anything as long as you use the text-based system).

In the top right of the Menu panel, click on the “Gear Icon” to go “Settings”

 

DF1.png

Within “Settings” Go to “Google Project” and click on the URL next to “Service Account”.

DF2.png

This will open up a page, and you need to mark the checkbox next to the “dialogflow-“ URL, and then tap on the 3 vertical dots which show a menu, and then click, “Create key”

DF4.png

Choose JSON, and tap the “Create” button.

DF5.png

A private key will be downloaded. Please save this on your computer.

2.)    UPLOAD YOUR DIALOGFLOW KEY INTO OUR INSTABOT ACCOUNT

First go to the Integrations page and click on “Dialogflow”.

DF6.png

Then click on the “Upload File”

DF7.png

Once the file has been updated, you will see the name of your key to the left of the Upload button.       Don’t forget to click the “Save Button” in the right hand corner.

DF8.png

 

3)    CREATE A FREE-TEXT BOT NODE + NAME IT “user-question”

Add a Bot Node, and select, “Free Text Reply”.

DF9.png

Type a message for the bot to request the user to input/provide information. (I am typing, “Ask me a question”.)

Click, “Additional Options”, and under “Name this node”, type “user-question”.
For this integration to work properly, it's critically important to name this free-text node in a very specific way. We strongly suggest naming this node "user-question".
If you want to use your own name, 
do not use spaces or dots in your node name, use dashes to separate words in your node-name instead (eg: "ask-visitor-something")

It should look like this:

DF10.png

4.)    ADD A DIALOGFLOW BOT NODE + INSERT REFERENCE TO  “user-question”

Add a Bot Node and Select “Advanced”.

DF11.png

From the “Advanced” Panel, choose, “Dialogflow”

DF12.png

Once you open your Dialogflow, you will see the node open. Simply type the name of the node above it. This references the input of the node question, pushes it through the Dialogflow API, and pushes back a response.

DF13.png

You can then close the bot node, or you can route the conversation based on the response. See more information here.

5)    ADD TRAINING DATA TO DIALOGFLOW

Let’s create a bot that responds to the question, What is your favorite food?. You should ask yourself, what are different way to ask that question…let’s brainstorm:

What is your favorite food?
What is your fave food?
What food do you like best?
What snack is your favorite?
What food you prefer?
Tell me your favorite food!

(Ideally, you should come up with 25+ ways, but let’s just use these as an example.

In your Dialogflow account, go to Intents in the side panel and click the “+” plus sign. Then let’s name that intent, “Favorite Food” and click, “Save”. Next, we’ll add “Training Phrases”

DF14.png

Next, we’ll add the phrases we brainstormed.

DF15.png

Finally, we’ll add a response to the question. Scroll down the page and click, “Add Response” and then write how the bot should respond to these questions. And in the top right, hit the “Save” button.

DF16.png

Now test it in your bot. Ask a question about favorite food, and see how your bot responds.

Test it for yourself here.   Still have questions? Email us at: info@instabot.io

Test it for yourself here.

Still have questions? Email us at: [email protected]

Latest from Instabot
Why Chatbots are the Hottest Trend in SMS Marketing

Why use chatbots with your SMS marketing? SMS marketing brings branded messaging directly to consumers’ pockets, letting shoppers opt in to receive notifications and offers wherever they are. 

Learn More
5 Marketing Ideas to Capture and Convert Customers via Text

When it comes to gaining leads and guiding them toward conversion, there’s more to text messaging that you might expect. With the help of a powerful text messaging chatbot, you can automatically capture, qualify and educate hundreds of prospects at once.

Read on for five actionable ideas for capturing and converting leads via text.

Learn More
Harness the Power of OpenAI with Instabot

Power up your marketing game via OpenAI-powered chatbots. With Instabot’s fully customizable script node, you can fully integrate with OpenAI’s robust API playground. Create bots that can answer general knowledgebase FAQs, correct grammar or passages of grammar, create summaries of longer bodies of text, and more. 

Learn More