Exercises — Session 3: The language of machines 🟢
Program : Applied AI — Beginner Level · Instructor: Yann Isola Material : paper + pencil. For exercise 3: the interactive page of the session or a chatbot.
Exercise 1 — The human tokenizer ✂️ (15 min)
The AI cuts the text into tokens : pieces of words. Today, YOU are the tokenizer!
Part A — Cut like a machine
Cut each word into “logical” pieces, like an AI would do. Rules of the game: frequent pieces (prefixes, suffixes, small common words) remain intact; rare words get cut out.
| Word | Your cutting | Number of tokens |
|---|---|---|
| cat | ______________________ | ____ |
| chatbot | ______________________ | ____ |
| intelligence | ______________________ | ____ |
| Today | ______________________ | ____ |
| incredibly | ______________________ | ____ |
| unconstitutionally | ______________________ | ____ |
| smurfology | ______________________ | ____ |
Part B — Questions for reflection
- Which word cost you the most tokens? Why, in your opinion?
- Why doesn't the AI just give EVERY word in the dictionary a number? (Hint: How many forms does the verb “to be” have? What about invented words?)
- Did your neighbor cut out the same as you? What does this tell us about different AI models?
Part C — LEGO Challenge 🧱
With these 6 tokens: re + faire + dé + mont + er + able
How many French words can you make by combining them? (Examples to get started: redo , disassemble …)
💡 To remember: tokens are reusable bricks. This is what allows AI to process even words it has never seen.
Answer key (for the teacher)
Part A — cutouts plausible (⚠ each model has its own, accept any consistent answer):
- cat →
chat(1) - chatbot →
chat+bot(2) - intelligence →
intelli+genceOrintel+ligence(2) - today →
aujourd+'+hui(3) - incredibly →
in+croyable+ment(3) - unconstitutionally →
anti+constitution+nelle+ment(4, between 3 and 6 acceptable) - smurfology → invented word, very cut up:
sch+troumpf+ologie(3–6)
Part B : 1. Rare/invented words cost more. 2. Too many possible forms (conjugations, plurals, new words): the vocabulary would explode; the pieces recombine. 3. Different cuts = normal, each model learns its own cut.
Part C : redo, dismantle, reassemble, assemble, dismantle, reassemble, make, assemble… (accept any valid word).
Exercise 2 — Hallucination hunter 🕵️ (15 min)
An AI answered the questions below. Each answer contains at least one hallucination (invented or false information) slipped among true information. It's up to you to flush them out!
Answer #1 — History
“The Eiffel Tower was built for the 1889 Universal Exhibition by Gustave Eiffel. It measures approximately 330 meters and was painted blue-white-red for the 1924 Olympic Games. It was to be dismantled after 20 years. »
TRUE or invented ❌? Underline the suspicious passage(s): ____________________
Answer #2 — Sciences
“The Moon is the natural satellite of the Earth. It is approximately 384,000 km from us. Its hidden side is home to the Poincaré-Dumas crater, discovered in 1897 by the French astronomer Élise Chantereine using the first liquid mirror telescope. »
Suspicious passage(s): ____________________
Answer #3 — Literature
“Antoine de Saint-Exupéry wrote The Little Prince , published in 1943. He also wrote Night flight and the famous novel Desert Stars , who received the Goncourt prize in 1938.
Suspicious passage(s): ____________________
Questions for reflection
- What made these hallucinations difficult to spot? (Hint: look at the level of detail, the tone…)
- Name 2 reflexes to check an AI response.
- Why does AI invent instead of saying “I don’t know”?
Answer key (for the teacher)
- No. 1: ❌ “painted blue-white-red for the 1924 Olympic Games” — invented. The rest is true (1889, Gustave Eiffel, ~330 m, dismantling planned after 20 years).
- No. 2: ❌ The “Poincaré-Dumas crater”, “Élise Chantereine” and the “liquid mirror telescope of 1897” are invented. The hidden side was only observed in 1959 (Soviet Luna 3 probe) — impossible to discover a crater there in 1897! Distance ~384,000 km: true.
- #3: ❌ Desert Stars does not exist and Saint-Exupéry did not receive the Goncourt in 1938 ⚠ (he received other prizes, including the Grand Prix du roman from the Académie française for Land of men in 1939). The Little Prince (1943) and Night flight : true.
Reflection : 1. The true/false mix + the precise details (names, dates) + the assured tone. 2. Check elsewhere, ask for sources and check them, be wary of being too precise, cross-reference several sources. 3. It calculates the most text plausible , not the most TRUE ; “I don’t know” is rarely the most likely outcome.
Exercise 3 — The temperature experiment 🌡️ (20 min)
There temperature regulates the randomness of the answers: low = wise and predictable, high = creative and surprising.
Material
The interactive session page (“Temperature Lab” tab), or a real chatbot giving it style instructions.
Protocol
Step 1. Choose ONE starting question:
- “Tell me a story that begins: Once upon a time there was a robot…”
- “Give me an idea for a name for a science club.” »
- “Describe the ideal breakfast. »
Step 2. Get 3 answers to the same question:
| Fashion | On the interactive page | With a real chatbot, ask… |
|---|---|---|
| 🧊 Cold (T ≈ 0) | Cursor left | “Answer in the most classic and predictable way possible. » |
| 🌤️ Medium (T ≈ 1) | Slider in the middle | “Answer normally. » |
| 🔥 Hot (T ≈ 2) | Cursor right | “Answer in a very original, surprising, daring way. » |
Step 3. Complete the observation table:
| 🧊 Cold | 🌤️ Average | 🔥 Hot | |
|---|---|---|---|
| Was the response predictable? (0–10) | |||
| Are there any surprising ideas? | |||
| Does the answer remain consistent? | |||
| My pleasure rating (0–10) |
Step 4. Questions for reflection:
- For translate a text , what temperature would you choose? For what ?
- For invent birthday party ideas , what temperature? For what ?
- What did you notice in very hot 🔥 mode? When does creativity become nonsense?
- Bonus: repeat the same question twice in 🧊 cold mode. Are the answers identical or almost identical? And in 🔥 fashion?
Answer key (for the teacher)
- Low: for a translation we want fidelity, not fantasy.
- High (or medium-high): we are looking for varied and original ideas.
- In very hot mode, the answers go in all directions and can lose all coherence: too much chance breaks the logical thread.
- In cold: almost identical answers (the most likely token almost always wins). Hot: very different answers each time.
💡 To remember: there is no absolute “good” temperature — there is the right temperature for a given task . ⚠ Most consumer chatbots don't allow you to adjust the temperature directly, but the style guidelines produce a comparable effect.