Learning Goals
5 minBy the end of this lesson you can:
- Explain that a chatbot builds a reply by predicting the next word.
- Explain that it does not "understand" the way people do.
- Explain why a chatbot can sound sure but be wrong.
Warm-Up · Finish the Sentence
8 minLast lesson we met generative AI. Chatbots are a star example. Quick game — say the next word:
- "Nasi …"
- "The cat sat on the …"
- "Twinkle, twinkle, little …"
Reveal
You probably said lemak, mat, star. You just did next-word prediction — exactly what a chatbot does, over and over.
New Concept · One Word at a Time
18 minThe simple trick
A chatbot is a large language model — an AI trained on a huge amount of text. To reply, it predicts the most likely next word, adds it, then predicts the next, and the next, until the answer is complete.
It's like phone autocomplete with superpowers — guessing not one word, but a whole paragraph, one word at a time.
No real understanding
The chatbot doesn't know what a cat is. It has learned which words usually follow which. That's why it can write smoothly yet still get facts wrong — we call a confident mistake a hallucination.
A chatbot predicts words; it does not check truth. Always fact-check anything important it tells you.
Worked Example · Built Word by Word
18 minWatch a tiny exchange. The reply wasn't looked up whole — it was predicted one word at a time.
Finish this sentence nicely: "After school, Aisyah likes to..."
After school, Aisyah likes to ride her bicycle around the kampung, then help her mother cook dinner before doing her homework.
Each word was the chatbot's best guess for what should come next, given everything before it. String enough good guesses together and you get a natural-sounding sentence.
Fluent does not mean knowledgeable. The chatbot is brilliant at sounding right — checking if it is right is still our job.
Try It Yourself
20 minUse your worksheet.
With a partner, take turns adding one word to build a silly sentence about a trip to Penang. Notice how each word depends on the words before.
Hint
Start with "We" and keep adding one likely word each turn.
In two sentences, explain why a chatbot can sound completely sure and still be wrong.
Hint
It predicts likely words; it never checks whether the facts are true.
Mini-Challenge · Predict Like a Chatbot
12 minWrite a sentence start of your own. Then list the three most likely next words a chatbot might pick — and one unlikely one.
It works if your three likely words really do fit, and you can say why the unlikely one doesn't.
Show an example
Start: "On a hot day I like to drink a cold …". Likely: milo, sirap, drink. Unlikely: elephant — it doesn't fit the pattern of the sentence at all.
Recap
5 minA chatbot builds replies by predicting the next word, over and over. It learned from huge amounts of text, but it doesn't truly understand — so it can be fluent and still wrong. That's why we fact-check.
Vocabulary Card
- chatbot
- An AI you talk to in writing that replies in natural language.
- large language model (LLM)
- The kind of AI behind a chatbot, trained on a huge amount of text.
- hallucination
- When an AI states something false while sounding completely sure.
Homework · Likely Next Words
≤ 20 minWrite three different sentence starts. For each, list the three words you think a chatbot would most likely predict next. Then circle the one start where you feel most sure of the next word, and say why.
Sample · Likely Next Words
- "Selamat …" → pagi, datang, hari.
- "I went to the …" → shop, market, school.
- "Twinkle, twinkle, little …" → star, light, one.
Most sure: the third — the rhyme makes "star" almost certain.
Yours will be different — sensible likely words and a good reason are the goal.