AIQ AIQ
World 2: How AI Sees & Hears · Lesson 2.1.3

How Computers Read

Everything a teacher needs to deliver this lesson — pick your grade's script below once you've read the background.

Learning Objectives

"How Computers Read" is the third lesson in World 2's perception arc, after "How Computers See" (2.1.1) and "How Computers Hear" (2.1.2). Vision and hearing both end at the same idea — a computer converts a signal (pixels, sound waves) into numbers and then finds patterns in those numbers. This lesson applies that exact same idea to text, which is why it opens by directly saying reading is "incredibly hard" for a machine even though it's effortless for a person. By the end, a student should be able to:

Teacher Background

You don't need a linguistics or computer science degree to teach this well, but it helps to have a correct mental picture of what's actually happening, because students will ask "but how does it know what a word MEANS?" and a vague answer will undersell (or overclaim) what's really going on.

Start with the conversion step, because everything else depends on it. A computer only ever works with numbers — it has no native concept of a letter or a word. So the very first thing any text-processing AI does is break a sentence into small chunks called tokens. A token is often smaller than a whole word: "playing" might become "play" + "ing," because splitting common prefixes and suffixes lets the same small vocabulary of tokens cover far more words than if every whole word needed its own entry. Each token is then converted into a list of numbers — often hundreds of numbers long — called an embedding. Nobody hand-writes these numbers; a model learns them by processing enormous amounts of text and noticing which words tend to appear in similar situations.

The reason this matters, and the reason the lesson spends real time on it, is that the resulting numbers aren't arbitrary — they capture something like meaning. Picture each embedding as a point plotted in space (real embeddings use hundreds of dimensions, but the app's "meaning space" metaphor, and the GPS-coordinates comparison it uses for older students, both point at the same idea). Words used in similar contexts end up as nearby points. "Happy" and "joyful" land close together; "happy" and "bulldozer" land far apart. This is what makes the famous example the lesson uses — king − man + woman ≈ queen — genuinely true and not just a cute analogy: if you take the embedding for "king," subtract the embedding for "man," and add the embedding for "woman," doing that arithmetic on the actual number-lists lands you very close to the embedding for "queen." The model was never told the definition of royalty or gender; it inferred a numeric relationship purely from patterns in how those words are used across huge amounts of text.

Keep repeating: numbers, not understanding. Every product in this lesson — autocomplete, spam filters, translation, chatbots — works by finding statistical patterns in these numeric representations, not by comprehending a sentence the way a person does. A spam filter doesn't "know" an email is a scam; it's learned that certain word-number patterns strongly correlate with the emails people previously marked as spam. This distinction is worth restating in every activity, because it's easy for the "it feels smart" surface behavior to make students assume there's real understanding underneath.

For the two AI-processing scenes in this lesson — "Understanding Text" and "Language AI" — the throughline is that once text is numbers, a huge range of tasks become the same underlying operation: comparing numbers, or predicting the next number in a sequence. Sentiment analysis compares a review's numbers against patterns learned from millions of labeled positive/negative examples. Spam detection does the same comparison against patterns learned from labeled spam/not-spam email. Search engines convert your query into numbers and find documents whose numbers are close to it, which is how they handle typos and rephrasing without exact keyword matches. Autocomplete and chatbots are both, mechanically, doing the same thing repeated many times: given the numbers for everything typed so far, predict the most likely next token, convert it back to text, and repeat.

It's worth sitting with why this single idea — text becomes numbers, then a model finds patterns in the numbers — scales to so many seemingly different products. A spam filter, a translation app, and a chatbot look nothing alike from the outside, but underneath, all three share the same two steps: turn text into numeric representations, then compare or predict using patterns learned from vast amounts of prior text. That's genuinely the throughline connecting a decade-old spam filter to a brand-new chatbot, and naming it explicitly is what turns this lesson from "here are five cool AI examples" into "here is one mechanism that explains all five."

For Hacker/Architect classes: if you want the more precise vocabulary, the field this lesson is describing is called Natural Language Processing (NLP). Modern NLP is built on an architecture called the Transformer, whose key mechanism is self-attention — a way for the model to weigh how relevant every other token in a sentence is to understanding the current one, rather than only looking at nearby words. Two major families built on Transformers behave differently: BERT reads a sentence bidirectionally (using context from both before and after a word) and is well suited to understanding/classification tasks, while GPT-style models are autoregressive, generating text left-to-right one token at a time based only on what came before — which is why they're well suited to writing new text. Both approaches are covered explicitly in the Hacker and Architect quiz, so it's worth having this distinction straight before you teach those two scripts.

Materials & Prep

Common Misconceptions

"AI reads a sentence and understands it the way a person does."
A language model processes numeric representations of text and finds statistical patterns in them — it doesn't comprehend meaning, feel anything about what it's writing, or hold beliefs about the world. Fluent, well-formed output can look exactly like understanding from the outside; that's precisely why this distinction needs to be said out loud rather than assumed obvious, at every age band.
"A chatbot looks up the answer in some kind of database, like a search engine."
Most modern chatbots don't retrieve a stored answer — they generate a response one token at a time, each time predicting the statistically most likely next token given everything said so far, based on patterns learned from massive amounts of text during training. This is also why they can produce fluent but factually wrong answers: the process optimizes for plausible-sounding continuations, not verified truth.
"Translation apps must know two languages the way a bilingual person does."
A translation model has learned numeric relationships between millions of paired sentences in two languages — it maps patterns in one language's numbers to patterns in the other. It has no lived experience of either language or culture; it's matching learned statistical correspondences, which is also why it can produce translations that are grammatically fine but culturally or contextually off.
"Spam filters and search engines aren't really 'AI' — only chatbots are."
Spam detection, predictive keyboards, and modern search have quietly run on this same text-to-numbers, find-the-pattern approach for well over a decade, long before chatbots became a mainstream headline. Generative chatbots are simply the most visible and conversational recent application of the same underlying idea this lesson teaches.

Pick your grade's script

← All lesson plans ← How Computers Hear Sensors and Data →