In this lesson: how an AI can work with the meaning of words when all it can handle is numbers. You will see how it gives words spots on a map, and why "close" on that map is worth checking.
1. A map of snacks
We asked an AI to score 8 snacks from 1 to 10 on two scales (two directions to score along): salty (1) to sweet (10), and soft (1) to crunchy (10). This is exactly what we typed:
Score these 8 snacks from 1 to 10 on two scales: salty (1) to sweet (10), and soft (1) to crunchy (10). Snacks: crisps, popcorn, chocolate, a marshmallow, an apple, yoghurt, pretzels, a jelly sweet. Give a small table, then tell me which two snacks are the closest pair and which two are the furthest apart.
Before you look at its answer, guess: which two snacks will land closest together, and which two furthest apart? Keep your guess; you'll need it in section 5.
Here are its scores (recorded with DeepSeek, 2026-10-24):
| Snack | Salty → sweet | Soft → crunchy |
|---|
| Crisps | 2 | 8 |
| Popcorn | 3 | 7 |
| Chocolate | 8 | 4 |
| Marshmallow | 9 | 1 |
| Apple | 4 | 6 |
| Yoghurt | 3 | 1 |
| Pretzels | 2 | 9 |
| Jelly sweet | 9 | 2 |
Two numbers are enough to put each snack on a map: across for salty to sweet, up for soft to crunchy.
Two scores put each snack on a map
2. Similar means close
Look where things landed. Crisps and pretzels (a salty, crunchy baked snack) sit side by side; so do the marshmallow and the jelly sweet. Chocolate is far from crisps. Nobody had to write "crisps are like pretzels". Once each snack is a pair of numbers, "similar" becomes "close on the map", and "how similar" becomes "how far apart".
The scales decide what counts as similar. Swap "soft to crunchy" for "cheap to expensive", and a soft snack and a crunchy one with the same sweetness and the same price suddenly land together. Whoever picks the scales picks what "alike" means.
Similar becomes close; how similar, how far
3. AI does the same with words
A computer can't feel what "sweet" means. What it can do is work with numbers. So AI turns each word (or piece of a long word) into a list of numbers, a spot on a map of meanings. That list is called an embedding: the word's address on the map.
- Words used in similar ways get nearby addresses: "cat" lands near "kitten" and "dog", far from "homework".
- To find something similar, the AI looks for the closest spots.
So how does an AI "get" that "kitten" is like "cat"? Not by looking the word up in a dictionary and reading a definition. Its numbers come from the sentences each word is used in: words that turn up in the same kind of sentences land close. Take a few sentences from school life:
- "My cat chased the ball." / "My kitten chased the ball."
- "I fed the cat before school." / "I fed the kitten before school."
- "I left my homework on the bus."
"Cat" and "kitten" fill the same gap in the same sentences, so each time the AI learns from sentences like these, their numbers move a little closer. "Homework" never fills that gap, so it stays far away. Over millions of sentences, those small moves build the whole map.
Words used alike get nearby addresses
4. Two differences from the snack map
- Many more scales. The snack map had 2 scales, each one a direction on the map. A real one has hundreds or thousands (a small model in AI Hardcore uses 384), so it can hold much more than taste and crunch.
- Nobody sets the scales by hand. The numbers are learned from huge amounts of text: words that keep turning up in the same kind of sentences end up near each other, and the learned scales don't come with names like "sweet" or "crunchy"; only the distances between words mean something. Today's models also move a word's spot to fit its sentence (a "bat" in a cricket match lands far from a "bat" in a cave), and the same idea puts whole sentences, even pictures, on one map: that is how search by meaning finds a note without your exact words.
That second point matters. Close means used alike, not "means the same". "Hot" and "cold" appear in very similar sentences ("the soup is too hot", "the soup is too cold"), so they can sit close although they are opposites. And if the text keeps writing about a job the way it writes about men, for example always with "he", the job ends up closer to "man" than to "woman", even if that is unfair. The map copies the text, just as a sorter (a program that learns from examples to sort things) copies its examples (the lesson It learns from examples).
Many unnamed scales; close means used alike
5. Check the distances yourself
Under its table, the AI wrote this, word for word:
Closest pair: Marshmallow and jelly sweet — they're nearly identical on both scales (sweet and soft).
Furthest apart: Pretzels and yoghurt — opposite on both axes (salty/crunchy vs. mild/smooth), giving the largest combined distance.
(Its "axes" are our two scales.) Look at the map and at its table in section 1. Is it right on both counts? Was your own guess? Decide before you read on.
- The marshmallow (9, 1) and the jelly sweet (9, 2) are 1 apart, as it says. But crisps (2, 8) and pretzels (2, 9) are also exactly 1 apart. So there was a tie for closest, and it named only one pair.
- To measure a gap, go across, then up, and take the straight line (Pythagoras' theorem): the marshmallow (9, 1) and the pretzels (2, 9) are 7 across and 8 up, about 10.6 apart. The pretzels and the yoghurt (3, 1) are 1 across and 8 up, only about 8.1. You don't even need the exact lengths: both pairs are 8 up, but the marshmallow is 7 across and the yoghurt only 1, so the marshmallow is further. Its "furthest pair" was wrong by its own numbers.
- Nor are they "opposite on both axes": on salty to sweet, the pretzels score 2 and the yoghurt 3.
The scores were fine; the distances it reported about them weren't. A friendly table and a confident sentence still need checking. When it matters, work out the distances yourself, or ask it to list every pair with its distance and check a few of them against its own numbers. Search by meaning yourself in the ML Lab Lost and Found Search, step Read the scores.
Its furthest pair was wrong by its own numbers