What is an AI chatbot? How chatbots work, explained simply

Not every chatbot is AI, and the AI ones don't remember you the way you might think. Here is how chatbots went from fixed menus to ChatGPT, and what really happens when you hit send.

Two phones side by side. The left phone, labelled rule-based chatbot, offers fixed buttons: 1 track my order, 2 return an item, 3 talk to a person. When the person types that their parcel is late and the box is wet, it replies: Sorry, I didn't understand. The right phone, labelled AI chatbot, shows the same problem typed in the person's own words and the bot replying with three helpful steps.
Fig. 1 — A rule-based bot gives you fixed choices. An AI chatbot can respond to whatever you type, in your own words.

You have probably used two very different kinds of chatbot. One pops up on a bank or delivery website and says “Choose an option: 1. Track order 2. Return an item 3. Talk to a person.” Type anything unexpected and it replies “Sorry, I didn’t understand that.”

The other is ChatGPT, Claude or Gemini. You can type almost anything, in your own words, and get a sensible reply. Both are called chatbots. Only the second is an AI chatbot in the modern sense. This guide explains the difference, how an AI chatbot actually works when you press send, and what it can and can’t do.

What is a chatbot?

A chatbot is a computer program that you talk to by typing (or speaking) in everyday language, and that replies in conversation.

An AI chatbot is a chatbot that uses artificial intelligence, today usually a large language model (LLM), to understand what you wrote and to write its reply, instead of following a fixed script.

Chatbots are older than you think

The first famous chatbot, ELIZA, was written by Joseph Weizenbaum at MIT and described in a paper published in 1966. Its best-known script, called DOCTOR, played a therapist by turning your words back into questions. Type “I am unhappy” and it might answer “Why do you say you are unhappy?”

ELIZA understood nothing. It spotted keywords and filled in templates. Yet many people who used it felt understood, and some confided in it as if it were a person. Weizenbaum was surprised, and later became a critic of how easily people trust computers. The tendency to treat a program as if it understands you is still called the ELIZA effect, and it is worth remembering when chatting with today’s far more convincing bots.

For decades after that, most chatbots were rule-based: designers wrote menus, keywords and canned answers. Voice assistants added speech, but they still mostly matched your request to a fixed set of known tasks. Then, in November 2022, OpenAI released ChatGPT, a chatbot built on a large language model, and millions of people discovered they could hold an open conversation with a computer.

Rule-based chatbots vs AI chatbots

Rule-based chatbot AI chatbot
How it decides what to say Follows rules and scripts people wrote Generates a reply with a trained model
What you can type Buttons, keywords, expected phrases Almost anything, in your own words
Handles surprises Poorly: “Sorry, I didn’t understand” Usually well
Predictable? Very: same input, same answer Less: answers can vary
Can make things up? No, it only says what it was given Yes, it can hallucinate
Good for Simple, fixed tasks such as order tracking Explaining, writing, summarising, open questions

Rule-based bots are not obsolete. When a task is narrow and must always be exact, like “show my order status”, a simple scripted bot (or a plain web page) is often the safer choice. Many businesses now mix the two: an AI model to understand what you want, and fixed systems to actually look up your order.

How an AI chatbot works when you press send

Under the friendly chat window, an AI chatbot does something quite simple, very fast.

A flow of four steps. 1 You type a message. 2 The chat app builds the full text: hidden instructions from the app, the whole conversation so far, and your new message. 3 The LLM reads all of it and writes a reply one token at a time. 4 The reply appears, and is added to the conversation history. A loop arrow goes from step 4 back to step 2 for the next message.
Every time you send a message, the app sends the whole conversation to the model again. The model itself remembers nothing between turns.
  1. You type a message. For example, “Help me write a polite email asking for leave on Friday.”
  2. The app builds the full text. It doesn’t send only your message. It adds hidden instructions from the app (often called a system prompt, such as “You are a helpful assistant”), plus the whole conversation so far, plus your new message. Our guide to system, user and assistant roles shows exactly what this looks like.
  3. The LLM writes a reply. The model reads all that text and predicts the reply one small piece (a token) at a time, as explained in what a large language model is.
  4. The reply appears, and the app saves it into the conversation history, ready for your next message.

