Flag

We stand with Ukraine and our team members from Ukraine. Here are ways you can help

Home ›› Creating a Chatbot: A UX Designer’s Firsthand Experience

Creating a Chatbot: A UX Designer’s Firsthand Experience

by Scott Milburn
5 min read
Share this post on
Tweet
Share
Post
Share
Email
Print

Save

What would happen if a couple of UX designers and developers get their hands on a bot?

Since Facebook introduced chatbots to its messaging platform, there’s been widespread enthusiasm for bots that schedule flights, book hotel rooms or order Ubers for you — this in the same app that you use to chat with your friends.

Man communicating with a chatbot

Chatbots and AI have been around for a while (look at what China’s leading messaging app WeChat has accomplished) but the fact that Facebook chose to launch this feature recently could mean that this technology is finally mature enough for mainstream adoption, at least in the Western world.

My chance to create a chatbot

With things changing so fast in the tech scene and designers struggling to stay informed on the latest trends, I was delighted to see a hackathon for chatbots on Eventbrite. What better way to learn about chatbots and AI than to mingle with developers and build one? I immediately signed up.

In this article, I’d like to focus on the design aspects of chatbots.

Chatbot 101

If you haven’t played with a chatbot before, check out the ones on Product Hunt. They range from quirky bots that impersonate Donald Trump to more functional bots that diagnose medical symptoms.

To truly appreciate chatbots, you need to understand what makes them so powerful. Well, yes, they’re intelligent “artificially”, but what does that mean? Specifically, they have the ability to understand human language and context, and respond accordingly, which leads us to natural language processing.

Natural Language Processing (NLP)

Chatbots understand what we say by passing our text through an NLP engine, such as IBM Watson, which uses its gargantuan database to deduce the meaning of a sentence.

Human-shaped digital heads talking to each other

The point of NLP is not to interpret sentences word-for-word but to extract the intent behind the message. For example, someone asking, “Is it raining in London?” could have the same intent as “What is the weather like in London?” Treating both questions with the same intent, a bot would respond to the two questions with London’s weather conditions.

Keeping context is the bot’s ability to remember and combine intents across several sentences in a conversation. Let’s say the bot in the last example responded with “It’s sunny with a couple of light showers during the day.” If then you ask, “How many degrees?” the bot would assume the context of weather and output today’s temperature.

Introducing the Don’t-Worry-Mum bot

Our team decided to create a bot that would take care of mum’s nagging messages and keep her at bay — worry-free. Two developers would build the framework for the bot. Another designer and I would determine how it interacts with the world.

We used Facebook’s wit.ai to design and train our chatbot. A good alternative is Google’s api.ai, which we later found to have a more intuitive interface.

Designing the BOT

To ensure our bot was nag-proof, we considered interactions between a mother and her son, boiling them down to 12 major scenarios which you can see listed on the left panel as Stories.

wit.ai Stories

The next step was to generate questions and answers for each of the 12 Stories. Questions were marked with an Intent and paired with a response from the bot. Remember that NLP does not interpret sentences word-for-word, so any questions with a similar meaning would also trigger the same response.

Communication with the BOT
Communication with the BOT

With that said, we were done! Well, not quite…

Training the BOT

The bot we set up was still an infant and wouldn’t be able to fend off requests from all the pesky mums out there. To turn it into a streetsmart, gangster teenage boy, we’d have to train it through machine learning. That meant throwing everything we had at it!

We decided to let our friends (and their mums!) test our bot, so we set up a nifty website containing a text input.Apologies: I’d post the link here, but unfortunately our developer had to take the site down to save resources.]

Communication with the BOT

That night, we tested our bot with more than 30 subjects. The results were logged in wit.ai, and we reviewed them the next morning.

Whenever the bot was unsure of what to say (its confidence level drops below a certain threshold), it provided the default response and logged the uncomprehended message in the Inbox.

Training the bot was simply a matter of assigning Intents to the uncomprehended messages, a process wit.ai calls validation. Next time when the bots encounter a similar message, it will give the correct response. As you can see, machine learning is a matter of trial and error.

