Bot Development

How to Write Engaging Dialogue for Your Chatbot

Effective chatbots communicate with natural, convincing dialogue. Learn some great steps for writing a chatbot dialogue that enables your bot to help users.

January 8, 2019

Whenever we communicate, we’re expressing a need, thought, or sentiment. When we use language to convey those ideas, we’re engaging in conversation. And the foundation of a meaningful conversation is meaningful dialogue.

This is just as true with chatbots as it is with humans. After all, every chatbot developer knows what happens when a bot fails to engage users through conversation—those users abandon the bot and go elsewhere for the information or experience they’re seeking. The good news? Chatbot dialogue isn’t an ill-defined, fingers-crossed-it-works exercise. There are specific steps you can take and guidelines you can follow to help you get it right.

If you’re struggling to figure out how to write dialogue for your chatbot, the following tips can serve as an official cheat sheet. By applying them to your own chatbot, you can optimize the quality of conversations between your bot and your users.

Know your personas—and write for them

To get an insider’s perspective on chatbot dialogue, we caught up with our friend Arte Merritt, co-founder and CEO of Dashbot. Arte is in the business of analyzing bot performance to determine what is (and isn’t) working, so he knows a thing or two about dialogue and its impact on conversations between humans and bots.

“People treat bots much like they treat their friends,” Arte said. When it comes to navigating conversations, this means that your bot could be expected to respond to informal language. Social cues, images, emojis, slang—the more of these that your bot can understand, the better its conversations can be. It’s all about hashing out your user personas and knowing how those personas communicate.

Many organizations are making significant investments in persona-centered chatbot dialogue. At Facebook, Messenger bots are poised to begin communicating with users through multiple personalities. Developers can add various personas to bots in an effort to help those bots deliver effective dialogue for different use cases.

If you’re developing a bot, you’ve probably created one or more personas to represent your users, their goals, and their triggers. A key issue with any persona is what your bot needs to say to meet their needs. One persona will have different concerns from another persona, which is why your chatbot script should include precisely the information that each persona is seeking.

But it’s not just about what you say—it’s also about how you say it. Everything from tone to word choice to capitalization (or lack of it) can have an impact. If you’re agonizing over how to punctuate dialogue for a persona, you’re not being nitpicky—it’s an important problem to solve. After all, your bot needs to provide information in a manner that considers your users’ preferred communication styles.

Consider a bot for which one user persona is a 15-year-old male video game enthusiast, and another is a 43-year-old female senior-level manager. Formal, expertly punctuated dialogue might work for both personas, but emoji-laden responses with erroneously lowercased letters could be even more effective for one of them.

Part of getting serious about personas is focusing on writing for them, which almost always means creating unique dialogue for different personas. Be sure you’re enabling a conversation that feels fresh and expressive to every user, even when you’re answering the same fundamental questions.

Include all basic dialogue functions

Speaking of fundamental questions, remember to cover the basics in your dialogue. Simple salutations, common courtesies, and straightforward affirmations (such as hi, thanks, help, and OK) may seem like banal bits of chitchat, but they’re also among the most common messages sent to chatbots.

According to Arte, around 50 percent of all chatbots struggle to respond adequately to these simple messages. Once, someone at a meetup asked Arte to critique a bot. When Arte pulled up the bot, the very first thing he typed was hi. The bot’s response: I have no idea what you’re asking.

“Just say hi and hello,” Arte advises. “It can be like any other conversation.”

Chatbots need ready replies to these basic user messages, and each reply needs to fit the context. For instance, a bot that always responds to OK with something positive and self-affirming, like, “I’m glad that makes sense,” might not be effective in situations in which a user isn’t completely satisfied or when a user is responding to instructions:

Bot: In the menu, click Knowledge Center.

User: OK.

Bot: I’m glad that makes sense.

User: So what do I do next?

Here, the user hasn’t affirmed an understanding of anything. OK is merely an indicator that the user is ready for the next step.

Emojis are a crucial chatbot dialogue function

