Turning words into numbers
To do math on meaning, turn each word into a position: a vector.
cat is fixed. Tap dog or car to place it as cat's neighbour.
But a flat map can't separate every nuance… we need more dimensions.
1.2 Embeddings: meaning as coordinatesCommon questions
What is "Turning words into numbers" about?
What makes this tricky?
What will I be able to do after this lesson?
What comes next?
What this lesson shows
To do math on meaning, turn each word into a position: a vector.
The question it opens with
Is 'cat' more like 'dog' or like 'car'? With only letters, you can't compute it.
The walkthrough, in the lesson's own words
- On the scrambled map, tap the word you'd put next to cat: dog or car? Gut call.
- Watch the model sort every word: similar meanings drift together.
- Tap dog or car, whichever you'd place next to cat. There's no wrong answer yet.
- Watch the model place every word. Words that mean similar things drift into the same cluster.
- But the model can't see meaning, only letters. Do these share any?
- A hand-drawn map in the model's style; real maps are learned, see 2.5.
- You search a help center for “can't sign in” and it surfaces an article titled “login troubleshooting”, even though you typed none of those words. How?
- Each phrase is turned into a vector, a position by meaning, and the search matches on nearby positions, not shared letters. That is why “can't sign in” lands next to “login” even with zero words in common.
- No letter appears in both. By letters alone, cat and dog look unrelated.
- Scrambled at first, now watch them sort by meaning.
- Similar meanings cluster together. Near positions = similar meaning.
- Turning words into positions is what lets the model compare them by meaning at all, the missing piece behind the ranked guesses you saw in 0.1. Each position is a pair of numbers, called a
- Now you try: drag the mystery word anywhere and watch its nearest neighbour update.
Key takeaway
I placed 'cat' near 'dog' and far from 'car', and the machine agreed.
What you can do after this lesson
You can explain why words must become vectors for a machine to compare meaning.
Check yourself: Why does a model turn words into vectors (numbers)?
- So it can measure how similar meanings are(correct)
- To compress the text
- To encrypt the input
- To sort words alphabetically
As coordinates, related meanings sit close together, so the model can measure similarity as distance. Letters can't be compared that way.
Where it leads: But a flat map can't separate every nuance… we need more dimensions.
This is the written summary. The lesson itself is interactive: you predict, drag and operate the mechanism above, and the reveal answers you.