What I Have Learned From Building A Chatbot
Tags: chatbot, development, ai, technology
Published: 2018-05-06 21:37:29

---
title: What I Have Learned From Building A Chatbot
published: true
description: Many think that creating a chatbot is easy and all you should do is get one off the shelf and deploy. But that is not the case. Sharing you some lessons I have learned along the way...
tags: #chatbot, #development, #ai, #technology
---

# What I Have Learned From Building A Chatbot

## What’s with the hype?

![Chat bubbles](http://adelphi.digital/assets/adelphi/images/articles/conversational-ui.gif)

Technology nerds and enthusiasts have always dreamed of having a conversation with an artificial intelligence or AI. The living embodiment of the perfect AI would be JARVIS from the Iron Man movies. No keyboards, no mouse, no stylus. Just your voice, to have a conversation with your virtual personal assistant to do work for you.

But that is science fiction. AI is still in its infancy and it has a long way to go to reach maturity to beat the Turing test.

When Siri came out in the iPhone, it was the first digital personal assistant made for users. I was amazed how it instantly recognizes your requests using voice and comes back with a reply. A few years later, Google Assistant came out not only on smart devices, but in smart speakers as well. It was the first virtual personal assistant that has a two-way conversation. Then there was a sudden boom of chatbots.

## What is a chatbot?

A chatbot or a conversational UI is any interface that imitates chatting with a real human. It can be as simple as a chat window in a website or as complex interacting with an AI in a smart device. Whatever the medium may be if there is a two-way conversation, you are interacting with a chatbot.

There are a few types of conversational UIs in the industry, flow type, AI type, and hybrid type.

![Flow type](http://adelphi.digital/assets/adelphi/images/articles/flow-type.jpg)

**Flow type** is a tree-based kind of interaction, where the user is presented with choices and driven through a specific path. This path is pre-defined by the developer and can only “go” where the interface tells the user to go. An example here would be like the Choose Your Own Adventure books.


![AI type](http://adelphi.digital/assets/adelphi/images/articles/ai-type.gif)

**AI type** relies on artificial intelligence where the user can freely engage and have a real conversation. Something like Google Assistant, Siri and Cortana, there is an AI driving behind all the conversation.


![Hybrid type](http://adelphi.digital/assets/adelphi/images/articles/hybrid-type.jpg)

**Hybrid type** is the most common type of conversational UI and this is where chatbots come in. It’s a combination of flow type and AI where the users are driven through a specific path while they can engage with the chatbot in a conversation.


## Do you want to build a chatbot?

As a developer, you would only think that it would be as easy as getting code from the internet and deploy to a server. There was more to it than lines of code and pixels of art.

### Lesson 1: “Don’t build one because of the hype”

It was my first mistake and I believe that it’s the golden rule in creating chatbots. Just because its trending now means that one should get into the band wagon and hoping for it to do its job. What I did was basically got Nathan Mk I off the shelf and got my friends to test it. Because it didn’t have a sole purpose, the users who tested it assumed that they were “talking” to JARVIS.

In short, the chatbot should have a purpose. Introduce the chatbot to your audience. Tell them what is his purpose and what can he do. This way you are setting your audiences’ expectations to the level of your chatbot’s capabilities.

### Lesson 2: Map the user journey

After concluding that the chatbot’s purpose should be my digital portfolio tour guide, I thought to myself: “how hard can it be? I have an online portfolio, there is my user journey.” I “programmed” Nathan Mk II to capture certain keywords and reply to them accordingly. However, I faced the problem of the possibility of users going to a different section of the site if they wanted to. Connecting them all together was troublesome. I got lost in my mind of how many different permutations can a user go from point A to wherever they wanted to. On top of that, there were a lot of holes that I didn’t foresee. It felt like it never ended.

Lesson learned, mapping the user journey will make a developer’s life easier when it’s time to program the chatbot. You will also foresee any holes that needed plugging.

### Lesson 3: Build the script

Since I didn’t map out the user journey properly, I thought I could write the script on the fly. Again, “how hard can it be? I have my website, there’s my script.” Copy and paste should do it. As I progressed building my chatbot, I found it hard to come up with good replies and answers. It was either to broad, boring or had open-ended questions. This strayed the users from telling the chatbot the right keyword. ‘

You need to lead your users. Guide them on what actions can be used to progress further. If you can’t come up with a meaning script, hire a copy writer. Solving logic is one thing and having a meaning conversation is another.

### Lesson 4: Add some flavor to it

Chatbots are still an inanimate object and text conversation can get boring quickly. However, it will say to whatever you program it to say. You can always mix it up with animated GIFs, photos, emojis, etc. (if applicable) just to keep the conversation interesting and fun. Give it a little personality as well. Giving the chatbot a little personality will make the users remember it.

### Lesson 5: “I need a human”

After endless hours of using and testing, I got used to navigating around the site using Nathan. I deployed it and let my friends try it. In the end, users got stuck in an infinite loop of “I don’t know” replies. That could mean bad experience for the user. Instead of trapping your users in limbo, make sure that if your user is stuck at most 3 “I don’t know,” give the option to talk to a human. We need to make our users happy by reaching their objective.

## Nathan Mk III

It was a good learning experience in creating Nathan and I had a lot of fun exploring this emerging technology. I learned that planning is essential because this is the backbone of the entire chatbot project. Just like any project that you may encounter, we need plan for the project, foresee the issues that may arise, and ask the questions needed. If planning is done properly, it would be smooth sailing from there onwards.

Chatbots are popping everywhere and uses natural language to communicate with their users. We can further enhance the user experience by utilizing voice to communicate. Voice interactions and voice user interface will be the next big thing in the industry. Here is a demo of what came out of my learning experience. Have a play!

[![Nathan AI Mk III](http://adelphi.digital/assets/adelphi/images/articles/nathan-ai-qr-code.png) http://adel.ph/nat](http://adel.ph/nat)