Check our Ultimate Chatbot Guide
How should a chatbot respond to difficult questions? Automation in practice

How should a chatbot respond to difficult questions? Automation in practice

Patrycja Jarosz 01.05.2020
Patrycja Jarosz

They say there are no two snowflakes, days, people or conversations alike. The same goes for chatbots. There is no universal method to set the right answer to difficult or inconvenient questions directed at bots. You need to get to know your audience well and adjust the automatic response pattern to the user’s communication style. In order to facilitate the process, I will present several solutions to make a chatbot ready for difficult questions. 

Small talk or talking to a bot

A user, with a tongue in cheek called a tester, looks in a chatbot for a way to block a product or a find a gap in it. They enter many questions, often very general, to test how the chatbot will deal with them. The tester asks for the weather or the chatbot itself, for example.

 – “What’s your name?”, “Who are you?”, “What can you do?” It’s wise to be prepared for such questions from the very beginning. They might be not as important as the key content for a given client, such as presenting the product range or replying to FAQ. However, during the first stage of communication automation with a chatbot, they will satisfy the needs of those users who just want to talk to a bot in a friendly manner. Adding a few or a dozen questions of this kind may allow users to have a “small talk” with a chatbot. It feels like a conversation with someone who understands us. This also allows us to encourage users to use the product, since they will get more accustomed to it.

Swear words in chatbots 

Users take different approach while talking to a person and to a chatbot, which sometimes is reflected in less language control. Swear words are common, also in human-bot conversations, so we shouldn’t be afraid of them. However, we need to work out how to deal with them in a way adjusted to a given audience.

In order to make it easier for our customers, we’ve developed a set of nearly twenty hundreds words commonly considered as vulgar. Our chatbots are able to capture each of those words in a user’s message. We don’t have to create such a database from scratch in the next projects. We only pay attention to the way our chatbot responds to a swear word detected. It all depends on the type of recipient. Here are some examples of replies in our client’s chatbots.

1. Wrocław priorities the culture of expression

In the chatbot of the City Council of Wrocław the answers are balanced. The bot replies to swear words with the following text: “We kindly ask you not to use vulgar or offensive words,” and directs the user to the main menu to search for replies to their question anew. Because the chatbot operates in the time of crisis, swear words appear oftentimes due to stressful situations. With this kind of reminder, the user’s attention is drawn to the appropriate behavior during (also online) conversations, while giving them the opportunity to quickly find the answer.

2. Strict approach in chatbot 

The bot replies to a recognized swear word with an animated picture of angry Radek ( chatbot persona) and the following text: “We know you can sometimes lose your temper. If our customer service specialist can help you, they will get in touch soon.” The user then goes into moderator mode. 

This method works well in the case of failures or technical issues that make users write nervously to a chatbot and expect quick assistance with a particular problem.

3. Clapback in 4FUN.TV chatbot

The communication should be adjusted to the target group and their language. Hence, the approach of 4FUN.TV Funbot to the swear words detected is completely different. We save the detected word as a variable {{detected_rude_word}}, and the user receives a message saying “You are {{detected_rude_word}} yourself! Alright, it’s a joke. No? No. Type the same question using different, NICER words, OK?” It’s a funny reply, but it also forces a user to change their language the next time they try to find information needed.

Context is relevant

Many issues, which users report to the chatbot, can be solved in a single message thanks to an extensive NLP (natural language processing) training.  There are some difficult topics, however, where communication automation process requires slightly different chatbot training methods.

People using IM can be divided into two groups – those who write one long message, and those who break down their story into many shorter messages. The former represents a real challenge for NLP. Fragmented phrases are hard to capture, and the lack of predictability in message splitting means that chatbots may incorrectly detect intentions. In order to solve this issue, we’ve introduced in chatbots for websites created on our platform the possibility to automatically combine several consecutive messages sent by the user in one block. With this feature, we can be more confident that the intentions are correctly recognized. The solution allows for equally efficient service of subscribing users as well as those who abuse the enter key. 

There are scenarios, however, when a conversation cannot end with one answer or a user doesn’t want it to end. In such cases, the chatbot detecting the same intention repeatedly or lack of their understanding annoy users the most.

We prevent such situations in different ways. The first one comes with our proprietary NLP engine embedded in our platform. It allows for detecting intentions only if the user is in a particular subject area (which we call the block), which reduces the risk of misunderstandings.

It is also possible to adjust the system reply to the day and time. As a result, within the working hours of moderators or customer service department, complex issues are forwarded to employees, and when no one is available, an appropriate message is sent to the customer, e.g. about possible reply time. The moderators then receive an e-mail with information about the contact attempt. The outcome? Queries can be handled more efficiently and users get a specific response. We’ve introduced such a model in chatbots for Semilac and UNIQA insurance company. Additionally, if the system repeatedly doesn’t detect which answer should be sent to the user for the question asked, we can automatically direct them to an available moderator/customer service employee.

The second option is the external integration of our system with Dialogflow, which is based on contexts. A context is a temporarily remembered variable for a given user. Contrary to standard variables, we don’t assign it permanently, but for a certain period set by us, e.g. two consecutive interactions with the user. This gives both chatbots and their users the opportunity to ask additional questions or specify their search. At the same time, we don’t save the data for a longer period, so the next time the user contacts us, the process starts anew.


Inflection in Polish

Polish is one of the most difficult languages worldwide, due to its extensive grammar and inflection. NLP training can be a troublesome task because of the inflectional endings variety of specific keywords. Hence, words corpora may come to assistance. We’ve added a feature of building intentions on their basis to the capabilities of proprietary NLP KODA Bots training. As a result, we don’t have to enter every possible variation of a word but only its corpus, which in this case will remain unchanged. This is a good solution when a user enters a word with the wrong ending, doesn’t add it at all or when autocorrect changes it.

Knowing the user is the key

When automating communication at different levels, it’s worth remembering who our target group is and how users can communicate with us. It’s important, because adapting replies to incomprehensible phrases or swear words, or making intentions easier to understand significantly improves communication. Moreover, it allows for building the brand image, as we can see with 4FUN TV Funbot, which replies to users in a lightsome way, often even humorous, while providing them with the information they need. It’s also good to remember that although questions from users can be difficult, appropriate optimization will allow us to prepare for them. Especially if we know the audience and know how we want to communicate with them through a chatbot.