Volume 1 / Part 3 Mechanics — What Happens Inside / Chapter 27
Embedding — Turning Words into Numerical Coordinates
Last time we talked about how Japanese text tends to split into more tokens than English. So what do those tokens actually look like once they're inside the AI? Not letters, not sounds — just a string of numbers. And remarkably, that arrangement of numbers carries real meaning. This time, let's look at embedding, the mechanism that lets AI treat words as coordinates.
What Happens After Tokens
Last time we saw how a sentence gets chopped into small units called tokens, and how Japanese tends to need more of them than English. So once a sentence is split into tokens, does the AI just use them as they are?
The answer is no. Tokens get transformed into something else first: a string of numbers. That's today's main character — Embedding.
"Embedding" sounds intimidating, but the idea underneath it is surprisingly simple. It's just converting a word into something like a numerical address. Let's open up that address together in the next section.
When Words Become Vectors
Embedding means turning a token or a sentence into a vector — an array of real numbers. That array can run from a few hundred entries to a few thousand. According to OpenAI's official documentation, its embedding model text-embedding-3-small represents each word or sentence with 1,536 numbers, while text-embedding-3-large uses 3,072 by default (OpenAI Developers Docs, specs as of October 2026).
Google's BERT tells a similar story. BERT-base represents each token with 768 numbers, BERT-large with 1,024. These are the design values from Devlin et al.'s original paper, also cited in the schuBERT paper.
Hearing "hundreds or thousands of numbers" might sound excessive. But think of it like a profile card listing your height, hometown, and favorite food. Words carry a long list of traits too — it just helps to picture each one as its own entry on the card.
An embedding is basically "a word expressed as hundreds or thousands of numbers" — an address. The collection of these addresses forms the meaning space we'll unpack next.
What "Dimensions" Actually Means
The length of a vector — how many numbers are strung together — is called its "dimension." Saying "768 dimensions" just means the word is represented by 768 numbers. So what does each dimension actually stand for?
The easiest way to picture it is as an axis for some feature. If you had three axes — height, weight, age — you could plot a person as a single point in 3D space. Word embeddings work on the same principle, just imagine dozens or hundreds of axes standing for things like hardness, brightness, or abstractness.
One caveat, though. Real embeddings don't always let a human point at a single dimension and say "this one is clearly the brightness axis." Some research has found what looks like a gender-related axis (The Geometry of Culture, arXiv:1803.09288), but that's an interpretation found in a handful of dimensions, not a general rule. Most dimensions likely encode tangled, overlapping features that resist a simple human label.
Does king − man + woman Really Equal queen?
When people talk about how strange embeddings can get, this example always comes up: take the vector for "king," subtract "man," add "woman," and you land near the vector for "queen." It became widely known after Mikolov and colleagues introduced the word2vec method in their 2013 paper.
This example is usually offered as proof that embedding space is tidy enough to support this kind of semantic arithmetic — as if a "gender" axis and a "royalty" axis are neatly folded into the vectors.
But there's a catch. A follow-up analysis by Allen and Hospedales (arXiv:1901.09813) points out that the arithmetic only lands on "queen" under an evaluation rule that excludes king, man, and woman themselves from the candidate answers. Drop that exclusion rule, and the nearest word can snap right back to the original "king." It's a catchy, intuitive example — just not quite the universal trick it looks like.
king − man + woman = queen is a nice demonstration of what embeddings can do — not proof that embeddings are a finished, perfect system.
Whole Sentences and Documents Become Coordinates Too
Everything so far has been about single words or tokens, but embedding works on whole sentences, even entire documents. A full sentence can be squeezed into a single vector.
These sentence-level embeddings get used for semantic search and clustering. OpenAI describes text-embedding-3-large as a model designed for search, semantic search, clustering, and classification (learn.engineering.vips.edu, explainer as of October 2026).
Imagine finding a document that doesn't share a single keyword with your query, just because it means something similar. Search for "why did prices go up" and get a hit on a document titled "background on the pricing revision" — no matching words at all. That works because the search isn't comparing letters; it's comparing how close two points sit in coordinate space. That idea of "closeness" is exactly what we'll dig into next time.
Who Decided These Coordinates?
By now you might be wondering who actually decided these dimensions and coordinates. Did some engineer sit down and manually assign "this axis is gender, this axis is hardness"?
No. Embeddings aren't hand-built rule sets; they're representations learned from huge piles of data. Mikolov and colleagues' word2vec paper proposed exactly this kind of method: automatically computing continuous vector representations from a large dataset. Nobody teaches the model meaning directly. Instead, after reading enormous amounts of text, words that get used in similar ways naturally drift toward similar coordinates.
The number of dimensions itself varies by model and gets fixed at design time. BERT-base uses 768, BERT-large uses 1,024, OpenAI's text-embedding-3-small uses 1,536, and text-embedding-3-large defaults to 3,072 (all per OpenAI Developers Docs and the schuBERT paper, specs as of October 2026). That's not something you can casually change afterward. That said, newer OpenAI embedding models offer an exception: a dimensions parameter lets you request fewer dimensions than the default, and thanks to a training technique called Matryoshka Representation Learning, the model can still preserve conceptual meaning even at that reduced size.
Embedding coordinates aren't designed by humans — they're learned from data. The dimension count is a fixed value that differs model by model.
FAQ
Does a higher dimension count always make an embedding better?
Not necessarily. More dimensions tends to mean more expressive power, but it also raises computational cost. OpenAI's newer embedding models show you can trim down to fewer than the default dimensions, using training tricks, without losing much performance.
Does king − man + woman really equal queen?
It holds under an evaluation rule that excludes the original words (king, man, woman) from the candidate answers. Drop that rule, though, and the nearest word can snap back to the original king — so it's not quite as universal a property as it looks.
Do humans decide what each embedding dimension means?
No. Embeddings aren't designed by hand — they're representations learned automatically from large datasets. Researchers sometimes try to interpret what a given dimension represents after the fact, but that meaning isn't assigned during design.
Now that we know what the coordinates look like, the next question is: what does 'close' even mean? Next time, we'll look at how semantic closeness translates into actual distance measurements between vectors.
Primary sources
- OpenAI Developers Docs: Vector embeddings — Official specs on OpenAI embedding model dimension counts and the dimensions parameter
- schuBERT: Optimizing Elements of BERT — Hidden-layer dimension and parameter counts for BERT-base/large
- Mikolov et al. (2013) Efficient Estimation of Word Representations in Vector Space — The original word2vec paper; primary source on embeddings being learned rather than designed
- Analogies Explained: Towards Understanding Word Embeddings — Academic analysis of the king − man + woman = queen property
- The Geometry of Culture: Analyzing Meaning through Word Embeddings — A concrete example of interpreting embedding dimensions as feature axes
- OpenAI text-embedding-3-large (model overview) — Positions the model for search and clustering use cases
This article organizes general knowledge based on our experience and public sources. Product specs, prices, and regulations reflect the time of writing (October 6, 2026) and may change.