Musubi Learning
Log InSign Up
Back to Lessons
🌿 Explorer8 min

How Chatbots Work

Go behind the scenes and learn how AI chatbots read your messages, understand them, and write back.

Published: March 10, 2026

Watch the lesson video

How Chatbots Work

When you type a message to an AI chatbot, something amazing happens in less than a second. Let's look inside!

Step 1: Reading your words

The chatbot reads your message one word at a time. But it doesn't read them like you do — it turns every word into a number.

This is called tokenization. Computers are very good at math, so numbers work better than letters.

Step 2: Understanding meaning

The AI was trained on billions of sentences. From this training, it learned that some words appear near each other a lot:

By seeing these patterns billions of times, the AI learns what things mean.

Step 3: Predicting the next word

Here's the secret of how chatbots write: they predict one word at a time.

When you ask "What is the capital of France?", the AI predicts:

Try it yourself

Finish this sentence in your head: "The sky is ___"

Did you think "blue"? That's exactly how AI works — predicting what comes next based on patterns!

Musubi's Challenge

Ask an AI chatbot a question, then ask it the same question again. Do you get the same answer? Why or why not?


Next lesson: Build Your First Model