Chatbots are a dime a dozen. Except for Alexa, Siri and co most of them are pretty stupid though. They only react to specific keywords and respond with a pre-defined phrase. Wouldn’t it be great to actually use the current hype around Machine Learning (ML) and NLP / NLU (Natural Language Processing / Understanding) to bring your chatbot to the next level? With a little bit of help from Microsoft Bot Framework, Botkit, Botmaster, API.AI, Wit.ai, Watson, LUIS and whatnot, you are in for a treat.
Bot frameworks to kickstart your ideas
Developing your own chatbot is easier than ever. Frameworks like Microsofts Bot Framework, Botkit or Botmaster enable you to quickly yield results. Their biggest advantage is to easily allow you to connect your bot with different chat platforms and therfore reach a big audience faster. Facebook Messenger and Slack are one of the first that come to mind and are supported by every mentioned framework. You can not only send simple text messages, but also structured content and media files.
The frameworks also enable dialogs in the form of Bot hears “XY”, Bot replies with “ABC”. In addition to that, there are tons of add-ons and plugins, to add further functionality and services.
Chatbot goes smart
The previously mentioned frameworks work like a charm in creating a chatbot, but they lack intelligence, when it comes to analyzing text and voice. They mostly just detect keywords or patterns.
Language Processing / Natural Language Understanding (NLP / NLU) services like API.AI (Google), Wit.ai (Facebook), LUIS (Microsoft) and Watson Conversation (IBM) solve this problem. They step up your chatbot game and offer SDKs (as well as the usual REST APIs) for Node.js and other languages. Some of them even have integrations for the bot frameworks by either their developers or the open source community.
Their primary role is to output processable information from text in natural language. To do so, they try to extract the meaning/intent and parameters of the given input. Their knowledge is based on sample data. For example you tell the “machine”, that “I’ll take a pizza tonno” contains the intent “pizza-order” and “pizza tonno” is the desired pizza. By using more samples like “One pizza tonno, please” the machine (learning) becomes better and better at understanding natural language.
The advantage of using such a service is obvious: Users can interact with bots in a natural way. What’s more common than using your common language?
The Swiss army knife
LUIS and Wit.ai only focus on analyzing texts and their intents, parameters and so forth, while API.AI and Watson Conversation also provide a service to build dialogues and answers. Theoretically, Wit.ai also offers such a service with “Stories”, but this feature will be disabled in February 2018, as it was mostly just used for FAQ-like bots. According to Facebook, their content should be hosted elsewhere, while Wit.ai still provides NLP.
API.AI’s feature offers another advantage for small bots and beginners, because Google implemented several 1-click solutions to connect to different chat platforms like Facebook Messenger. No programming or maintaining servers necessary! If you still want to add dynamic content without writing your own bot manually, you can easily do so by using so called webhooks.
In the beginning was the concept…
As you can see, there are enough tools and possibilities to create your own smart chatbot in an easy way. Before you begin toying around you should define your bot’s requirements. Do you want to ditch all programming? Which chat platforms do you want to support? Which requests should the bot handle? How do your replies look like? Do you need to handle sessions and context? Do you want to connect to other interfaces (e.g. API of a shop)?
Choosing a technology should come after drafting a concept. If you don’t, you can easily run the risk of being limited by your premature choice of framework/service or getting overwhelmed with the complexity of it. Happy chat-botting! 😉