Why it seems to remember (and why it forgets)

Here’s the surprise: the model doesn’t remember anything between messages. It seems to remember because the app resends the whole conversation every time.

That has two effects:

  • In one chat, it can refer back to what you said earlier, because those words are still in the text it reads.
  • In a very long chat, the oldest messages can fall outside the model’s limit on how much text it can read at once, called the context window, and it “forgets” them.

Some chatbot apps add a separate memory feature that saves notes about you and adds them to future chats. That is the app storing text for you, not the model learning.

Extra powers: tools

Many AI chatbots can now do more than write. They can search the web, read files you upload, run code, or connect to apps such as your calendar. The model decides it needs a tool, the app runs the tool, and the result is passed back to the model as more text to read. When a chatbot works through several such steps on its own towards a goal, people call it an AI agent.

What AI chatbots are good at

  • Explaining a topic at any level, and answering follow-up questions
  • Drafting and rewriting emails, posts and reports
  • Summarising long documents
  • Brainstorming ideas and options
  • Translating, and changing tone (“make this more polite”)
  • Writing and explaining code
  • Customer support for common questions, when connected to a company’s real information

What to be careful about

  • They can be confidently wrong. An AI chatbot predicts likely text, not checked facts. Verify anything important: dates, numbers, legal or medical details, and quotes.
  • They may not know recent events. A model learns from data up to a certain date, called its knowledge cutoff. Unless the app gives it a search tool, it won’t know about anything after that.
  • They don’t understand you like a person does. Remember the ELIZA effect. A reply that says “I understand how you feel” is generated text, not a feeling.
  • Think before sharing private data. Read the app’s privacy settings, especially at work, before pasting in personal or confidential information.

Common misconceptions

“All chatbots are AI.” Many are simple scripts with buttons and keywords.

“The chatbot learns from me as we talk.” The model’s learned numbers don’t change during your chat. It only reads the conversation it is sent.

“ChatGPT is the AI model.” ChatGPT is the app. The AI models behind it are OpenAI’s GPT models. Likewise, Claude and Gemini are both apps and families of models.

“A chatbot looks up answers in a database.” On its own, an LLM-based chatbot generates text from patterns it learned. Some apps add search or document lookup, which helps it stay accurate.

Key takeaways

  • A chatbot is a program you talk to in everyday language.
  • Rule-based chatbots follow scripts; AI chatbots use an LLM to understand and write replies.
  • Chatbots date back to ELIZA in 1966; ChatGPT brought AI chatbots to the public in November 2022.
  • Each time you send a message, the app sends the whole conversation to the model, which is why it seems to remember.
  • AI chatbots are powerful but can be wrong with confidence, so check what matters.

Frequently asked questions

What is an AI chatbot in simple words?

It is a program you can chat with in normal language that uses AI, usually a large language model, to understand your message and write a reply.

What was the first chatbot?

ELIZA, created by Joseph Weizenbaum at MIT and described in a 1966 paper, is widely called the first chatbot.

Is ChatGPT a chatbot?

Yes. ChatGPT is an AI chatbot app made by OpenAI, powered by its GPT large language models.

How does a chatbot understand what I type?

An AI chatbot turns your text into numbers (tokens and then embeddings) that its model was trained to work with. Patterns learned from huge amounts of text let it work out a likely, useful reply. It isn’t understanding in the human sense, but it is often very good at working out what you mean.

Are AI chatbots safe to use?

They are generally safe for everyday tasks, but they can give wrong answers and you should be careful with private information. Check important facts and follow your workplace’s rules on what you can share.

Comments

LEAVE A COMMENT
No sign-up. Comments appear after a quick review.