How to Design a Chatbot



Last week, I had the pleasure of sitting in on Elizabeth Ferrao’s session at Twilio’s Signal Conference discussing SMS chatbots. The session addressed several questions:

  • What are chatbots?
  • What are they supposed to do?
  • What level of artificial intelligence should they achieve?
  • How can chatbots be more practical?

I’d like to expand on these topics in this post. I’ll start by explaining (for the uninitiated) what a chatbot is, then outline the process of creating one.

What are chatbots?

A chatbot is a computer program (powered by rules and sometimes artificial intelligence) that interacts with the user through a chat interface. There are many types of chatbots, all with varying levels of complexity and strategies. While some chatbots can mimic basic human and conversational behavior, many chatbots that we encounter in our daily lives perform simple functionalities, such as querying users for information or performing basic tasks with provided user input.

While it sounds amazing to create a chatbot with artificial intelligence, many developers should aim to have chatbots perform straightforward tasks rather than have them achieve a certain level of artificial intelligence. The reason—Many chatbots promise a high level of conversational behavior and fall short of that promise. I am sure that some of you have encountered a bot that replies with irrelevant information.

“Everyone going after AI seems a little too soon. Texting to a computer that doesn’t understand many things you are saying can be very aggravating. So be careful early not to overpromise, and give users guardrails.” — Josh Elman, Partner at Greylock

This is not to say that you should not create an amazing chatbot that has artificial intelligence and NLP, but it will take patience and lots of iteration.

A Practical Guide to Designing a Chatbot

Anyone can build a simple and practical chatbot. If you can draw a flowchart, you can build a chatbot. Figure out what problem you are going to solve with your bot. Your chatbot should have simple, attainable goals, such as recording an achievement, looking up facts, and so on. Rule-based chatbots are generally the easiest chatbots to create, as opposed to machine learning chatbots. These chatbots don’t generate any new text. They just pick a response from a fixed set, based on a user input system that isn’t required to handle all these cases — and users don’t expect it to. This is more manageable, and can still be valuable to users and businesses.

There are so many chatbot platforms out there:, wit,, and more. They all follow the same general procedure. First, you create intents. Intents are where you provide multiple training examples which mean the same thing but are constructed in different ways. Second, entities are created based on intents: entities are keywords extracted from the input phrase, extracting parameter values from natural language inputs. For instance, an intent can be “What is the weather like in San Francisco”; “San Francisco” is an entity of type location. By recognizing the entities that are mentioned in the input, specific actions can then be taken to fulfill an intent. Finally, you create actions that correspond to the steps the application will take.

Many chatbot platforms allow you to set up a rules-based chatbot within hours or even minutes. But keep the following guidelines in mind:

  1. Do not overpromise
  2. Distinguish different types of questions. qTypes
  3. Iterate
  4. Build information or task bots, not bots with personalities.

In a follow-up post, I’ll provide a tutorial that demonstrates how you actually create a chatbot.


Chatbot platforms

Lisa Leung has experience as a technical consultant prior to becoming a full-stack engineer student at Holberton School in San Francisco. She enjoys coding, gaming, and reading.


Click on a tab to select how you'd like to leave your comment

Leave a Comment

Your email address will not be published. Required fields are marked *

Skip to toolbar