Blog

  • How to talk about a nonprofit bot without breaking community rules

    Hi Everyone

    I want to socialise a covid vaccine nudge & remind bot which I think can be useful in the present scenario. I have no axe to grind (it’s not for profit I am paying platform and server costs from my own pocket) but want to be conscious of the subreddit rule where it might look like I am ‘using this subreddit for self-promotion and advertisement’.Is there a way to do that while being respectful of the rule?

    submitted by /u/Rsen555
    [link] [comments]

  • How to build conversational forms on my website?

    I’m looking to build conversational forms to embed in a course creation website. Any tool suggestions to do it?

    submitted by /u/Jane_Andrade
    [link] [comments]

  • Chatbots In e-learning: How Chatbots Can Help To Develop Awesome Employees

    Chatbots in eLearning: How chatbots can help to develop awesome employees

    Your organization’s employee experience has a lot of impact on many areas of your business, including employee retention, work productivity, work culture, and ethics. So, supporting them with the necessary resources to improve their interaction with jobs is essential to help them develop their skills.

    Image by Mohamed Hassan from Pixabay

    Without adequate support for employees, it can be hard for a business to achieve optimum results. That’s because a lack of proper work experience can result in an inefficient work process and employee turnover.

    While there are many ways organizations can stay successful, one effective way is by helping employees develop their skills through technologies like Chatbots. That’ll help them to acquire more experiences that are needed to progress in their workplace.

    Today, chatbots in eLearning are revolutionizing the arena of employees’ interaction with an online course. Apart from that, they’re also helping to enhance employee experience in many areas, including human resources activities, IT support, and onboarding training.

    Here, we’ll be exploring a few ways that Chatbots can help to develop employees and improve their experience.

    5 ways chatbots in eLearning can help to develop awesome employees

    Quick and simplified process

    Although some organizational processes can be crucial to do, they’re a bit complex and can be hard to perform. For instance, HR functions involve many complex processes, frameworks, and policies which employees must perform every time.

    So, the introduction of chatbots in e-learning can help HR teams perform complex operations and communicate information automatically, anytime. With chatbots, employees can easily access HR and get every resource needed for them to develop and improve on their experience.

    Also, chatbots can save time for employees in the HR department by helping them take care of trivial questions that may arise. By so doing, they get to focus on other skills like employee engagement, performance management, or career pathing that helps them and the company develop.

    Trending Bot Articles:

    1. Chatbot Trends Report 2021

    2. 4 DO’s and 3 DON’Ts for Training a Chatbot NLP Model

    3. Concierge Bot: Handle Multiple Chatbots from One Chat Screen

    4. An expert system: Conversational AI Vs Chatbots

    Skills development

    The development of your employees’ skills is a great contributor to the success of your business. However, it requires a lot of investment. One of the ways an organization can make this investment is through training and skill acquisition programs.

    In today’s digital age, skills are assets for employers. To them, hiring an employee with the perfect skill sets is vital for their business to grow. While that is so, it’s also essential that employers help their employees to develop their existing skills and acquire more skills.

    Employers can improve and achieve better learning outcomes by integrating chatbots in eLearning. With chatbots, the development of skills like language processing and machine learning becomes easier for employees. Apart from that, it’s much easier to deliver the right information on any specific subject matter using chatbots, anytime.

    Improvement of knowledge retention

    Integrating chatbots in e-learning, apart from helping employees develop their skills, also helps them to improve their knowledge retention. While most organizations arrange different training programs for their employees, most don’t get enough motivation to participate in the program.

    That’s often a result of the lack of proper engagement in training. Integrating chatbots in eLearning can help to improve employee engagement levels, and thus help them to navigate smoothly through their course module. That also contributes to boosting their retention ability and helping them acquire knowledge with ease.

    Easy accessibility to training resources

    Although the time-honored practice of training has been the best approach for developing skills in the past, it’s not as effective anymore. Chatbots in eLearning has been a better alternative for developing their skills.

    With AI-powered chatbots, employees/learners can easily access their training resources at their convenience. Also, they can choose to complete their training and acquire knowledge at their most convenient time.

    By integrating chatbots in eLearning, you need not worry about the new Learning Management System. That’s because it can easily get integrated with existing LMS to deliver the best learning experience.

    It also empowers employees to access their training material on their phones, hence, helping them to reduce dependence on traditional classroom learning.

    Chatbots in eLearning are the next big thing. Gone are the days that they only focus on handling employees’ questions. Today, they can help employees to develop their skills and acquire a better learning experience.

    With proper organizational plans, departments like HR can make use of chatbots to handle varieties of work tasks and achieve the best results.

    Don’t forget to give us your 👏 !


    Chatbots In e-learning: How Chatbots Can Help To Develop Awesome Employees was originally published in Chatbots Life on Medium, where people are continuing the conversation by highlighting and responding to this story.

  • Conversational AI for Opticians

    Real Test of Patience with Optician Practices

    Imagine a patient is driving back home from the office, or he is in an adventure in the park with the kids and reminded of booking an appointment at the optician practice. But as he is away from a computer, the only option is to call, even though there could be other alternatives for booking an appointment with that practice. If lucky enough to call in the appointment-taking hours, after first or more attempts, a receptionist picks up the call. With her gentle voice she asks “Can I keep you on hold for 1 mins”? 3 minutes. 5 minutes. Ten minutes. Finally they hear a voice “Sorry! For keeping you on hold for this long”. The patient is then asked about all the details and hopefully booked with an appointment.

    Result : Frustration. And he will probably have second thoughts booking with that clinic again.

    The hunt for cognitive strategies in health care is on. In this modern age, you may have thought that emails or even social media posts have surpassed the phone, but in fact, approximately 80% of inquiries received by your business are more likely to be in the form of phone calls.

    Every time the phone rings at your optician practice, you have a new opportunity to provide excellent customer service to your caller. Any call that comes into your private practice is a chance to increase sales by assisting a prospective or current customer. With too much riding on the ability to return phone calls on schedule, failure to do so is not a choice that you should seriously consider.

    Regardless of how well equipped an optician practice may be, it is likely they are experience challenges in their business. Let’s examine the hurdles faced by them and the best ways to overcome them.

    Handling Call Volume

    On average, how many calls would you bet an optician practice receptionist handle a day? Between patient calls, new patients reaching out with queries, referrals from hospitals and eye clinics, test results from outside labs, and more. It is likely that your receptionist must be attending upwards of maybe 150 incoming calls a day. Often, your receptionist also handles outbound calls for consultations, follow ups, availability of lenses, and more. This means the receptionist stays on the phone for a good majority of the day as well as handling patients and medical vendors that enter through your doors. Your receptionist stays busy handling patient needs! Sometimes they have to stretch their working hours to more than 8 hours a day.

    While they are answering the phone, it is important that they adhere to phone etiquettes. But the question is how far a person can maintain it after getting overwhelmed with that many calls in a day? The answer is “ Impossible” . Maintaining excellent phone etiquette helps to improve patient satisfaction and will help move the call along in a positive manner.

    The diagram below clearly states that long call wait times and poor customer service goes hand in hand (source: YouGov report).

    A waiting time longer than 10 minutes is considered to be poor customer service

    Fielding Feedbacks

    At the end of the day, your front desk receptionist takes the stress of the feedback from patients. These feedbacks would be usually negative ranging from long hold times, to waiting for the practitioner to start the test, to the quality of glasses or contact lenses received or the care shown during an appointment. For a receptionist these negative feedback can be a drain and for your business it’s a risk. But if you see many of these circumstances are not under your control. It is still beyond important for you to have empathy for the patient’s situation and to determine what can be the best way to address those remarks.

    Missed Calls and Lost Revenue

    If your practice is missing calls, you’re losing out on important opportunities. People still make phone calls if it is an emergency or if they are not around a computer. And if you are missing such calls, it delays patients who need care and prevents your practice from growing and remaining financially viable. Then, when a patient’s call is missed, one of three things happens for them(ordered from best to worse)

    • They get their query answered from a recorded message (e.g., your clinic hours)
    • Drop a voicemail
    • They hang up being frustrated and angry

    Of these 3 things, #3 is clearly the worst. If a prospective new patient calls your practice but then gives up, you’re probably not going to hear from them again.

    Trending Bot Articles:

    1. Chatbot Trends Report 2021

    2. 4 DO’s and 3 DON’Ts for Training a Chatbot NLP Model

    3. Concierge Bot: Handle Multiple Chatbots from One Chat Screen

    4. An expert system: Conversational AI Vs Chatbots

    • According to a research, 74% of people are likely or very likely to choose another business after a negative call experience.

    Of course, you or your staff does not intend to miss calls; it only happens because your practice is running hectic during the workday and then prohibitively expensive to staff at night or on weekends.

    Costs that Come with Staffing and Adopting Technology

    Sometimes a person who calls your practice and does not reach a human. This is unavoidable unless you staff your phone lines 24/7 (expensive and inconvenient), pay for a staff at a triage line (burns a hole in your pocket), or hire an answering service machine something like a voicemail.

    For optician practices that are inundated with calls and other challenges, here is a solution that could help their receptionist decrease time spent on the phone, reduce call waiting time and help maintain efficiency, productivity, and healthy patient relationships.

    Optician practitioner helping customers

    Enter Conversational AI and improved Customer Service

    Spike in call volumes require optician practitioners to take proactive approaches to identify solutions that can help patients with self-service. The obvious solution that comes into the picture is Conversational AI solutions which can include things like virtual assistants/chatbots, machine learning, and voice analytics. In today’s time Conversational AI can be deployed and adopted with speed and scale to help increase call volumes and transform overall patient experience without going heavy in pockets.

    According to BID Research and ReportLinker, the global healthcare robotics market is predicted to reach $11.4 billion by 2023 and the market for artificial intelligence in healthcare has the potential to reach $36.1 billion by 2025.

    So how Conversational AI will rescue your Optician Practice from such a crisis?

    Better Patient Experience at a lower cost

    Staffing a 24x7x365 your optician practice with human agents can be costly or impossible. When you add the resources required to support multiple lines of tasks and languages, it increases the headcount and skill sets required to serve patients around the clock. But with Conversational AI-powered receptionists you will reduce the number of front-desk staff required on your practice due to the repetitive nature of routine calls. All of these lead to significant cost savings.

    Personalization

    Your optician practice can collect customer data to deliver an unrivaled level of personalization to the patients. This can range from simple lens or glasses recommendations based on past purchases, to eye tests in real-time.

    Personalization can greatly improve the patient experience, promote satisfaction, improve conversion to new patients, and drive business growth. Conversational AI can also help your staff at practice to have context to understand who they are talking to. Understanding their past consultation history, their purchase history , and what their experiences have been so far with your practice you will be well equipped to provide the best possible patient experience, tailored to your patient’ needs.

    Self-Service Options

    AI driven phone assistant are 3 times more efficient than a human assistant

    The majority of Millennials who call optician practices avoid situations, which typically require a human interaction and long wait times and prefer to have self-service options instead. These tech-savvy Millennials prefer to book their own appointments, solve their own queries, either on a website, AI driven chat or AI driven phone call. Deploying Conversational AI solutions into your phone service can help these patients stay away from call waiting frustration.

    No missed calls and more conversions

    In addition to helping you elevate experience for current patients, Conversational AI solutions can act as an asset to your optician practice front desk and help with capturing new patients and miss no calls. With Conversational AI powered virtual receptionists at your front desk, your practice can respond to patients so quickly that they will continue to schedule an appointment with you and visit you as a potential customer.

    Conversational AI will help you reach more leads quickly and efficiently. Some practices already use solutions for live chat on their website or on their Facebook business page to easily interact with patients and new leads — these AI platforms simply just allow you to take that patient engagement offering to the next step.

    Introducing Swifter AI

    As a Conversational AI platform , Swifter.AI has foresaw the inevitable integration of conversational AI and Big Data into healthcare and optician practices and offers conversational AI-powered virtual receptionists that would decrease call wait times, reduce costs and enhance patients experience.

    If you are looking for a Conversational AI solution that could transform your optician practice in terms of patients experience and engagement? We can help. Contact us today!

    Request a demo to explore how Swifter AI can help transform your healthcare operations and enhance patient engagement with Conversational AI.

    Our 24/7 AI assistant is available over web chat, on Facebook Messenger™ or over the phone +44 (0) 1256588165.

    https://swifter.ai

    Don’t forget to give us your 👏 !


    Conversational AI for Opticians was originally published in Chatbots Life on Medium, where people are continuing the conversation by highlighting and responding to this story.

  • Adaptive chatbot dialogs

    Using machine learning

    Building a chatbot initially seems quite simple. The internet is full of examples, and it’s easy to put something together. In the real (i.e. production) world, life is more complicated.

    Computer programmers make assumptions about user behavior. We establish the invariants of the system and enforce them through UIs, validation rules and error handling. Life is predictable. Unfortunately chatbots, like all bots, should behave like humans, not computer systems.

    We expect chatbots to handle whatever is thrown at them. In this post I’m going to cover the things we need to think about when building a production grade chatbot. In particular, I’m going to explain why we need to build adaptive dialogs.

    The concepts in this post apply to all major chatbot engines (Rasa, Google Dialogflow, Amazon Lex etc).

    Intents and dialog flows

    Most chatbots rely on pre-scripted dialog flows, built to meet a specific goal. Let’s take a simple example:

    Bot:  how can I help?
    User: I need a duplicate bank statement
    Bot: ok which year?
    User: 2020
    Bot: which month?
    User: may

    This simple example can be served using the classic intent to dialog mapping. In this scenario, the initial phrase “I need a bank statement” triggers a pre scripted dialog. The dialog has two turns/slots, prompting for the month and year.

    Dynamic slot filling

    Even this example is not quite as simple as it seems. What happens if the conversation goes like this:

    Bot:  how can I help?
    User: I need a duplicate bank statement for may 2020
    Bot: ok which year?
    User: i just told you

    If we now ask the user which month and year we look stupid. The dialog flow needs to adapt. The most common solution to this is to use a combination of Named Entity Recognition and slot filling. In this case we need to fill two “slots” — month and year. First we map the slots to prompts:

    year ➞ what year?
    month ➞ which month?

    Next we perform Named Entity Recognition (NER) on the user’s text, trying to fill both slots. In the example above, “bank statement” triggers the dialog and NER fills the year and month slots. “what year?” and “which month?” will not be asked.

    Trending Bot Articles:

    1. Chatbot Trends Report 2021

    2. 4 DO’s and 3 DON’Ts for Training a Chatbot NLP Model

    3. Concierge Bot: Handle Multiple Chatbots from One Chat Screen

    4. An expert system: Conversational AI Vs Chatbots

    Part of Speech Tagging & Dependency Parsing

    So far so good. What happens if the conversation goes like this:

    Bot:  how can I help?
    User: I need a duplicate bank for the last month
    Bot: ok which year?
    User: this year of course

    This becomes more difficult. Named Entity Recognition is unlikely to work for “the last month”. We could explicitly train the NER model for this scenario, but it’s likely to be brittle. We need another approach. One approach is to first attempt NER and if this fails, fall back to Part of Speech tagging and Dependency Parsing.

    Part of Speech (POS) tagging tells us that “bank”, “statement” and “month” are nouns. Dependency parsing tells us that”bank” and “statement” form a compound noun; “last” qualifies “month” and “bank statement” is the object of preposition to “month”. If we put all this together we can understand the users intent:

    Part of Speech tagging and Dependency Parsing is much more complex than simple NER, but it’s also a lot more flexible.

    Capturing the right data

    Let’s take another example, this time retail. Imagine we run a clothing store, and we want to recommend products to our customers. First we ask the user some questions to understand their wants. For this example we will assume we need to fill these “slots”:

    1. product
    2. style
    3. brand
    4. fabric
    5. colour
    6. size
    7. price

    We can use a combination of Named Entity Recognition, Part of Speech tagging and Dependency Parsing to fill these slots. Hopefully system is smart enough to adapt, filing more than one slot at a time.

    “I want a black dress in size 8”

    In the above example we don’t need to ask for the product, colour or size, but we still need to ask 4 additional questions.

    The risk of over qualifying the need

    Do we really need to capture 7 pieces of information before displaying some results? We run two risks:

    1. We may force the user to be so specific that we can’t actually find any matches in our database.
    2. The dialog may be so long that the user gets bored and gives up.

    The risk of under qualifying the need

    Maybe we decide to focus on the attributes/slots that we absolutely need. Perhaps product type, price and size. After all, there’s not much point offering someone something they can’t afford or won’t fit.

    However, we have to ask ourselves what value are we adding? A simple faceted search on the e-commerce site would achieve the same results. We also run the risk of under qualifying the need. For example, if the user asks for a dress costing less than £500, we may find hundreds of matches.

    Striking the balance

    Ideally we want to achieve three goals:

    1. Meet the user’s needs
    2. Offer real value, beyond that which is achievable through other means (e.g. a website)
    3. Stimulate and retain the user’s interest (AIDA)

    The first and second goals could be achieved using a rules based approach with short-circuiting. We ask the user questions, whilst checking our database for matches. When we are able to offer “enough” results we stop asking questions and move onto displaying the results.

    The third goal is not so easy to achieve. We could also use a rules based approach, maybe limiting the attributes to 3 for product one, 4 for product two etc. This is guesswork though. In reality the user’s attention span will be dictated by many factors including:

    • the intent / need
    • the time of the day
    • the device used
    • new vs repeat/loyal customer

    Using machine learning to drive the dialog flow

    Machine learning can help us here. During a “training” period we build the dialogs dynamically, trying different permutations of slots. Like split A/B testing on steroids. We record everything, including the time of day, drop off rate, conversions etc. This behavioural data can be used to build a machine learning model. This could be a simple regression model or something more sophisticated like a decision tree or ensemble model.

    When we have a good model, we can plug it into our dialogs. We feed the same variables (product, device, time etc) into the model and ask it to predict which slots should be filled. This can of course be supplemented by a rules based algorithm. The end result is dynamic dialog flow, which is statistically proven to generate the best results.

    We used retail e-commerce as an example, but this concept can be applied to any domain. Going back to our original banking example, we could ask the user if they want a paper or electronic statement? do they want a certified copy? etc. A machine learning model could predict which questions to ask to get the best results.

    Summary

    At a minimum our dialog flow should be smart enough to avoid asking redundant questions. We do this by filling multiple slots from each user response. We only prompt users for unfilled slots. Named Entity Recognition may not be enough. We may also need to also employ Part of Speech and Dependency Parsing for more complex concepts.

    Finally, we need to think carefully about the information we capture from our users. If we ask for too little, we may be unable to offer any value. If we ask for too much we may lose their interest or struggle to return a result. We can use machine learning models to build dialog flows dynamically, delivering the best results for each individual user.

    Don’t forget to give us your 👏 !


    Adaptive chatbot dialogs was originally published in Chatbots Life on Medium, where people are continuing the conversation by highlighting and responding to this story.

  • Chatbot best practices

    KPIs, NLP training, validation & more

    Anyone can build a chatbot. Most chatbot libraries have reasonable documentation, and the ubiquitous “hello world” bot is simple to develop. As with most things though, building an enterprise grade chatbot is far from trivial. In this post I’m going to share with you 10 tips we’ve learned through our own experience.

    This is not a post about Google Dialogflow, Rasa or any specific chatbot framework. It’s about the application of technology, the development process and measuring success. As such it’s most suitable for product owners, architects and project managers who are tasked with implementing a chatbot.

    1. Know (and measure) your KPIs

    I’m stating the obvious here, but it’s really important to know what you want to achieve, and how this can be measured. Many of your KPIs will be sector or domain specific, but I will give you some chatbot specific KPIs to think about. Listed in order of importance:

    User feedback — Ask your users if they are satisfied. This can be done during the dialog flow or at the end. Asking for feedback will give you two KPIs:

    • Feedback rate — the percentage of users who provided feedback.
    • Satisfaction rate — the percentage of those users who were satisfied. I generally recommend offering a binary choice “satisfied” vs “not satisfied” instead of a rating from 1 to 5, but the choice is yours.

    Bounce rate — The percentage of users who abandon conversations midway.

    Self service rate — The percentage of users who were able to achieve their goal without needing to chat, phone or email a human agent.

    Return rate — The percentage of users who return to use the chatbot again.

    Hourly usage distribution — When are people using your bot? A bot that serves customers 24/7 is especially valuable as it’s usually prohibitively expensive to provide human cover 24/7.

    There are also a couple of technical KPIs to think about:

    Model accuracy — If you are using natural language understanding to understand messages you will need to measure the accuracy of your models. This is a complex topic and is best left to data scientists and experienced developers. One word of caution — don’t get too hung up on the technical measures of accuracy. Ultimately it’s the business KPIs that matter. A model that is 98% accurate is no use if users are dissatisfied with the service.

    Response times — Speed is not so important for a chatbot. You can work around slow performance by adding a “bot is typing” type message to dialogs. Sometimes we even fake a delay to make the bot seem more human. Nevertheless, you want to keep an eye on performance to maintain acceptable response times.

    Finally, it’s important to know which channel your users favour if you deploy an omni-channel chatbot. Being dependent on one third party channel, e.g. Facebook Messenger puts you in a vulnerable position.

    2. Use human agents first

    Like most technology, a bot is designed to automate tasks that would otherwise be done by a human operator. Before embarking on a chatbot it’s essentials that you know exactly what you are trying to automate. The best way of doing this is to first employ human agents to respond to your users’ messages. Why do this?

    To validate assumptions — you (or your product owner) may have established your use cases or user stories, but how valid are they? How many users actually choose live chat to check their order status?

    The 80/20 rule — users will make all sorts of requests. Even for a particular use case, some requests will be so esoteric that it makes little sense to automate. For example — you will most likely want to handle postage and delivery type queries, but does your bot really need to handle queries about VAT on BFPO shipments? probably not.

    To understand the tone of conversations — How do your users interact over live chat? are they friendly or professional, do they use colloquialisms? Do they use emojis and text speak? Understanding the tone of conversations will allow you to develop a chatbot that your users are comfortable using.

    To get training data — This is probably the most important reason why you should use humans first. Even if you’re not planning to use natural language understanding you will still need data for keyword matching. If you are using NLU/NLP you will certainly need good training data. From what we’ve seen, 80% of chatbots fail to meet expectations because they used synthetic training data, or a limited sample of real world data.

    You may already employ human agents to serve your customers. If so, you probably need to tweak the data you log, and the way it’s structured (see below). If you don’t yet employ human agents you can actually do this on a (relatively) small scale.

    You don’t need to serve all your customers manually before switching to a chatbot. What you’re after is a representative sample. For example, you may display a “live chat now” button for one in 10 visitors.

    Trending Bot Articles:

    1. Chatbot Trends Report 2021

    2. 4 DO’s and 3 DON’Ts for Training a Chatbot NLP Model

    3. Concierge Bot: Handle Multiple Chatbots from One Chat Screen

    4. An expert system: Conversational AI Vs Chatbots

    3. Log (almost) everything

    Ok, you need to be mindful of GDPR, so you can’t log everything. For your purposes we don’t actually need personally identifiable information. What you’re after is the phrases users use. In particular, you’re interested in:

    1. intents —“i want to check my order status”. You can map intents to use cases/user stories.
    2. entities — yes, a jacket. Entities (relevant nouns) form the basis of named entity recognition
    3. parts of speech — “I want a black or white dress”. The adjectives, prepositions and conjunctions. You will use these to train your part of speech tagging models.
    4. sentiment — I’m not happy” or “thanks for your help”. You can use text classification and sentimental analysis to detect when users are satisfied or dissatisfied.

    Ideally you will log conversations in a freeform database, something like elasticsearch would be great. It’s important to log not only the messages but the wider context. i.e. you want to tie messages together into a conversation threads and identify the participants (user vs agent). Log the conversations during the initial human pilot phase and also during the full implementation. You’ll want to continually evaluate, refine and improve.

    You should also log key events such as clicks and conversions and along with metadata such as timestamps, device used, ip address etc. Just careful that you don’t breach GDPR via jigsaw identification

    4. Make the most of your training data

    If you’ve followed our first piece of advice, you should have some decent training data. Now it’s time to put it to use.

    You may want to split the conversations into 3 parts:

    1. intro — the first couple of messages e.g. “I want to check my order status”. Useful for intent and entity analysis
    2. body — e.g. “last Monday”. These messages may contain additional entities
    3. sign-off — last couple of messages e.g. “thanks for your help”. Useful for sentimental analysis

    Next, apply clustering on the intro messages to identify common intents and entities. Following the 80/20 rule this will tell you where to focus your efforts.

    Finally, use the data to train and test your NLU models or keyword matching algorithms. Take care when splitting the training and test datasets.

    As mentioned in the first section, you may also want to analyse the data to understand the tone of the conversations. This will be useful when thinking how to word the questions your bot will ask.

    5. Think about validation and error handling

    Experienced IT professionals think carefully about validation and error handling when building apps or websites. You can usually rely on the UI to help enforce constraints. For example, by using a dropdown select box with the valid options. The challenge arises when trying to enforce the same constraints in a chatbot.

    Quick replies

    Some channels offer quick replies— prefilled responses which can act as a replacement for select dropdowns, radio buttons and checkboxes. Quick replies can be used as a means of constraining user behaviour, but should be used with care. Unlike dropdown boxes, the options are typically displayed horizontally or vertically and take up valuable screen real estate, especially on mobile devices. This makes them suitable for responses with only a few options.

    In most cases you won’t be able to use quick replies. Even if they are a feasible option, a chatbot with lots of quick replies is nothing more than an app with a poor UI. As the name implies, quick replies should be used to help users respond quickly. They exist to make life easier for users, not developers.

    Message validation

    Free text entry is at the heart of a chatbot. It’s unconstrained, so good validation and error handling is especially important. Remember — whilst your NLU model may correctly identify an entity, this doesn’t mean your downstream systems can handle it. 100 pounds or last monday are examples of entities that an NER model will probably recognise, but need transforming for downstream consumption.

    6. Think how to handle more than one message

    Here’s the typical chatbot flow:

    • Ask question
    • Process reply

    The problem arises when your users don’t send a single message in reply to the question but several. Let’s take this simple example of a dialog between a customer and a human agent:

    Agent: hello how can i help?
    User: hi
    User: i want to check my order status
    User: order A123

    Now let’s see how this might look with a naive bot:

    Bot:  hello how can i help?
    User: hi
    Bot: Sorry i dont understand
    User: i want to check my order status
    User: order A123

    The bot asks the user a question, then tries to infer intent from the reply “hi”. It can’t make sense of this, so generates an error. There are a few workarounds:

    Support chit chat

    Basically you train the chatbot to recognise “chit chat” type messages, which it can either reply to or simply ignore. Taking the example above, the bot would either ignore the “hi” or reply with “hello”. Either way, it wouldn’t generate an error.

    Buffer incoming messages

    Buffer all incoming messages. Wait until N seconds have elapsed since the last message. At this point concatenate all the buffered messages together into a single message and process it. Taking the above example it would look like:

    Bot:  hello how can i help?
    User: hi
    User: i want to check my order status
    User: order A123
    (wait N seconds)
    Bot: Ok …

    If the channel allows, you may be able to monitor the “user is typing” notification instead, setting N to a lower value. The downside to this approach is that the user always has to wait N seconds for a response which makes the bot seem unresponsive.

    Buffer but short circuit

    The same approach as described above, but instead of always waiting N seconds, you try to process the message buffer every time a message is received. If you can process it, you do so immediately, avoiding delay. Going back to the contrived dialog it would look something like:

    Bot:  hello how can i help?
    User: hi
    (can’t process — wait)
    User: i want to check my order status
    (bingo)
    Bot: Ok what is your order number?

    7. Use checkpoints

    As well as validating each user response, you will want to set up various “checkpoints”. This means telling the user what the bot has understood and asking them to confirm this. For example saying something like:

    “I understand you want to check the status of order number A123”

    Of course, you need to think carefully about how you will handle a negative response. Simply repeating the same questions again and running the answers through the same NLU model or algorithm is unlikely to work. Many chatbots ask the user to rephrase their request in the hope that it will work second time around. We think this is a poor strategy — there’s no guarantee it will work, and it’s a poor user experience.

    We believe there are two approaches that will yield better results:

    Drill down

    We call the first strategy the “drill down” approach. Start out by asking users open questions e.g. “how can I help?” or “what are you looking for?”. Run the responses through the NLU models and algorithms and checkpoint the conversation.

    If all is ok, great! If not, you move on to ask more specific, closed questions — probably with some guidance. For example “do you have a query about a return?” You will probably use a different set of NLU models or algorithms to parse these closed questions.

    You wouldn’t want to start out by asking this sort of question, because closed questions result in a lengthy dialog. It’s much better for a user to say “I want a white dress in size 12” than answering multiple questions about the product, colour and size. The aim here is to gracefully handle the outliers that can’t be served via the happy path.

    Bailout

    We call the second approach the “bailout”. Put simply if you can’t understand the user’s needs you fall back to human intervention. See below for more details.

    8. Augment your chatbot with human agents

    What can you do with the outliers? Firstly it’s important the system recognises when it’s failing to meet the user’s expectations. For your users, there’s nothing worse than talking to brick wall. One way of detecting this is to count the number of “sorry I don’t understand” type responses generated for each dialog. As mentioned above, checkpointing is also very important.

    You can’t expect your chatbot to be perfect, and it doesn’t have to be. There will be cases where the chatbot doesn’t understand the user due to an imperfect NLU model or algorithm. There will be instances where the bot simply lacks the business logic to fulfil the users request.

    Providing a fallback or “bailout” to human agents is a great way of handling these edge cases. You’re not trying to create the perfect chatbot, even if such a thing were possible. You’re aiming to get the best return on your investment. These esoteric edge cases can be handled by a relatively small pool of human agents. What’s more, the conversations between the users and agents should be logged and will feed into your continuous improvement plan.

    You don’t necessarily need to offer live chat style support either. It may be enough to ask the user to email your sales or customer service team with their request.

    9. Adopt a continuous improvement plan

    The reason you’re logging the conversations is to build up training data, allowing you to build accurate models. To borrow a cliché — this is a process not an event. Whilst the data captured during the initial “human” stage gets you started, you need to retrain the models as you collect more data.

    You may discover that your users interact quite differently with your bot vs human agents. Decades of Googling have conditioned people into using a terse form of language. Language intended to help the system understand their query. For example a user may tell a human agent “a white or cream cotton shirt” but tell the bot simply “cotton shirt white”.

    It’s also important to keep an eye on the KPIs and metrics.

    10. Look for opportunities

    Chatbots are freeform, users can say whatever they like. This presents challenges but also opportunities. Chatbots are great for market research.

    Take for example, an e-commerce site for a clothing merchant. While viewing a dress the user can choose the colour: red or white. How can the user give feedback that they would like the same dress in black? They could fill out a feedback form or send an email, but they’re unlikely to do this. More likely they will look for another dress or choose another merchant.

    In contrast, an e-commerce bot could ask “what colour?” to which the user will reply “black”. The bot would tell the user that the dress is only available in red and white. However, it can suggest a similar dress that’s available in black. Crucially the bot has captured the demand for a black version of the dress. If enough users ask for black, the buyers may decide its worth offering it next season.

    Summary

    Implementing an enterprise grade chatbot requires careful planning. It’s important to understand the KPIs and business drivers before embarking on the project. Having a means of measuring success is also really important.

    Getting suitable training data is essential and one of the best ways of doing this is to use human agents first. Careful logging and monitoring will allow you to improve the accuracy of your chatbot over time. As with all software applications, validation and error handling is very important. Chatbots have the potential to misunderstand users, so checkpointing is a useful double check.

    Be prepared to adapt and evolve quickly, especially during the early days. Use A/B testing to find the dialog flows that work best. Retrain the NLU models as you collect more training data. Look for opportunities — are users asking for use cases you’ve missed? Is there demand for a product or variant you’re not yet selling.

    Don’t forget to give us your 👏 !


    Chatbot best practices was originally published in Chatbots Life on Medium, where people are continuing the conversation by highlighting and responding to this story.