Best practices for chatbot development
Ask ChatGPT about its own origin and it will head you right toward ELIZA, the brainchild of Joseph Weizenbaum, an MIT computer scientist. He aimed to make ELIZA a Rogerian-style psychotherapist — the kind of therapist who says things like, “How did that make you feel?” and “Tell me more about that” but lets the client do most of the talking. ELIZA was just simple code, but she created the illusion that she was actually listening . . . and cared.
From there, it was a relatively short leap, at least conceptually if not in terms of decades, to seemingly compassionate business-customer communications: Online chatbots became integral to customer service.
Then came the giant leap forward: After the introduction of artificial intelligence (AI) and natural language processing, bots evolved from being just conversational tools that couldn’t do much more than simulate a simple human dialogue to smart digital assistants that can personalize user experience (e.g., recognize that a user is a 60-year-old man who prefers running to golf and therefore provide information relevant to running rather than golf), collect essential data (e.g., identify that users tend to look for information on your product at a particular time of day), and build brand awareness (e.g., a bot that’s not only helpful but brightens the user’s day with a sunny personality).
Needless to say, today’s AI bot is a far cry from ELIZA’s “Tell me more.”
What started nearly 60 years ago as more-or-less a social experiment is now big business: According to Statista, the global chatbot market revenue is projected to reach $454.8 million in 2027. Meanwhile, Gartner predicts that human contact center agents will be replaced by bots more and more, to the tune of $80 billion labor savings by 2026. Add in the benefits a customer gets (bots work on weekends!), and we’ve basically got a revolution in customer service on our hands.
For many businesses, chatbots are quickly becoming more than a nice-to-have. Customers are coming to expect chatbots when they interact with a business, so it’s worth getting a basic understanding of chatbot technologies and then rolling up your sleeves to start building.
Understand your customers’ pain points
The main reason you develop a chatbot for your business is to engage more potential customers, expand your customer base, and be more profitable, right?
But before you get to the engagement part and the profit part, you need to know who the customer is and what their most critical problem is in relation to you. Knowing what frustrates them the most will help you figure out what features your chatbot should have to head off those frustrations.
If, say, you have an ecommerce website and you alienate customers by not having the capacity to handle a high load of customer requests, consider developing a list of frequently asked questions and possible responses and implement them in your chatbot. A bot can explain how refunds are processed and information about shipments, for example. Offloading this kind of rote, mundane work will save time for your agents and decrease customers’ wait times. (Pro tip: Look through your customer support interactions record to find the most common queries.)
Remember that a customer’s pain point might arise in any number of ways during their journey. It might be a frustration specific to your brand, products, or features, like an item they’ve selected isn’t showing up in their cart or the size they want is out of stock, or it can be a more general issue, like they’re shopping for a baseball mitt and they’re simply overwhelmed by hundreds of options. A bot can problem-solve and gather data along the way.
Find your chatbot type
OK, now that you’ve figured out your chatbot’s raison d’etre, do your homework on types of chatbots. Your two main options? Rule-based and AI-based.
If you’re building a FAQ or customer support bot that aims to provide website visitors with predefined answers to common questions or collect user data, a simpler rule-based chatbot will handle the task. A bot that relies on a sound database of responses and well-designed rules can successfully provide customers with helpful answers.
Rules define how a bot will understand a user's intent based on their query, match it with the keywords in the provided list, and find a response in the available dictionary. For example, a chatbot on a fashion retailer’s site could ask a site visitor five questions about their style and then suggest items that they might like. That’s really the same concept as a flowchart.
But if you’re looking for a more advanced solution that could manage something as complex as, say, patient admission and preliminary screening or assessment of the creditworthiness of a customer, your choice should fall on an AI bot. AI-based chatbots can handle more intelligent conversations and have already found wide adoption across various industries, like healthcare, ecommerce, finance, and real estate.
Evaluate your dev options
Now you’re in deep! It’s time to explore the technical nuances of building your digital assistant and decide if you’re going to go with an out-of-the-box chatbot builder or develop a custom chatbot from scratch.
For many businesses, a chatbot builder is a no-brainer: It doesn’t require any coding knowledge and the bot can be up and running in no time. Chatfuel, Botsify, or Dialogflow are chatbot builders that you can use for fairly simple customer interactions, like providing order status, shipping number, or booking an appointment.
There’s a big BUT here, though. An out-of-the-box solution doesn't have AI smarts. If you want a bot that eases the burden in terms of customer support, can cope with more complex tasks, and engages users, opt for a custom solution.
Custom AI bots are complex and require knowledge of frameworks and programming languages, so you’ll need an ace developer — or even an entire team of developers — to help you understand which tools are most suitable. Developers with expertise in artificial intelligence, machine learning, and chatbots can coach you on all the technical details and available instruments so that you get a better grasp of what your dream chatbot might actually be able to do (and say).
Another benefit of working with a chatbot development team? They can maintain your bot after it’s built and optimize it with new features as your budget — and new technologies — allow.
Arrange comprehensive training for your bot
Unlike rule-based chatbots, AI bots need to be taught, and if bots are the students, then Natural language processing (NLP) and natural language understanding (NLU) — two related but different technologies — are the teachers. Natural language processing allows bots to understand the meaning of a text or speech, while natural language understanding uses deep learning to extract meaningful patterns and sentiments from a massive data set. It’s really not so different than, say, a language instructor and a literature instructor: NLP teaches the vocabulary and NLU teaches the deeper meaning.
An AI chatbot needs to understand user intent; to get there, it needs to learn how to use all possible variants of user requests. Chatbots’ AI neural networks can process large amounts of data based on previous conversations and generate more relevant replies as they learn from every user interaction (the essence of machine learning). So, the more data you feed it with, the more accurate responses it will give.
The ultimate goal of bot training is to make user-chatbot communication more human-like. You can use machine learning datasets from third-party sources, like The NPS Chat Corpus, Question-Answer Dataset, or SGD, to train a bot to respond like a human (that’s sort of like borrowing), but you’re better off training a bot based on data from interactions with your own customers. Existing chatbot logs, live chat history, emails, phone transcripts, and support tickets — all of that can be used to train your bot to be conversational in a way that serves your business and reflects your brand.
And let’s not forget the value of user feedback. For example, if you present your users with a follow-up questionnaire at the end of each conversation, you can analyze that data and then optimize your bot accordingly.
Make it clear to the user that they’re talking to a bot!
Even though the goal of training your chatbot is to make it as human-like as possible, that doesn’t mean you should represent it as actually human to your customers.
Surveys indicate that about 60 percent of internet users prefer live customer support over a bot, so they’re going to know when they’re not getting what they prefer.
Honesty is the best policy and knowledge is power: Inform your users that they are talking to a bot straight away. Try having your bot introduce itself from the get-go and list what it can do as soon as the customer starts the conversation.
Consider adding a feature that connects users directly to a human agent so if they really want to skip the bot, they can. Otherwise, implement functionality that automatically redirects the user to a live agent if the bot can’t resolve their problem. Add a message informing users that they’ll be connected to live customer support so they won’t get frustrated and close the chat window (and hate on your brand).
Fold in advanced features to elevate the customer experience
Emojis, GIFs, and other images embedded in the conversation flow can make communication with the chatbot more engaging and even fun, increasing the chances that your customers will stick around. If you build a retail chatbot, CTAs and special offers that promote particular products can drive more conversions and generate more data you can use to train the bot.
If you’re working with customers in different countries or regions, think about implementing multilingual chat support to keep as many users in the fold as you can, even if your website itself is in just one language.
Then there’s integration, which is often the key to saving hours on routine tasks like CRM updates and adjustments to internal workflows. Integrate your bot with other systems like payment gateways. You can also power up your bot with Salesforce integrations so it works in lockstep with products like Salesforce CRM and Marketing Cloud so you can personalize each customer’s experience.
Finally, don’t forget the importance of cybersecurity to building customer trust and keeping you and your customers safe. This is important in any industry, of course, but you need to be super buttoned-up about it if you’re dealing with anything that incorporates fintech (e.g., payments) or processes sensitive medical and health data. (As my fellow writer Jack Foraker shares in an article on cybersecurity challenges in healthcare, to cyber criminals, an individual’s medical records are 50 times more valuable than their credit card data. Yikes.)
Test the bot’s performance
Chatbots need QA and testing, just like any other kind of software. Before you unleash yours, test it with your team members; feeding it queries is the only way you’re going to know if it understands, processes, and replies to user requests the way you want it to.
“Conversational flow” is what you’re aiming for: Confirm that your bot starts with a welcome message, asks an initial question, provides specific answers, asks follow-up questions, gathers all the information it needs, and then gracefully ends the conversation. You’re looking for engaging, tactful, and efficient replies. Messages shouldn’t be too long, either.
Tools like Chatbottertest, Botanalytics, and QBox can help you set up a comprehensive performance testing of your bot and analyze different chatbot testing scenarios, or you can use test automation tools like Botium or Dimon to run chatbot conversation transcripts without human intervention. If you’d rather offload all of the QA and testing, a software development team can take that over, too.
Unleash your bot over multiple channels
Where your target audience hangs out determines where you release your bot. There are, after all, channels other than your website, like Telegram, Facebook Messenger, and WhatsApp, where your customers spend time. With tools like Azure Bot Service, you can configure your bot to work across different environments, so you’re reaching and chatting with your customers wherever they are, but from one consolidated interface on your end.
Monitor with vigilance
We’d all love to live in a world where you can build software, set it free, and never think about it again. Sadly, we’re not there yet. Measuring performance against KPIs and adjusting accordingly is a key part of the chatbot development process.
The main KPIs for measuring bot performance are rooted in engagement, conversions, and retention metrics. Depending on the analytics tools you use, you can track the number of executed interactions, length of conversations, user engagement, chat handoff rate, and the number of leads captured, all of which are critical bits of information when it comes to measuring the effectiveness of your bot.
Again, integrating your chatbot with Salesforce or another CRM is the best way to monitor its performance, so it’s a good idea to build your chatbot with a platform that has built-in analytics tools, complete with advanced features, that you can connect to your CRM.
Weizenbaum, the creator of good ole ELIZA, was concerned about the dangers of AI and its possibly excessive role for humanity in the future — dangers that dangle between the progress that can be achieved with AI power and risk for humans. Each day, the explosion of interest in ChatGPT and its various siblings and the myriad use cases for generative AI (coding! content creation! lead gen! listening podcasts! breakups!) alert us to the technology’s strengths — and highlight its insufficiencies. Your job, as you build and maintain your caring chatbot, is to stay on top of what’s responsible, as well as what’s possible.