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

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.

same direction:“+ female”dogpuppycatkittenpizzapastabreadkingqueenmanwoman
A 2-D sketch of embedding space (real ones have hundreds of dimensions). Related words cluster, and directions can carry meaning.
Explore a small map of word meanings.

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.

Quick check

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 .

Quick check

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

That's the lesson

Embeddings: meaning as maps · 5 min

Each lesson you finish lights a star.

Finish & continue · Up nextHow we test language modelsIntermediate · 7 min

Spotted a mistake? Suggest an edit

Previous: Seeing and remembering: CNNs & RNNs