How words become meaningful vectors
Learn how language models map words into vectors so similarity, context, and analogy can be represented numerically.
Before We Begin
Embeddings solve a central problem in NLP: words must become numbers before a model can process them, but naΓ―ve numbering destroys meaning. Word2Vec and related methods learn vectors whose geometry reflects patterns of use, so words appearing in similar contexts end up near one another.
How this lesson fits
This module explains the modern language-model stack from the inside out. Students see how words become vectors, how attention lets models choose context dynamically, and how large-scale next-token training turns those ingredients into systems that can write, summarize, and answer questions.
The big question
How can a machine represent meaning, decide which context matters, and then generate fluent language one token at a time?
Why You Should Care
Embeddings are the bridge between language and computation. Without them, text is just raw symbols; with them, similarity, context, and analogy become something a model can measure and manipulate.
Where this is used today
Think of it like this
Think of a map where each word gets an address. Words used in similar situations end up in the same neighborhood, while words playing very different roles are farther apart. Distance on the map becomes a proxy for related meaning.
Easy mistake to make
Embeddings are not perfect dictionaries of meaning. They reflect the patterns, associations, and biases present in the data they were trained on.
Think about this first
If a computer only sees text and never receives a dictionary, how could it still discover that 'doctor' and 'nurse' are more related than 'doctor' and 'banana'?
Words we will keep using
Imagine if words were places on a map. "King" and "Queen" would live next door. "Apple" and "Banana" would be down the street. This is what embeddings do: they turn meaning into geometry.
In the explorer below, you are looking at Word2Vec embeddings that were originally far larger. We squash them down to 3D so you can move around them and notice that language begins to form neighborhoods.
PCA 3D Projection
Initialisingβ¦
The training is surprisingly simple: Pick a word, and ask the model to guess its neighbors. Do this billions of times. Words that appear in similar contexts will naturally drift closer together in vector space.
The formal goal says: given the center word , make the nearby context words as predictable as possible.
Where is defined by the softmax of the dot product:
If two arrows point in the same direction, the words are related. If they point in different directions, they are unrelated. It's that simple.
Try searching for βgoodβ in the explorer above and inspect the nearest neighbors. That is where the abstract idea suddenly starts to feel real.