A chatbot is a program that holds a conversation with a person through text or speech. You type or say something, the program interprets it, and it replies. That reply might come from a fixed script, from a search through a library of answers, or from a statistical model that writes new sentences, and that difference is what separates one kind of chatbot from another.
The rest of this page sorts the main types, explains what happens behind the screen and lists where chatbots turn up.
A working definition
The word is a shortening of “chatterbot”, coined in the 1990s, but the idea is older. In 1966 Joseph Weizenbaum at MIT published ELIZA, a program that imitated a conversation by matching keywords in what the user typed and turning them into questions. People often attributed more understanding to it than it had, a reaction that has become known as the ELIZA effect. The history of chatbots traces the path from there to today’s systems.
Three features define a chatbot in practice:
- Input in natural language, rather than menus, forms or commands
- A turn-taking exchange, where each message builds on the last
- A response generated or selected by software, with no human typing in real time (though a human may take over in some systems)
The main types
Rule-based bots
These follow decision trees or pattern rules written by people. If the message contains “opening hours”, send this reply. They are predictable and easy to test, but they fail when users phrase things in unexpected ways. The comparison in rule-based vs AI chatbots covers the trade-offs in detail.
Retrieval-based bots
These keep a bank of approved answers and use a model to match the user’s question to the best one. Because the replies are written in advance, they are controllable, which suits customer support and help desks.
Generative bots
These use language models to compose a reply word by word. They can handle a far wider range of questions and can sound fluent, but they may state wrong information with confidence, which developers call hallucination. They need guardrails and checking.
Hybrid bots
Many practical systems combine the above. A generative model may produce the wording, while rules and retrieved documents keep it within safe boundaries.
How a chatbot works inside
Whatever the type, most follow a similar chain of steps.
- Receive the message, as text or as speech converted to text.
- Interpret it. The system tries to work out the user’s goal (called the intent) and pull out key details such as dates, product names or places.
- Decide what to do. A dialogue manager tracks context from earlier turns and chooses an action, such as asking a follow-up question, looking up data or answering directly.
- Produce the reply, either by choosing a prepared response or by generating one.
- Deliver it, sometimes with buttons or cards, or as speech.
A short example: a user types “Can I move my appointment to Friday?” A rule-based bot might spot the word “appointment” and offer a rescheduling menu. A model-based one may detect the intent “reschedule”, extract “Friday” as the new date, ask which appointment is meant, and then call a booking system through a connection that developers have built.
Where chatbots are used
- Customer service: answering common questions and passing hard cases to staff
- Information desks: public services, schools and libraries
- Voice assistants: smart speakers and phones
- Internal tools: helping employees find policies or fill in routine requests
- Learning and practice: language tutoring and study aids
- Entertainment and companionship: games and character-based apps
Chatbots compared with related tools
A chatbot is easy to confuse with nearby technologies. A search box returns a list of documents and leaves the reading to you, while a chatbot tries to give a direct answer. A frequently-asked-questions page is static, whereas a bot responds to your exact wording. An interactive voice response phone menu asks you to press numbers, while a voice chatbot lets you speak naturally. Each has its place, and a good service often combines several of them.
Limits worth knowing
Chatbots lack human understanding, even when their replies are fluent. They may misread context, repeat themselves, reflect biases in their training data or fail on unusual requests. Sensitive areas such as health, law and money need particular care, and a good design makes it obvious when a user is talking to software and offers a route to a human. Careful measurement is part of building them responsibly; see testing and measuring chatbots.
Frequently asked questions
What is the difference between a chatbot and a virtual assistant?
The terms overlap. A chatbot usually focuses on conversation within one service, while a virtual assistant often performs tasks across apps and devices, such as setting alarms or controlling smart home equipment.
Do chatbots use artificial intelligence?
Some do and some do not. Rule-based bots follow scripts with no learning involved. Retrieval and generative bots use machine learning, and modern assistants rely on large language models.
Are chatbots always accurate?
No. Scripted bots are accurate only inside their script, and generative bots can produce plausible but false statements. Important information should be checked with a reliable source.
How are chatbots built?
Developers either use no-code platforms for simple flows or write code that connects language models, databases and messaging channels. Planning the conversation itself matters as much as the technology; see conversation design basics.
Where to read next
A chatbot is software designed to talk, and its quality depends on the type chosen and the care taken in design and testing. For a good next step, read the short history to see how the ideas developed.