Wednesday, 9 May 2018

Top 5 tips for developing a Chatbot

This is different from my usual blog posts but I have been sitting on this for some time. I have been working with Chatbots for about 1 year now. Been on and off various engagements. So, I wrote something to make it a a bit clearer for those wanting to develop it and those wanting to know about it.

Chatbots are very trendy these days and thought I would write up some personal learnings I have made. Chatbots have existed for many years but the technology has been democratised like many things in Azure. You can literally build a bot for free of charge (of course you have to invest a bit of your time). A user would generally communicate through a chat window and with the addition of cognitive services, you get a really powerful tool.

Below are my top tips for when building your first chat bot.

1. A chat bot must have a purpose

There are a few forms of chat bots out there.

a) General Chatbots – Alexa, Google, Cortana, Siri, Watson. This is the big problem these major companies mentioned are trying to solve. Some are very similar and some are very unique in the way they are tackling the problem. A while back Alexa and Cortana have signed an agreement. This may seem odd at first but it benefits bot companies. Rather than competing with each other, their partnership offers them a greater reach.

This is not the area for every company. It requires huge investment.

b) Domain Specific and/or Task Specific – Some examples are Alarm (Wake me up at 7am tomorrow), Weather (What’s the weather today in Perth), Health (Natural health advice), Retail (Product recommender), Company Policies (QnA)

These are some examples but the application is endless. With the toolkits available you can build a chat bot that has deep knowledge about a specific domain or a specific task. If you can focus on solving a problem for the domain then the application has purpose.

2. Know your audience

Know your audience before you develop your chat bot. If you are developing a chat bot for business users, make sure to communicate to them at the same level. Don’t try to tell jokes or deviate from your purpose. Some would call this a personality but most business users don’t expect a personality when they are performing a task that is supposed to be simple.

However, if you are developing for a consumer market, you could add personality to your chat bot. Making the users experience less serious and a bit of fun. You could tell a random joke if the user asks. You could personalise the message and try to up sell.

3. Keep it up to date

A chat bot should be well trained and kept up to date to provide the user with the best possible answer. A stale chat bot will die a lonely death and be forgotten. Remember, users don’t uninstall a chatbot. They merely stop using the chat bot and loses its relevence.

4. Be helpful

If your chat bot does not know how to answer a question. Don’t say you don’t know and stop there. Offer suggestions or some kind of summary of what the chat bot can do. For example, a user may enter a topic that is unrelated. The chat bot can respond with “I don’t understand” but you can improve this response by being helpful. Tell the user what you can do. “I don’t understand but I can help with booking your leave”. We could provide buttons or dialogs for the user to enter one of these conversations.

5. Design your flow

This sounds obvious but many forget. Before you begin any development, even a prototype, design your conversation dialog. You will see how many ways you could achieve the same thing via a conversation.

Think of a chat bot for booking leave. You could provide a wizard type dialog. Asking various questions such as; What date, how many days, what type of leave etc. Alternatively you could just build language understanding to interpret a single sentence.

User: “Book me annual leave starting next Monday for 5 days”.

From this one line we could interpret the following:

a) Type of leave is Annual leave

b) Date – starts next Monday

c) Duration – 5 days


A bonus tip is to watch this youtube video. I learnt so much and made me reflect a number of things that I have done.

https://youtu.be/aHI8qfofH4c?t=1032

Take away quote that really resonated with me “Solve one thing and solve it well.

1 comment:

Anonymous said...

Great article, thanks for sharing this! By the way, I have just asked microsoft partner to implement MS Dynamics at my family retail business. I'm kinda scared about the changes to come, but at the same time I'm equally excited :)