Intermediate · 07
Embeddings: meaning as maps
How AI turns words, images and songs into points in space where closeness means similarity.
5 min read · Tap underlined words for a definition
Swipe up to begin
Computers only understand numbers. So how does a model know that "puppy" is close to "dog" but far from "spreadsheet"? It gives every word a list of numbers, an embedding, so that similar meanings land near each other.
Words as coordinates
Each becomes a vector, e.g. 768 numbers long.
These numbers are learned during training. Nobody hand-picks them; they emerge from which words appear in similar contexts.
Maths on meaning
Famous result from word2vec: king − man + woman ≈ queen.
Directions in the space can capture concepts like gender, tense, or country → capital.
In a good embedding space, "cat" and "kitten" should be…
Measuring closeness
Cosine similarity compares the angle between two vectors: 1 = same direction, 0 = unrelated.
It's how semantic search finds documents that mean the same thing even with different words.
Embeddings everywhere
Not just words: sentences, images (CLIP puts images and captions in the same space), products, songs, users.
Recommendation systems, search engines and (Advanced level) all run on .
Where do embedding values come from?
Before you drift off
- Embeddings turn things into vectors where closeness = similarity.
- They're learned, not hand-written.
- Cosine similarity measures how close two embeddings are.
- They power search, recommendations and RAG.
Terms in this lesson
Go deeper, free and open
- The Illustrated Word2vec · Jay Alammar
- Hugging Face LLM Course: Semantic search with embeddings · Hugging Face · Apache 2.0
- Embedding Projector (interactive) · TensorFlow / Google
That's the lesson
Embeddings: meaning as maps · 5 min
Each lesson you finish lights a star.
Spotted a mistake? Suggest an edit
Previous: Seeing and remembering: CNNs & RNNs