In conversations with bots, emojis are just as prevalent—if not more so—as such pleasantries as hello and thanks. According to research performed by Dashbot, the “thumbs up” emoji is one of the single most common messages that users send to bots.

Arte remembers a bot he once analyzed, a fast-food ordering bot, and how its inability to recognize emojis killed the user experience. “The behavior flow report showed abandonment all over the place,” he said. “We went in to look at it, and it was the ‘thumbs up’ emoji. The bot broke whenever someone used it.”

In this case, the user would get all the way through the ordering process. They’d get excited about the food they were getting and send the bot an emoji indicating their satisfaction. That’s when the bot would get confused, fail to deliver the order, and inconvenience users rather than satisfy them.

Imagine a dialogue where your bot doesn’t understand emojis:

User: ☹️

Bot: Sorry, I don’t understand that.

User: 😠

Bot: I’m having trouble understanding.

User: 👎

Bot: Please call support at 555-555-5555.

This kind of experience will surely frustrate your users, regardless of what they’re trying to achieve. As you consider how to write dialogue for your personas, pay careful attention to their probable use of emojis as responses, affirmations, or even greetings.

Brevity is your friend

Imagine your air conditioner stopped working in the middle of July. It’s 90 degrees outside. Your house is getting hotter and hotter.

Right away, you call your local HVAC outfit and request emergency service. A technician arrives. After inspecting your air conditioner, he launches into a monologue about float switches, drain line clogs, and automatic shutoff features. “OK,” you groan, as he concludes the lecture. “But can you make the AC blow cold air again?”

When a contractor tasked with fixing something in your home has a lot to say, you don’t have much choice but to sit and listen. But when a chatbot hits a user with unexpected (and likely unwelcome) verbosity, well, it’s pretty easy to stop the bot. And that’s exactly what users will do.

As Arte explains it, people just seem to prefer quick answers. If you summon Alexa and ask her to tell you about Dashbot, any response longer than five seconds seems like too much. In his testing, most users tell the bot to stop at that point. Analytics can show you how long is too long for any given instance.

The solution, of course, is to just keep the conversation brief. More likely than not, users are engaging your bot to solve a specific problem. The faster your bot helps them solve it, the better. Short, straightforward dialogue can get you there.

It’s tempting to go the other way. When you’re considering how to write a bot—especially a bot that solves a technical problem—it’s easy to fall into the trap of talking to users the way you talk to other developers. But that’s rarely in your users’ best interest.

So keep it simple. Keep it short. Keep it focused. Less dialogue really is more.

Aim for a natural conversation flow

If you forget everything else we’ve covered about personas, basic language, emojis, and brevity, remember this: make your dialogue natural.

By focusing on a natural flow, you might solve the other problems, too. After all, a chatbot that engages in an organic, believable conversation should be a bot that uses persona-appropriate language and provides proper responses to emojis. Naturalness is almost a catch-all solution for writing engaging dialogue.

Let’s say you’re having a problem finding your stored billing information on a retailer’s website. You might engage with a bot, like this:

You: Where can I find my billing info?

Bot: Billing information is in the Accounts tab.

That feels pretty natural. But what if your interaction was more like this:

You: Show me my billing details.

Bot: Billing information is in the Accounts tab.

It’s the same response as before, but the conversation feels far less natural. It’s almost as if you’re addressing the bot as a subordinate, and the bot is responding with impudence.

To avoid this problem, anticipate the different ways your audience engages with your bot. Will they give affirmative commands or ask questions? Can you use the same responses for each type of request, or do you need to differentiate responses? As you ask yourself these questions, remember Arte’s assertion that people tend to treat their bots like their friends. And if you’re trying to improve conversational flow for an existing bot, look through the bot’s chat history to get a sense of how your users interact with it.

In the end, your dialogue can and should feel natural, no matter what your bot is helping users to achieve. They’ll leave the interaction feeling like they had a good conversation. And you can bet they’ll be back for another one.