Class 9 · Unit 4: Generative AI · Lesson 4.1 · 40 min
Generative AI, and how it differs
Ask the same question three times and get three different answers. Broken — or working exactly as designed?
Today you will: See the spread behind every generated word · Tell generative from conventional AI · Find why our words cost more tokens
Story
Hiba's teacher asks the same question three times, on the projector, from the school's account: "Write one sentence about the chinar tree."
Three answers come back. All three are good. None of them is the same.
The class is divided. Nusrat says the computer is thinking harder each time. Rahat says it must be broken — a calculator that gave three answers to 7 × 8 would be broken.
Then the teacher runs the leaf classifier from Class 8 on the same photograph, three times. Three identical answers: chinar, 94%.
Two machines, both called AI. One says the same thing every time and the other never does. Today you find out why — with a spreadsheet, not a chatbot.
Watch
Sorting machines and producing machines — — scan code 9.4.1 in the printed book.
Learn it
The leaf classifier gave the same answer three times; the chatbot gave three different sentences. Both are AI, but they do different jobs. Conventional AI sorts, scores or predicts: is this chinar or willow? Generative AI produces new content: what plausibly comes next? At every step it makes a spread of probabilities over every possible next piece of text, then samples from it. That is why the same question gives different answers, and why none of them is "the real one".
Words to know
- Conventional AI sorts, scores or predicts, like a spam filter or a leaf classifier. Learned from labelled examples.
- Generative AI produces new content. Five kinds: text, image, audio, video, code. Learned from huge amounts of unlabelled text or images.
- Token a piece of text the model works with: a word, or part of one. Rare words split into more tokens.
- Probability distribution a spread of chances over every possible next token, adding to 100%.
- Sampling choosing the next token from the spread, sometimes below the top choice.
- Temperature the setting for how far down the spread the model samples. Low: plain and repetitive. High: varied, and more likely to go wrong.
- Context window how much of the text so far the model reads back over, up to a limit.
Step by step: from counts to a spread
In a story, the word the was followed by: boat 6 times, lake 3, chinar 1. That is 10 in all.
- Turn counts into probabilities: boat 6/10 = 60%, lake 30%, chinar 10%.
- Always take the top choice: the boat… the boat… the boat. It is the same every time, and flat.
- Sample instead: roll a number from 1 to 10; 1–6 gives boat, 7–9 lake, 10 chinar. The text now varies, as real models do.
- Tokens:
Srinagarortumbaknarisplit into more pieces than an English word of the same length, because the model saw them far less often.
Training happened once, long before your lesson. Using the tool in class does not teach it anything.
Careful: three answers that agree are not proof. If you ask three times and two agree, that shows the spread is narrow, not that the world is that way. And a model does not learn from what you type while you use it; training and use are separate, though a company may keep your words for later.
On the laptop
You need: LibreOffice Calc · next-word-counts.ods · kinds/ with kinds.ods · tokens.ods
Mission 1: Counts into a spread (8 min, in pairs)
- ☐1
Open
next-word-counts.ods. Row 1 isthe, with the count of every word that followed it. - ☐2
Turn counts into percentages:
=B2/$H$2, filled across. That's a probability distribution. - ☐3
Chart the row. This picture is what the model makes at each step — a shape, not a word.
- ☐4
Predict: which will sound more natural, always taking the tallest bar or sampling with
=RAND()? Generate five words each way and read both aloud.
Mission 2: Five kinds, two machines (6 min)
- ☐5
In
kinds.ods, for each sample: which kind (text, image, audio, video, code) and conventional or generative? - ☐6
One of the two photographs was generated. Say which, and why — then check
kinds/answers.txt.
Mission 3: Tokens (3 min)
- ☐7
In
tokens.ods, splitunhappiness,Srinagar,photosynthesisandtumbaknariinto pieces a machine would have seen thousands of times. Which cost the most?
Stuck?
A #DIV/0! means the formula isn't pointing at the row total. For Part 3, split walking together first: walk + ing.
Finished early?
Pick another row and predict, before charting it: will one word dominate, or will many share?
No laptop today?
Convert one printed row to percentages on the board, then generate twice — always the biggest, and by rolling a die against the bands. Do Parts 2 and 3 from the handout.
Debate it
Your spread for the was built from one 2,000-word text, so the king and the water were
likely and the polymerase was impossible.
A real model's spread is built from enormous amounts of text — but far more of it is in English than in Kashmiri, and far more about Delhi than about Baramulla. What does that do to the spread when someone asks it about our valley?
Check yourself — practice, not a test
1. Generative AI differs from conventional AI because it:
- ○ Runs faster
- ○ Produces new content rather than sorting or scoring existing content
- ○ Is always correct
- ○ Needs no data
2. Which are kinds of generative AI? (choose all that apply)
- ○ Text
- ○ Image
- ○ Audio
- ○ Code
3. At each step, a generative model produces:
- ○ One word, chosen in advance
- ○ A probability for every possible next token
- ○ A search result from the internet
- ○ A fact from a stored database
4. Asking the same question twice and getting two different answers means the model is faulty.
- ○ True
- ○ False
5. The setting that decides how far down the spread a model samples is called ______.
6. A word the model has rarely seen is usually split into:
- ○ Fewer tokens than a common word
- ○ More tokens than a common word
- ○ Exactly one token, always
- ○ No tokens at all
Remember
Conventional AI sorts. Generative AI produces — by sampling likely next tokens.
Typing practice
Skill: accuracy while thinking, Term 2 (5 min)
- On typing.com, open the timed paragraph your teacher has set for this term .
- Target this term: 35–40 WPM at 94% accuracy or better.
- Type without looking down. When you make a mistake, finish the line first, then fix it.
- Words for this unit:
tokenprobabilitysamplepromptverifysource