Embeddings, Explained: the Numbers Behind How AI Searches and Remembers
Every question you ask an AI is turned into a list of numbers — a position in space where similar meanings sit close together. That one move quietly powers search, memory and recommendations.

Ask a chatbot a question and, behind the scenes, your words are almost immediately turned into a list of numbers. Not a code, not a compression — a position. Embeddings are how an AI converts the messy, ambiguous stuff of language into coordinates it can do arithmetic on, and they quietly power three of the things you most associate with modern AI: search that understands you, chatbots that can "remember," and recommendations that feel uncannily apt.
Here is the whole idea in one sentence: an embedding turns a piece of text into a point in space, positioned so that things which mean similar things sit close together.
Meaning as a location
Picture a map where every word, sentence or document is a dot. On a good map, "dog" and "puppy" land almost on top of each other; "dog" and "wolf" are nearby; "dog" and "quarterly tax return" are on opposite sides of the room. The embedding is just the dot's coordinates — except instead of two dimensions like a paper map, there are hundreds or thousands. A typical modern embedding might be a list of 768, 1,536 or 3,072 numbers. No human can picture 1,536-dimensional space, but the maths of "how close are these two points" works exactly the same as it does on a flat map.
That closeness is the entire trick. Once meaning becomes distance, a computer can answer "what is similar to this?" by doing nothing more exotic than measuring the gap between two lists of numbers. The usual measure is cosine similarity — essentially the angle between two arrows pointing out from the origin. Small angle, similar meaning.
Where the numbers come from
The coordinates are not assigned by hand; they are learned. An embedding model is trained on enormous amounts of text with a simple pressure applied over and over: push things that appear in similar contexts together, push unrelated things apart. Do that across billions of examples and a geometry emerges in which proximity tracks meaning.
The classic demonstration, from the early word-embedding model word2vec, was that you could even do analogies with vector arithmetic: take the vector for "king," subtract "man," add "woman," and you land near "queen." It is a genuinely striking result — though it is worth saying it was always cleaner in the textbook than in practice, and modern systems lean on it less directly than that party trick suggests.
What modern embeddings have added is context. Older models gave every word one fixed vector, so "bank" had a single location whether you meant a riverbank or a savings account. Today's embeddings are contextual: the model reads the whole sentence and places "bank" in a different spot depending on what surrounds it. The same word, two meanings, two coordinates.
What this actually buys you
Search that understands intent. Traditional search matches keywords; embedding-based ("semantic") search matches meaning. Embed the query, embed every document, return the nearest ones — so "how do I stop my program from crashing" can surface a guide titled "handling exceptions in Python," with not one word in common.
Memory, and how chatbots look things up. This is the engine inside retrieval-augmented generation, or RAG — the standard way an AI consults information it wasn't trained on. The documents are embedded and stored in a vector database; when you ask something, your question is embedded, the nearest chunks are pulled, and those chunks are handed to the model to answer from. It is a large part of how a system reaches past its training cutoff to cite a document you uploaded a minute ago.
Recommendation, clustering, deduplication, classification. "More like this," grouping similar support tickets, spotting near-duplicate articles, sorting messages by topic — all of it is, underneath, points-near-points.
The honest limits
Embeddings are powerful, not magic, and three caveats matter.
First, similar is not the same as true or relevant. Semantic search retrieves what is near, and near can still be wrong — a confidently-phrased but incorrect passage can sit right beside your query. This is exactly why RAG systems sometimes surface authoritative-sounding nonsense: the geometry found something close, not something correct.
Second, the numbers carry their training data's biases. If the text the model learned from associates certain jobs or names with certain groups, those associations get baked into the coordinates, and they will quietly shape what counts as "similar."
Third, you cannot mix and match. Vectors from one embedding model live in a different space from another's; comparing them directly is meaningless. And no single number in the list means anything on its own — there is no "royalty" dimension to read off. Meaning is smeared across all of them at once.
None of that diminishes how foundational the idea is. Turning words into positions is one of those moves that looks almost too simple to matter — and then turns out to sit underneath search, memory and recommendation all at once.
Ask Relay — he reads every question himself and replies personally by email.
