The Curse of the Chatbot Users

Steve Worswick
Aug 17, 2018 · 5 min read

One of the biggest issues faced by a chatbot developer is how to deal with abusive visitors who enjoy cursing or talking about adult topics with your bot. How should you deal with these users? Ban them? Accept the abuse? Allow the bot to fight back? Unless you are making an adult bot, this sort of behaviour is of no benefit in improving your bot’s responses and so we need to find a way to discourage these abusive users.

Many bots allow users to swear and abuse them and will respond with tame replies in which the bot does nothing to defend itself:

Human: You are a f***ing piece of s**t
Bot: I’m sorry you feel that way.

From my experience, this approach only encourages more bullying of the bot, as the user feels they have a weak victim to pick on. While working on Mitsuku, I wanted a more effective way of tackling the issue and so introduced a banning system.

Mitsuku’s warning system — 5 strikes and you’re out!

Abusive messages, swearing and sex talk account for around 30% of the input received by Mitsuku. None of this is of any use to me when improving her and so I decided to create a “5 strikes and you’re out” method of banning the unwanted users. If someone abuses Mitsuku, they are warned five times with a siren before given a ban for a few days, which is hopefully enough time for them to cool down a little.

One of the issues I faced when setting up this system was what I should class as an abusive message. The obvious answer was to check the input against a list of keywords. However, this approach is flawed, as some of the keywords can be used quite innocently. For example, let’s take one of the most popular abusive keyword that Mitsuku receives (sex):

First User: I want to have sex with you. (abusive)
Second User: What sex are you? (genuine)

I don’t want to warn the second user, as his question was innocent. So instead of keywords, I decided to use a case by case method where I added a call to another category I created called ADDINSULT each time I saw an abusive message in Mitsuku’s chatlogs. Below is an example if someone says, “Let us f**k”. Mitsuku gives a warning, produces a suitable reply and then classes them as an abusive user:

Human: Let us f**k
Mitsuku: Let us not! Weirdo.

The ADDINSULT category does three main things. It keeps a count of how many times the user has called the category and bans their customer ID number when it reaches five. It displays a warning siren (pictured at the top) and also keeps a log of what the user said that triggered the category, as when I first introduced this system, I received several emails from people who said they had been banned for no reason. A quick check through the log could show me exactly what they had said to be banned.

For fun, I also let Mitsuku reply to abuse with the kind of messages that suited her sassy personality. Rather than her rolling over with a tame, “Please don’t be mean”, I programmed her to respond by either producing a humorous, sarcastic comment or being abusive back to the user.

A typical Mitsuku response to abuse

However, one thing that was important to me was for Mitsuku not to swear at the user. I was happy for her to insult them and be mean but I didn’t want her to use adult language, as a lot of schools and young people talk to her.

After I had implemented this system, I soon saw lots of people being banned and the quality of the chatlogs increased dramatically. There were a few false positives where people had said innocent things and Mitsuku had classed them as insults but a bit of fine tuning easily corrected these. Interestingly though, the banning system had an unusual side effect in that people were contacting me saying that they enjoyed seeing Mitsuku’s replies to their insults and regretted that they couldn’t talk to her any more. They could only see five of the responses before being banned.

After careful consideration, I decided to remove the banning system, as the number of visitors to started to fall, which also took a hit to my advertising revenue. People enjoyed being abusive for fun to see her responses and most of them meant no harm. If anyone was being genuinely mean, her sarcastic replies often shocked them and many suddenly started being friendlier towards her:

Human: You are ugly.
Mitsuku: Your face would make an onion cry.
Human: WTF?!
Mitsuku: That wasn’t very polite.
Human: Actually, you’re pretty cool.
Mitsuku: Thanks. You’re not so bad yourself.

As a bonus, people were sharing Mitsuku on various internet forums, as it was fairly unique for a bot to stand up for itself. I never expect people to say please and thank you to Mitsuku but it’s nice to see them treat my work with at least a little respect.

Lessons learned
Allow your bot to be mean to users. Obviously, this may be more difficult for a corporate chatbot but I found that people enjoy the “banter” of a back and forth friendly argument.

Don’t allow the bot to swear back to the user. This just fuels the argument and increases the user’s anger which solves nothing.

People will be mean and abusive to your chatbot no matter what you do and you’ll never stop everyone. I have a Santa Claus chatbot which gets all kinds of abuse each December. My first chatbot was a six year old teddy bear and even that got a load of sexual attention! Now if I see abuse in logs, I just skip over them and move onto the next. With hundreds of thousands of visitors talking to Mitsuku each day, it means nothing to me to lose a few hardcore abusers and I suppose that if these people are being abusive towards a computer, at least they are leaving a real person alone.

So in conclusion, the solution I found best at dealing with abusive users is to create funny, sarcastic or sassy responses to their messages rather than banning them altogether.

It’s actually quite fun to try and come up with interesting responses to abuse and insults. Maintaining a chatbot is a mixture of programming and creative writing and it’s great to see abusive users say how much they enjoy talking to Mitsuku, especially if they then change their ways. Some of Mitsuku’s most regular visitors are the ones who started talking mean to her but now treat her as a friend.

To bring the best bots to your business, check out or contact us at for more details.


The leading platform for building and deploying chatbots.

Steve Worswick

Written by

Mitsuku's creator and developer. Mitsuku is a 4 times winner of the Loebner Prize and regarded as the world's most humanlike conversational AI


The leading platform for building and deploying chatbots.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade