Before a language model can reason about text, it must convert words into numbers. Each word (or sub-word token) is mapped to a high-dimensional embedding vector whose direction and position encode meaning — words that mean similar things end up near each other in that vector space. This simulation projects a toy embedding space down to 3 dimensions so you can fly through it directly.
king − man + woman ≈ queen relationship: the same directional "royalty" offset applied to a different starting point lands near a semantically related word.Real language-model embeddings often have 768, 1536 or more dimensions. This simulation uses only 3 so it can be rendered directly in WebGL — real models rely on techniques like t-SNE or UMAP to compress those hundreds of dimensions down to 2D or 3D for visualization.
A live 3D word-embedding space where semantically related words cluster together, nearest-neighbor links reveal which words a model considers "close" in meaning, and a vector-arithmetic demo shows how embeddings encode analogies.
How tokenized words become numeric vectors whose geometric position captures meaning — related concepts cluster, and directions between points can represent relationships like gender or royalty.
Filter by semantic category, drag the similarity threshold to reveal or hide neighbor links, click a word to highlight its nearest neighbors, and toggle the king−man+woman analogy vectors.
The famous king − man + woman ≈ queen result from Word2Vec (2013) showed that simple vector arithmetic on learned embeddings can capture real semantic relationships.