DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
  1. DZone
  2. Data Engineering
  3. Databases
  4. Most Common Mistakes to Avoid When Building a Chatbot

Most Common Mistakes to Avoid When Building a Chatbot

Explore some of the most common mistakes to avoid when building a chatbot.

Paul Pinard user avatar by
Paul Pinard
·
Apr. 22, 19 · Opinion
Like (3)
Save
Tweet
Share
5.94K Views

Join the DZone community and get the full member experience.

Join For Free

Building a bot is a rewarding experience: creating your own artificial intelligence is amazing! However, it can be a challenge, and there are mistakes to avoid. In this piece, we’re going to walk you through the most common or damaging mistakes new bot builders make in each phase of bot building: conception, training, building, connection, user experience, and maintenance. Let’s roll!

Conception

Building a bot doesn’t start at the first line of code. It starts much earlier, during the conception.

During that first step, it’s important to define the use case of your chatbot. What is the problem you want it to solve? What are your business needs? We often see people saying, “I want a bot that does this,” but when we dig deeper, we realize a different bot would actually fix the issue much more efficiently. If you want to build a chatbot that manages customers’ questions on return policies, but later realize that these queries are less than 2 percent of your global volume, you might want to switch to another topic. So, start with the business problem and build from there.

Now that you’ve established the real-life business need, how should the bot conversation flow solve it? What we usually do is take out a drawing board and draw all the conversation flows from start to finish. Modeling all possibilities allows you to make sure every topic is covered and gives the developer a good overview of what needs to be done. It is also the first step of creating your user experience, which we’ll talk about later. For now, simply keep in mind that each conversation should be about 3 or 4 exchanges, no more.

During this step, remember your audience: who are the end-users that will be talking to your bot? You have to make something that works for them.

Do not forget to include small talk in your conception. All chatbots are expected to understand and reply to a number of topics unrelated to their mission: jokes, weather questions, “How are you doing,” and even remarks like, “Will you marry me,” or other stuff. Be sure to plan for those if you want the user to be satisfied with the experience.

What not to do when building a bot:

  • Disregard it as a non-important step
  • Start from what you want and not from what you need
  • Incorrectly understand who the final users of the bot will be and design an experience they won’t appreciate
  • Not include small talk and other commonly asked questions

Training

Training the bot is the most important factor in determining its performance. Bad training will inevitably lead to a poor performing chatbot and frustrated users.

Based on the flow you’ve created during conception, training consists of creating intents and filling them with expressions. If you’re not comfortable with the concept of intents and expressions, this article should help you. But here are some things that make for good training.

The number of expressions in each intent is crucial. Five doesn’t cut it, you should go for 50+. SAP Conversational AI works very well on small datasets, but we still need a bit of information. These sentences should be varied and should come from end users. Never train your bot only with the development and project team: they know the technical slang too well to accurately represent the people that will actually use the bot.

bad training example for building a bot

Tagging entities has a few rules as well. Entities are keywords that you need to detect in a sentence to extract information (the key point here being “to extract information”). You don’t need to tag every noun, adjective or word per sentence just because you can! The point of entities is to extract relevant information that you can use in your code. Only tag those. However, avoid having sentences that are only made of one word that is an entity (e.g. “Paris” as a complete sentence). This entity can be detected by any intent, which can lead to detection issues.

bad tagging example for building a botA common best practice for big bots is to use intents and entities hand-in-hand. It is better to create a global intent and use entities to specify the user request than create very specific intents that the classifier will confuse as they overlap.

entities explanation when building a bot

Here, the global intent is troubleshooting, but entities detect which product isn’t functioning.

What not to do when building a bot:

  • Have less than 50 expressions per intent
  • Train your bot by people who are not the end-user
  • Tag every word in a sentence as an entity
  • Tag words as entities when you don’t use the extracted information
  • Have expressions that are only entities (i.e “Paris”)
  • Create very specific intents instead of using entities to understand the topic

Building

Building a bot is often assumed to just building the conversation flow. It is the fun part! It’s when everything comes to life. However, it can be a scary process.