Communication with the BOT

Just when you thought you’d covered all the use cases, new ones pop up from nowhere, and you’ll most likely have to create new categories for Stories and Intents. Stay positive — the more categories you cover, the more intelligent your bot will be.

Bots make mistakes too

We had the most fun watching people test our chatbot, which surprised them with some of the funniest mumbo jumbos. Nevertheless, most of our subjects were generous and persistent with befriending our nerdy comrade. (Read the following example from the bottom up.)

Communication with the BOT

Alas, it seems that our bot was still not very good at predicting mum’s reactions. Can you honestly expect an infant to grow up overnight?!

Chatbots are challenging to get right

Overall, chatbots are fun to build but difficult to get right. The conversational interface inherently lacks constraints, making it difficult to predict user behavior. There’s also nothing stopping users from randomly abusing the bot.

Communication with the BOT

One way to work around this is by limiting the options given to the user, through predefined menus and buttons. This approach provides the flexibility of freestyle text while keeping the conversation within bounds.

Reasons to learn about chatbots

Whether you believe in it or not, the chatbot hype is getting businesses’ attention. It shows brand forwardness and gets rid of human redundancies.

In addition, building chatbots is a quick way to learn about AI, a trend that is only getting stronger and more impactful. Google CEO Sundar Pichai wrote in a letter to shareholders of parent Alphabet Inc. last April, “We will move from mobile first to an AI first world”.

The conversational interface of chatbots is the most natural and reliable way we use to with interact with our friends. E-commerce sites like Amazon are favoring chat-based communication with customers over phone or email. As a UX designer, you’ll get far more insights from chat than other sources of data.

Conclusion

Chatbots have just raced off the starting blocks, and it will be a few more years before we know if they’re here to stay. As we leapfrog into the era of AI, we’ll probably see an increase in human-assisted chatbots with a gradual shift towards full automation.

Even so, now is a good time to learn about chatbots and AI. There are tons of examples out there for inspiration. Your best bet are bots on Messenger, Telegram, Slack, Product Hunt and WeChat.

post authorScott Milburn

Scott Milburn,

Scott is a UX Designer working in London. He strongly believes in a broad and holistic approach in solving business problems.
"My path towards UX was a long and winding one. After graduating in engineering, I did various jobs in manufacturing and copywriting. It took me a while to find myself in UX, but I've never looked back since."
Scott is passionate about promoting design thinking and helping other professionals get into UX roles.

Tweet
Share
Post
Share
Email
Print

Related Articles

New ML models emerge hourly but this fast pace comes with drawbacks; hypothesis-driven development can help to mitigate those.

Article by Benjamin Thurer
The Inflation of AI: Is More Always Better?
  • The article challenges the need for the rapid growth of AI and ML models, highlighting risks and advocating for hypothesis-driven development to ensure meaningful contributions, enhance quality, and foster innovation in the AI community.
Share:The Inflation of AI: Is More Always Better?
7 min read

Users attribute human-like qualities to chatbots, anthropomorphizing the AI in four distinct ways — from basic courtesy to seeing AI as companions.

Article by Sarah Gibbons
The 4 Degrees of Anthropomorphism of Generative AI
  • The article delves into a qualitative usability study of ChatGPT, uncovering degrees of AI anthropomorphism in user behaviors.
  • The authors identify four levels — Courtesy, Reinforcement, Roleplay, and Companionship — providing insights into how users interact with and perceive generative AI.

Share:The 4 Degrees of Anthropomorphism of Generative AI
8 min read
Article by Sreya Majumdar
Unleashing the Power of Design Thinking: A Sustainable Journey Towards Business Innovation
  • The article explores Design Thinking’s transformative role in business innovation, using Apple’s case as a prime example, and introduces a forward-looking sustainable framework for assessing innovation.
Share:Unleashing the Power of Design Thinking: A Sustainable Journey Towards Business Innovation
3 min read

Did you know UX Magazine hosts the most popular podcast about conversational AI?

Listen to Invisible Machines

This website uses cookies to ensure you get the best experience on our website. Check our privacy policy and