Header_blog

Coding Education

5 min read

What Is a Chatbot: How It Works, Types, and Examples

Published: 11.08.2026·Updated: 11.08.2026
Bayu Nugraha

Bayu Nugraha

Children's Coding Specialist

What Is a Chatbot: How It Works, Types, and Examples

A chatbot is a computer program that can hold a conversation with a person through text or voice, as though you were talking to someone.

Table of Contents

The difference between a chatbot that feels wooden and one that feels alive lies in the technology behind it, and that difference is worth a child understanding.

Two Kinds of Chatbot

Rule-based chatbotAI-based chatbot
How it answersMatches the question against a prepared list of repliesComposes a new answer from patterns in its training data
If the question is off-listGives up or repeats a menuStill attempts an answer, sometimes wrongly
ExamplesAutomated help menus in a banking appChatGPT, Gemini, modern voice assistants
Can a child build one?Yes, even in ScratchRequires an already-trained model

A rule-based chatbot does not understand anything at all. It searches for keywords and returns a reply a human wrote earlier. That is why conversations with one hit a dead end so quickly.

How a Chatbot Works

A rule-based chatbot runs on a decision tree. If the user types opening hours, show the answer about opening times. If that phrase is not found, show a menu. The entire conversation was mapped out in advance by a person - essentially a flowchart executed by a computer.

An artificial intelligence chatbot works differently. It has no list of replies. Having been trained on very large amounts of text, it composes new sentences by predicting the most plausible next word. That is why its answers feel fluent, and also why it can be wrong in a confident tone.

Chatbots Around a Child

  • Automated help in shopping or banking apps. Almost always rule-based.
  • Phone voice assistants. A mix: AI for recognising speech, fixed rules for many answers.
  • ChatGPT and similar tools. Fully AI-based.
  • Talking characters inside games. Usually simple rule-based logic.

Why It Matters for Kids

Building a simple chatbot is one of the most satisfying first projects for a child, because the result feels alive straight away. In Scratch a chatbot needs only an ask block, a variable to store the answer, and if-then branching. A nine-year-old can finish one in a single session.

The learning value is double. The child masters branching through an enjoyable project, and at the same time understands that a chatbot does not really comprehend anything - because they wrote every rule themselves. That understanding is the best possible preparation for using AI chatbots sensibly later on.

In the Algonova coding course, a simple chatbot is among the projects children build early on. Want to try? Join a free coding class.