A Quick AI Chatbot Tutorial
There are a number steps to consider when approaching a chatbot development project.
As far as an AI chatbot tutorial goes, it is a bit of a 'how long is a piece of string' question. One of the main benefits of an AI chatbot implementation is that it can be crafted to solve a particular business problem.
In short, an AI chatbot is not a one-fits-all type of solution. This is of course, what makes a formal tutorial almost impossible.
As far as this tutorial goes, when developing an artificially intelligent or machine learning based chatbot, there are broadly two options.
The first, and easy way out, is to use an off-the-shelf third-party solution. You fling words and sentences at it, and it sends back what it thinks the user was talking about (it is, of course, more technical, but this is an overview article!).
The other option is more involved and generally what the larger, more established, chatbot development companies do. Basically, instead of outsourcing the AI, they have an in-house natural language processing system.
Regardless of how your chatbot will use AI to understand the user, most services go about it in the same way. They attempt to understand input language by breaking it down into chunks. These chunks can be such things as entities, intents, timings and locations (each provider calls them slightly different names, but they all tend to do it the same way).
Contexts, entities and intents
Contexts attempt to understand the phase or moment a user is in, i.e. the context of their surroundings or situation. As an example, the context of a user asking a weather bot for a weather forecast is very different to a user ordering flowers.
Entities in the world of chatbots are 'things', such as timings, numbers, dates, ages, units of measurement and the like. They are usually synonymous with a particular chatbot, and each chatbot solution tends to limit the number of entities it talks about (to keep it simpler to manage).
Intents represent a mapping between what a user says and what action should is taken by the software that powers the chatbot. As an example, if a user sends the sentence "Order me a coffee now", the action would be for your API to toodle off and make it happen.
This next section of our AI chatbot tutorial covers the more overarching design elements the make up a solution.
The first step of a chatbot is to identify what problem it solves to seize the opportunity.
1. Identify the opportunities for an AI-based chatbot.
Before building a chatbot, you should understand what the possibilities of an AI chatbot are. After all, not every solution has to deal with customer-company interactions.
In 2017, there are broadly two things AI solutions are good at dealing with:
Easing process complexities and easing data complexities
Lots of processes within business systems are routine, stage-based and efficiency driven. These more 'mundane' processes are ripe for AI innovation. Broadly (and I mean very broadly), if a human being is clicking, dragging, copy pasting and doing the same thing over and over again, then a business should look at complimenting that human with a machine.
2. If your solution is customer facing, then you should take a (long) moment to understand the needs of those customers.
A chatbot is a service; its goal is to help your audience get to where they need to go.
Only by learning and understanding where your users need to be can your solution meet their end goal. Before any code hits paper, there needs to be a whole lot of questioning, surveying and post-it noting.
3. How are your chatbot and user going to converse?
A chatbot is a machine-led conversation, and you need to design how that conversation is going to work. Of course, no one can predict what a user will say (FYI most of them will try to break your bot) but there are two main conversation types.
Structured and unstructured conversations
By far the easiest one to start on is structured. By using buttons, forms, menus and options, it creates a logical flow a user should take. Most, if not all, interactions are scripted, and it is very hard for a user to get lost in conversation.
Unstructured conversations are far more difficult for AI to deal with. Rather than options and buttons, a user can free-type anything they want, much like when they are talking to friends and family. Both developers and designers should strive to use close-ended questions and language techniques to keep users on topic. We once built an open-ended, unstructured fully AI-driven solution for Unilever; it was emotional.
I could go much more into depth on AI chatbots, but for this introductory AI chatbot tutorial - I think you have had enough!
Of course, we are always here to talk chatbots, AI and the future - why don't you say hi?