AIQ AIQ
How Computers Read · Lesson 2.1.3

Teaching "How Computers Read" to Hacker mode (ages 11–14)

Part of the How Computers Read lesson guide. Teaching a different grade? 🌈 Explorer (5–7) · 🔧 Builder (8–10) · ⚡ Architect (15–18)

Hook & Warm-Up

Open with the app's framing, said with a bit of edge — this age group responds well to being told something sounds simple but isn't:

"Computers don't understand language — they do math on it. NLP turns words into numbers that capture meaning. Let's see how AI processes human language."

Ask directly: "If I told you ChatGPT doesn't actually understand a single word you type to it, would you believe me?" Let the pushback happen — plenty of students will disagree, citing how natural chatbot conversations feel. Don't resolve it yet: "Hold that thought. By the end of this, you'll be able to argue both sides — and explain exactly what's really happening underneath, which is neither 'it understands' nor 'it's just fake.'"

Push a bit further before opening the app: "Vision AI turns pixels into numbers. Sound AI turns sound waves into numbers. What do you think has to happen to a sentence before an AI can touch it at all?" Let students reason their way to "it has to become numbers somehow" on their own — most will get there quickly by pattern-matching against the last two lessons, which is exactly the connection worth surfacing: this is the same core idea as "How Computers See" and "How Computers Hear," applied to a third kind of signal.

Main Activity

This age band can handle the actual mechanism, not just the metaphor — introduce real terms and let them ask "why" at each step.

Scene 1 — Words as Numbers 🔤. Define tokenization: text gets split into tokens, frequently sub-word pieces, before any processing happens. Define word embeddings: each token becomes a high-dimensional numerical vector — hundreds of numbers, not just two or three — that captures something like meaning, learned automatically from patterns in enormous text datasets rather than hand-coded by a person. Ask: "If nobody tells the model what 'happy' means, how does it end up with a sensible number for it?" Guide toward: the model adjusts its numbers based on which words tend to appear near each other across huge amounts of text; words used in similar contexts converge toward similar vectors. Then present the semantic arithmetic example properly: king − man + woman ≈ queen is real vector arithmetic performed on trained embeddings, and it works because the vector direction from "man" to "king" turns out to encode something like "royalty," which transfers when applied starting from "woman." Emphasize this is an empirical result researchers discovered by testing embeddings this way, not something engineered on purpose.

Scene 2 — Understanding Text 💬. Connect each item to the underlying technique: sentiment analysis classifies text as positive/negative by comparing its embedding pattern against patterns learned from labeled training examples. Spam detection does the same kind of classification, trained on billions of labeled spam/not-spam emails — ask: "Why would a spam filter need constant retraining, instead of being trained once and left alone forever?" (Guide toward: spammers actively adapt their wording specifically to evade current filters, so the underlying data distribution keeps shifting.) Search works on semantic similarity between the query's embedding and a document's embedding, which is why it survives typos and rephrasing — it's not exact string matching. Autocomplete is a small-scale version of the same next-token prediction that powers full chatbots — the difference is mostly scale: how much context the model considers, and how many tokens it predicts in a row before stopping.

