← AI Literacy (free course)

Module 01Free

How AI Generates Answers

Next-token prediction, why AI is brilliant on familiar ground, and why it hallucinates.

01

Teaching content

Module goal

Understand that an AI language model predicts the next word, and learn to sense when a task is well-worn territory versus novel territory.

Lesson 1The core idea: it predicts the next word

An AI language model doesn't “know” things the way a person does, and it doesn't look anything up in real time when you ask it a question. Instead it does one very specific job, over and over, extremely fast: it predicts the next word.

Think of it as the world's most advanced autocomplete. You type “The capital of Ghana is,” and the model predicts the most likely next word based on patterns it learned from an enormous amount of text. It says “Accra” — not because it looked it up, but because in the huge amount of text it learned from, “Accra” was overwhelmingly the word that followed that phrase. It does this one word (technically one “token” — a word or word-piece) at a time, building its whole answer prediction after prediction.

One job, repeated

Every sentence an AI writes is thousands of tiny next-word bets, made at incredible speed.

Lesson 2Why AI shines on familiar territory

Summarizing a document, reformatting a list, writing a standard business email, explaining a well-known concept — these all follow common patterns the model has seen many times. It is very good at these.

Real-life example: Ama runs a small boutique in Kumasi and asks an AI tool to “write a WhatsApp broadcast message announcing our weekend sale.” This is extremely well-worn territory — thousands of similar sale announcements exist in the training data — so the AI produces something polished and usable almost instantly.

Lesson 3Why AI produces things that sound true but aren't

When a question pushes into unfamiliar territory — an obscure fact, a very specific detail, something rare in its training data — the model still predicts the most plausible-sounding next word. It has no built-in “I don't actually know this” alarm. This is what people call hallucination: the AI states something false in the same confident tone it uses for something true, because from its perspective it is doing exactly the same thing either way.

Real-life example: Kwame asks, “What were the exact opening hours of the Makola Market stall association office in 2019?” Instead of saying it doesn't know, the AI may confidently produce a plausible time — 8am to 5pm, say — with zero signal that it is essentially guessing.

The skill this teaches

Learn to sense when a task is “well-worn” (safe territory, like the boutique sale message) versus “novel” (like obscure market office hours, where you should double-check).

02

Practical task

Confidence versus accuracy

  1. 1.Ask an AI tool something extremely common — “Summarize the plot of Romeo and Juliet,” or “Write a caption for a jollof rice photo on Instagram.”
  2. 2.Ask it something very obscure and specific — attendance at a small local church programme last month, or an invented question about a business that doesn't exist.
  3. 3.Compare how confident the tone sounds in both answers, and notice that the confidence doesn't change even when the accuracy might.
03

Knowledge Check

Question 1 of 5

What is the core mechanical task an AI language model performs when generating a response?

04

Mark your progress