Now it’s 2019 those that have successful chatbots programs and proof of concepts are asking themselves:
How do you use natural language processing to upgrade your chatbot?
Basic chatbots can operate just fine without natural language processing. However, their capability is limited. NLP allows computers to understand and act on human language and have far more flexible and natural-feeling conversations. This usually means the overall capability of a chatbot increases and so does user satisfaction.
Secondly, as we briefly mention, you can build chatbots without NLP, but they’re for limited use cases (which can bring a higher return of investment!) so it’s well worth going through the differences to understand when it’s worth implementing it.
In this article we’ll cover:
- The three types of chatbots
- What is NLP
- When you DO need to use NLP/NLP
- When do you NOT need to use NLP/NLU
- Other related questions
Let’s get started.
What is Natural Language Processing?
Simply, natural language processing (NLP) is concerned with how technology can meaningfully interpret and act on human language inputs. NLP allows technology such as Amazon’s Alexa to understand what you’re saying and how to react to it. We go into NLP in much greater detail here.
Chatbots can work without NLP. But their functions are limited. NLP for the majority of use cases is a necessity.
When I first got into chatbots, I grossly underestimated how many different components are needed to start making chatbots capable of even remotely fluid conversation.
NLP is a very broad subject, often in chatbots, you will hear the term natural language understanding:
Natural language understanding
Natural language understanding (NLU) is a subset of NLP.
This sub-field focuses specifically on the understanding of intents, figuring out context and ambiguity in sentences.
We cover what is NLU, why it’s so important and our favourite examples here.
We cover later the third type of chatbot: “machine learning”. Which is technically referred to as Natual language generation:
Natural language generation
We cover more specific chatbot examples of NLG chatbots, later on, for now though, the most famous example of NLG is GPT-2 created by Open AI. GPT-2 can create an entire article, just from a small sentence prompt. You can give it a go yourself here!
How does NLP break up a sentence and help the chatbot interrupt language?
Understanding language to us humans is second nature, so it’s easy to underestimate the complexity involved.
For computers, it’s one of the biggest challenges to tackle. When you send a sentence such as “What’s the weather like today?” That message goes through a process of:
- Tokenisation: Which turns a sentence into data a computer can understand.
- Parsing: which understands the underlying structure of the data we are given.
Which from there the NLP engine will try to find:
- Intents: to understand what the user wants (their intent).
- Entities: to identify categories of data within the sentence.
Again, we cover this in far more depth in our “What is NLP article” if you’d like to learn more.
The three types of chatbots:
1. Logic only
These are the chatbots that many consider the root cause of the recent chatbot hype cycle. Tools like Chatfuel appeared that, combined with Facebook Messenger, allowed anyone to create a “chatbot”. However, without NLP, all these new bots didn’t understand any message sent and only worked when you pressed the buttons given.
In 2019 onward, these logic and button only bots still have their place. They’re cheap and fast to build.
Types of logic only chatbots
Email is known as a great marketing method for converting early leads. Messenger marketing is touted as “the next email”. Messenger does a great job of making a more personal and interactive funnel.
Manychat does a great article that goes into further depth about this:
Lead capturing on your website: Typeform
Many spout a great use case for chatbots as a great alternative to having long forms. And they definitely are. But it’s only worth investing all that time and effort when you plan to scale your chatbot into other areas of your business. Otherwise, there are tools such as Typeform which give a great fluid and conversation-esque experience, for a fraction of the build time and cost.
It’s often not possible for many companies to invest the manhours and cost into a chatbot with NLP and if that’s you, there are plenty of low-cost alternatives that do a really good job of automating parts of the live chat process.
Drift – are the leaders in “conversational marketing” and have plenty of templates to automate slight parts of the marketing funnel.
Zendesk are leaders in the customer service and live chat area. They have some basic options that automate some common FAQs from your knowledge base.
We cover many more logic only chatbots in our beginners guide here!
2. Logic & NLP hybrid
To go beyond basic buttons, you need NLP. Amazon Alexa is a popular example of using NLP technology. There are multiple tools such as Dialogflow & Watson to achieve this, but they need a lot of work, cost and integrations to make it worthwhile. Sometimes it is easier and brings a higher return of investment to keep it simple and use buttons.
What’s quickly becoming the most common as chatbot NLP technology becomes more accessible to the wider market.
By using a hybrid of conversation design and logic, you get to roughly dictate how the conversation flows. However, by implementing NLP, you have some room for user error when they type poorly grammatical sentences or want to deviate from the current conversation flow into a different one.
These are currently the most successful chatbots and what we commonly build for clients.
HSBC virtual assistant AiDA
Like many large companies, finding any way to improve the current customer experience and find ways to reduce inefficiencies along the way has become a high priority in recent years. Chatbots are an obvious solution to many of the challenges.
However, as we mentioned, to do so well takes a lot of design and expertise to do so effectively, when you do, however, the results speak for themselves. AiDA, which is currently HSBC’s proof of concept chatbot, currently has the same CSAT score as its human counterparts, meanwhile handling 6-10x the enquiries as to its human counterparts.
Duolingo is a language learning app that gamifies the process of learning another language. One way of multiple ways they achieve this is via a chatbot that has a practice conversation with you. With a combination of using NLP to understand the sentence, you type and guided conversation flow. This hybrid chatbot provides a fun and interactive way of learning.
3. Machine learning
Lastly, there are machine learning chatbots that usually need supervised training. But once trained, don’t need any further human input, nor do they need any conversation design. Most chatbots built this way are either for very specific use cases like Babylon, for academic research like GPT2 or for gimmicky purposes like Xiaoice.
In terms of Applied AI and business applications, hybrid chatbots are still very much the way to go in terms of cost and effectiveness.
Let’s run through each one of these examples further:
Xiaoice is an advanced natural language chat-bot developed by Microsoft. It targets the Chinese community on the microblogging service, Weibo, primarily. The conversation is text-based. The system learns about the user and provides natural language conversation. Microsoft gave Xiaoice a compelling personality and sense of “intelligence” by systematically mining the Chinese Internet for human discussions.
Babylon GP bot
Babylon was created with the ambition to provide affordable health care to everyone. They plan to achieve this by combining the growing power of machine learning with the brightest minds of humans.
By coming machine learning and conversation design, they’ve managed to build a chatbot that was able to take the Royal College of General Practicitions exam.
This exam is the final test for trainee GPs and their chatbot managed to achieve a score of 81%, compared to the average mark for human doctors of 72%.
The debate is still furiously raging in terms of what role a chatbot should have in the medical sector.
X.ai is a virtual assistant who arranges meetings on your behalf via email.
Rather than having to the usual email chain of the back and forth: “when are you free” X.ai hooks up to your calendar and sorts it all for you.
While you could argue GPT-2 Isn’t a chatbot, it is one of the best and most advanced examples of natural language generation in action.
GPT-2 is a large transformer-based language model. It has the ‘simple’ task of predicting the next word, of all the previous words given within some text.
GPT-2 currently displays a broad set of capabilities and has also caused a heated debate within the AI, governmental and ethics communities.
When DO you need to use NLP?
Basically, any time you’re looking for your chatbot to understand language.
There are many use cases where it makes for much better user experience by allowing flexible conversation flows.
We’ll iterate, however, while the free text significantly better experiences, it also takes a lot more resources to build. We cover which level of chatbot is right for you in our 7 levels of chatbots article..
For now, though, it’s actually easier and faster to ask:
When do you NOT need to use NLP?
Messenger marketing campaigns:
Influencers like Gary Vaynerchuk are common examples of using messenger as an alternative medium to distribute their content and provide a slightly more personalised experience vs email. Not NLP required.
When you’re on a low budget or you or you don’t have the expertise to use NLP effectively.
Despite the incredible rate of progress chatbots and NLP is having, there is still quite the leap. As we discuss further in our how much do chatbots cost article, there is still quite the leap of costs when developing chatbots.
Here are some very rough costs when outsourcing particular chatbots to an agency:
- Messenger marketing:~£10,000.
- Creating a proof of concept chatbot with NLP ranges from ~£30,000 – ~£50,000
- Full custom chatbot like AiDA or Babylon can cost £100,000 into millions.
What is an NLTK chatbot?
Natural language Toolkit (NLTK) is one of the best platforms for building machine learning chatbots using the coding language Python. It provides a user-friendly interface to over 50 corpora and lexical resources like WordNet. Secondly, it provides an enormous suite of libraries for text processing, classification, tokenisation, parsing and semantics.
Basically, if you want to dive deep into natural language processing using python, this is the tool for you!