The first thing to understand is that it’s okay to use multiple skills to complete one task. One skill doesn’t have to equal one full process. It can be a good solution to create one “mega-skill” whose job is to dispatch the user input to the correct skill.

Skills when building a bot

In our troubleshooting (ts) example, a mega-skill redirects to the different skills that manage the specific procedures.

That is also a solution if you have skills with triggers that overlap each other. And if something doesn’t work, be sure to use the logs in the debug console to understand where the problem is coming from.

What not to do when building a bot:

  • Insist on the “one skill = one task” philosophy
  • Not leverage the debugging tools of the platform

Connecting and User Experience

When connecting your bot, you have to decide where it is going to be available to your users, and therefore, work on user experience. There are a few things to know in order to provide an enjoyable UX, the first one being: your bot has to look pretty. An attractive bot with plenty of buttons, graphic elements, HD pictures, colors, and a good personality makes all the difference. But how do you get that?

First, think of your audience when you choose your channel. If you’re targeting the 50 to 65 age demographics, you’re probably not going to put your bot on Kik! Don’t try to attract your audience to a channel they don’t use even if it’s better. Instead, integrate the bot where your users already are.

Then, keep in mind that a chatbot is a conversational interface. Conversations are interactive exchanges; therefore, your bot should never reply with long-winded blocks of texts (more than 60 characters is getting long). Separate replies into different messages, use images, buttons, lists, and other UX components based on the channel you use to make it lively. It’s also important to create a rewarding conversation: your bot isn’t an FBI agent. Nobody wants to be asked 20 questions before getting an answer. Instead, create your flow and UX to provide an answer every 3 or 4 exchanges to keep the user engaged.

Since we provide a powerful natural language processing API with our bot building tool, our users tend to want to do everything through language. While that’s admirable, we still advise you to diversify: offer cards, buttons, and other graphic elements for interactivity and ease of use, but still make sure the entire flow can be done using natural language. That’s when users know your bot is the real deal.

Giving a personality to your chatbot is essential, however, you have to find the right balance. We always advise to let your users know they’re talking to a bot. It’s simply expectation management! A human talking to another human is going to expect the highest level of interaction, whereas a human talking to a bot is going to know that they can’t ask about anything and everything. However, don’t make it too robotic: give it a name, an image, and use smiley faces and tone of voice to make it memorable.

What not to do when building a bot:

  • misidentify the channel your audience is using
  • create conversations where the user has to answer 4+ questions to get the first answer
  • send blocks of texts as replies (more than 60 characters is too much)
  • discard all UX elements (buttons, cards, lists, etc) just to focus on text
  • pass your bot as a human person
  • not giving your bot a personality that attracts your audience

Maintenance

Once your bot is in production, your job is not done! Maintaining your bot is an essential part of its long-lasting success. That mainly consists of fine-tuning your training and monitoring what your users are saying to adapt your flow or create new use cases.

When training, proceed with caution. While it is important to add new user sentences via the log feed, you do not want to unbalance the training you’ve created that already works. Don’t swamp your intents by adding all the new expressions, only add what’s necessary. Keep in mind that all intents have to be trained the same amount! If one intent has 100 expressions and the other has 10, that’s no good. Therefore, check regularly when assigning new expressions.

Finally, your log feed is the place where you can see what users are talking about. Do you see a topic that your users are raising frequently that your bot doesn’t yet manage? Why not integrate it into your flow? That’s the best way to show your community that the bot they’re using is always striving to provide a great experience.

What not to do when building a bot:

  • think that once the bot is in production, your job is done
  • overflow intents with new user expression and mess up your existing training
  • create inequalities in your intent size
  • not pay attention to how people are using your bot

With all this in mind, you are fully on board to build your first kick-ass bot! If you’re ready to go further, this step-by-step tutorial can guide you through the actual process.

Happy building!

Chatbot Intent (military) Database Flow (web browser)

Published at DZone with permission of Paul Pinard. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • gRPC on the Client Side
  • Container Security: Don't Let Your Guard Down
  • 11 Observability Tools You Should Know
  • Steel Threads Are a Technique That Will Make You a Better Engineer

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: