Beyond NLP: 8 challenges to building a chatbot

Natural language processing is the key to communicating with users, but doesn't solve the business problem on its own

Beyond NLP: 8 challenges to building a chatbot

Over the last five years, companies like Microsoft, IBM, Google, and Amazon have delivered amazing chatbot frameworks, providing tools like Microsoft Bot Framework, IBM Watson Conversation, Google, and Amazon Lex that enable developers to build software that can truly understand human language and converse with humans in a natural manner.

The hero of this story is natural language processing (NLP), which is taking chatbots beyond clumsy decision trees to a new level of experience characterized by cognitive flow and ushering in a new wave of applications. The democratization of NLP to the masses and the sophistication of chat channels like Viber, Messenger, and iMessage have given these types of applications a new boost in popularity and interest.i

Though powerful, NLP alone does not solve all the challenges associated with building a chatbot. NLP, with all its power, delivers only a piece of the overall experience desired by businesses and consumers. It is a bit like an engine without the chassis. Much more is needed to integrate a chat experience into a business process to solve a problem. Let’s dissect this a bit more.

The anatomy of a chatbot can be conceptualized into the following parts:

  1. The chat interface. This is most likely a chat channel like Messenger or iMessage or a custom UI similar to these tools. Many chatbots come with such interfaces built-in or integrate directly into the native channel suited for the client. There are many levels of complexity to this.
    • Text only: An interface that consists only of text boxes and labels that the user interacts with.
    • Text and voice only: An interface that enables the user to speak sentences instead of typing them. The added complexity to this scenario is to enable access to a microphone that can capture voice and integrate voice-to-text components.
    • Voice only: Think of an experience similar to Siri, Alexa, or Cortana.
    • Voice and visual: Think Alexa Show.
    • Text, voice, and visual: An example is the rich experience in iMessage where the client can type, speak, and interact with visual UI widgets in the context of a chat. The challenge for the developer here is enabling the chatbot to provide the right UI interaction in the right context.
  2. The NLP component. This component understands a free-form text or voice utterance and dissects it into intents and parameters. Note that NLP can only help your application dissect a sentence to a set of intents that you can take action on programmatically. While NLP discovers the intents from the conversation, software developers are on their own to figure out how to respond or take action on these intents.
  1. The context or memory of a bot. To enable human-like interaction via a chatbot, the developer must maintain the context or memory of the conversation from beginning to end. Some chatbots need to maintain that context per user to be able to offer a personalized experience and history for a customer. If I book an appointment via a chatbot with a doctor for example, I would like that conversation to remember that context and remind me later that I have an upcoming appointment. More advanced chatbots might know my name, email, address, and so on.
  1. Loops, splits, and recursions. This is often where most of the complexity lies in developing a chatbot. There are many types of chatbots out there. Many are “atomic” and serve the purpose of a single action or “transaction.” As you start having more open-ended conversations with chatbots, the need for the chatbot to be able to split off the conversation into others or to loop back into a previous specific conversation is very difficult to do today and many chatbots don’t support it.
  1. Integrations with legacy systems. Depending on the type of chatbot you are building, it may need to work with an external system or source of information. If you are building a chatbot for a business, then most likely you will be working with a CRM system, an ERP application, or even an HR system that you need to gather information from or push data into.
  1. Analytics. As with any modern piece of software today, analytics is key to understanding how well your chatbots are working. Analytics can help you understand engagement, deflection, and misunderstandings and deliver a high-quality or more personalized experience.
  1. Handoffs. This might not be a must for all chatbots, but if you are building a chatbot to work alongside a customer service organization, you will need to consider the handoff between the bot and the human that will take over in cases where the interaction gets too complex.
  1. Character, tone, and persona. These are some of the soft characteristics of a chatbot that make it feel more human. Do you want the bot to be male or female? Do you want it to be hip or formal?

Once a developer has integrated the NLP, then comes the real challenge of building a truly productive chatbot: Basically, parts four through eight. Developers will realize during the construction of these stages that they are building yet another application with lots of hand-coded logic, decision trees, and persistence management that must be personalized for each user.

In essence, the NLP does not address any of the challenges that you typically face in developing a real-world line of business application. It simply presents the opportunity to deliver a broader and more satisfying experience using a chat interface.

Many of the new chatbot vendors are trying to solve these challenges by introducing a richer declarative syntax that enables developers to define the goals of the bot and handle much of the heavy lifting related to system integration, conversation flow, and persistence management within the chatbot framework. If such an evolution is not taken, chatbots will continue to be costlier to develop and maintain than traditional applications.

Faris Sweis is senior vice president and general manager of the developer tooling business at Progress. Previously Sweis was the chief technical officer at Telerik, which was acquired by Progress in 2014, and prior to that he spent 10 years at Microsoft.

New Tech Forum provides a venue to explore and discuss emerging enterprise technology in unprecedented depth and breadth. The selection is subjective, based on our pick of the technologies we believe to be important and of greatest interest to InfoWorld readers. InfoWorld does not accept marketing collateral for publication and reserves the right to edit all contributed content. Send all inquiries to

Copyright © 2017 IDG Communications, Inc.

How to choose a low-code development platform