Scene 3 — Language AI 🌐 → the Transformer. This is the moment to introduce the architecture behind all of it: modern NLP runs on the Transformer, and its key innovation is self-attention — a mechanism that lets every token in a sequence weigh how relevant every other token is to interpreting it, rather than only looking at immediate neighbors, which is what older approaches did. This is what lets a model resolve something like "the trophy didn't fit in the suitcase because it was too big" — figuring out what "it" refers to requires attending back across the whole sentence, not just the previous word. Try this example live: ask students what "it" refers to, then ask "how would a system that only looked at the two words right before 'it' ever figure that out?" (It couldn't — this is precisely the limitation self-attention was designed to fix.)

Then contrast two major model families: BERT reads bidirectionally — using context from both directions around a word simultaneously — which suits it to understanding/classification tasks (sentiment, search relevance). GPT is autoregressive: it generates text strictly left-to-right, predicting one token at a time based only on what came before, which suits it to generation tasks like chat and writing. Ask students to guess why a purely bidirectional model like BERT would struggle at generating open-ended text (answer: at the moment of generating a new word, there is no "future" text yet for it to condition on — bidirectional context requires text on both sides to already exist).

A useful checkpoint here: ask students to explain, in one sentence each, why "the model learned embeddings from data" is different from "someone programmed in the meanings of words." (The embeddings emerge from optimization over training data — nobody writes rules like "royalty = +1 on dimension 42"; the model discovers whatever numeric structure happens to minimize its training error, and that structure turns out to correlate with human-interpretable concepts as a byproduct, not a design goal.)

Run the practice round quickly, but push past yes/no — for each item, ask "what's actually being compared or predicted numerically here?" 📧 Spam filter, 🌍 Auto-translate, 📝 Autocomplete, 🤖 Chatbot are AI (all doing embedding comparison or next-token prediction); 📖 Paper book, ✏️ Pencil writing, 📰 Printed newspaper, 📨 Postal mail are not (fixed content or a fixed physical/manual process, nothing predicted).

Discussion

Quiz Walkthrough

Word embeddings represent words as... (High-dimensional numerical vectors capturing meaning / Dictionary definitions / Binary strings / Simple letter codes)
High-dimensional numerical vectors capturing meaning. Each token is mapped to a long list of numbers — hundreds of dimensions in real models — learned from patterns in training text, not a stored definition or a simple encoding scheme. "Binary strings" and "letter codes" are worth ruling out explicitly: those would just be alternate ways of representing the letters themselves, with none of the "similar meaning, similar vector" property that makes embeddings useful.
The Transformer architecture's key innovation is... (Raw processing speed / Using less data / Being a physically smaller model / Self-attention mechanism for capturing dependencies)
Self-attention mechanism for capturing dependencies. Self-attention lets every token weigh how relevant every other token in the sequence is, which is what allows models to resolve long-range relationships (like what a pronoun refers to several words back) far better than earlier approaches that mostly looked at nearby words in sequence.
'King - Man + Woman ≈ Queen' demonstrates... (AI understanding gender / Random correlation / Semantic arithmetic in embedding space / Programmed rules)
Semantic arithmetic in embedding space. This is genuine vector arithmetic on learned embeddings, not a rule anyone wrote — the model discovered a consistent numeric direction associated with a concept like royalty purely from patterns in text. Be careful not to overclaim "understanding gender" as the answer — the model has no concept of gender as an idea; it has a numeric direction that happens to correlate with it in the training data.
BERT processes text differently from GPT because... (It's bigger / It uses less memory / It reads bidirectionally while GPT reads left-to-right / It's newer)
It reads bidirectionally while GPT reads left-to-right. BERT uses context from both directions at once, which suits classification and understanding tasks; GPT generates autoregressively, one token at a time based only on prior context, which suits generating new text. Size, memory footprint, and release date are all real differences between specific models, but none of them are the defining architectural distinction the question is testing.

Wrap-Up & Extension

Close with: "You now know the honest answer to 'does AI understand language?' — it doesn't comprehend the way you do, but it performs real, discoverable mathematics on meaning, learned entirely from patterns in text. That's genuinely powerful and genuinely limited at the same time, and holding both of those at once is the actual skill here."

Extension activity — embedding-space debate: Split the class into two sides. One side argues "next-token prediction over learned embeddings is a legitimate form of language understanding." The other argues "it's sophisticated pattern-matching with no real comprehension." Give each side five minutes to build their case using only concepts from today's lesson (tokens, embeddings, self-attention, autoregressive generation) — no vague appeals to "it's just a computer" or "it feels so real." Debrief by pointing out that AI researchers themselves are actively split on exactly this question, so there's no clean "correct" side to declare a winner on — the value is in the argument being made with real mechanism, not hand-waving.

If there's time for a second round, have each side try to poke a specific hole in the other's argument using a concrete example rather than a general claim — e.g., "if it truly understood language, why can it be tricked by a prompt that contradicts itself?" versus "if it's just pattern-matching, why can it correctly answer a question phrased in a way it's never seen before?" Both are real, documented behaviors of large language models, and forcing the debate down to specific, checkable claims (rather than vibes) is the actual habit this exercise is meant to build. This turns the 10–15 minute core lesson into a full period.

← Lesson overview ← How Computers Hear (Hacker) Sensors and Data (Hacker) →