What is a chatbot?

Chatbots are computer programs used to simulate conversations with humans. Chatbots have many useful applications, but they can also be used for malicious purposes.

Learning Objectives

After reading this article you will be able to:

  • Define a chatbot
  • Understand the difference between a rules-based chatbot and an AI chatbot
  • Outline beneficial uses for chatbots
  • Understand how chatbots can be used maliciously

Related Content

Want to keep learning?

Subscribe to theNET, Cloudflare's monthly recap of the Internet's most popular insights!

Refer to Cloudflare's Privacy Policy to learn how we collect and process your personal data.

Copy article link

What is a chatbot?

Chatbot with speech bubbles

Chatbots are computer programs designed for interacting with humans in voice or text-based conversation. Chatbots have a number of useful applications, such as personal digital assistants and customer support bots. Unfortunately, chatbots are also used for malicious purposes, such as spreading spam.

How do chatbots work?

In terms of functionality, there are two main types of chatbots: rule-based chatbots and artificial intelligence (AI) chatbots.

Rule-based chatbots

These bots provide responses based on a set of fixed rules created by their designers. These bots typically scan input (the text users type or speak) for keywords and provide responses based on those keywords.

For example, a person could tell a rule-based chatbot, “I’m really excited for the upcoming basketball game.” The bot could respond to keywords such as ‘basketball’ and ‘game’ and then respond with, “Tell me your favorite sports team.”

Although rules-based chatbots act on a simple set of rules, these bots are often effective enough to pass the Turing test* for many basic interactions. But an AI chatbot can be more convincing when it comes to in-depth conversation.

*The Turing test, created by famous computer scientist Alan Turing, is a test of a machine’s ability to exhibit human behavior. If a human can’t tell whether they are interacting with a human or a machine, that machine is said to pass the Turing test.

AI chatbots

An AI chatbot leverages machine learning to learn as it interacts with people. AI chatbots are designed to understand language, not just spot keywords. The appeal of AI chatbots is that they can be much more effective at simulating realistic human conversations. But AI chatbots are also significantly more challenging to design and manage, and they take a lot of data and computing resources to train. Also, design flaws in these bots can lead to some strange and unwanted behaviors.

In recent years, large language models (LLMs) have become increasingly used to power AI chatbots. An LLM is a type of AI program that can interpret and generate text; LLMs excel at imitating human text-generating capabilities.

What are chatbots used for?

Currently the most popular uses of chatbots are for customer support and digital personal assistants. There are also several other uses that are gaining popularity.

Customer support chatbots

These bots are often found on websites and web applications. Their capabilities range from directing users to product pages and support articles to walking customers through complex technical solutions. These bots are often used to replace automated telephone menus, which are known to cause customer dissatisfaction.

Digital personal assistants

Digital Personal Assistants (DPAs) are voice-operated chatbots designed to do administrative tasks for people, such as creating calendar appointments, and to surf the web to find information, such as the weather. Popular examples include Google’s Assistant, Amazon’s Alexa, and Apple’s Siri.

Many DPAs provide additional useful features such as games, music, controlling smart home devices (e.g. a Wifi-enabled thermostat), and even providing companionship.

Other uses for chatbots

There are several other novel uses for chatbots that are growing in popularity. These include:

  • Emotional support bots - These are bots designed for therapeutic use. They provide companionship as well as give users a place to share their problems and celebrate victories and milestones.
  • Educational toys - There is a growing market of chatbot-augmented toys designed to help children develop language skills. For example, there is now a Barbie doll with a built-in chatbot.
  • Internal processes - Some companies are starting to utilize chatbots to help with internal processes. For example, human resources chatbots are becoming very common.

Are there malicious chatbots?

Just like there are good and bad bots, there are good and bad chatbots. Some common examples of malicious chatbots include:

  • Spam chatbots - These are social media chatbots designed to find conversations in which to inject unwanted advertisements. Oftentimes these bots will have profiles that make them seem like real people.
  • Harassment bots - Chatbots are sometimes used for online harassment and bullying. These bots can inundate a user with nasty messages and comments, in an attempt to make the victim feel like there is a large volume of real users harassing them.
  • Disinformation chatbots - These are bots designed to spread disinformation through social media posts and direct messages. There was heavy speculation that these types of bots were used in the years leading up to the 2016 U.S. presidential election, in an attempt to sway public opinion.
  • Disrupting emergency services - Chatbots can also disrupt emergency services. For example, telephone chatbots can be used to flood emergency response lines (911, 999, etc.). This kind of disruption fits the criteria for cyber terrorism, and many emergency services are bolstering up their security to deal with these kinds of attacks.

How to stop malicious chatbots

A bot management service can be used to sniff out malicious bot traffic and prevent it from ever reaching a website or app. One such service is Cloudflare Bot Management, which leverages data from millions of Internet properties to help identify malicious bots and stop them in their tracks.Smaller sites can also block bad bots with Super Bot Fight Mode, available on Cloudflare Pro and Business plans.