What Are Embeddings in AI? Turning Meaning Into Numbers
An embedding is a list of numbers that captures meaning, so similar ideas end up close together. Here's how that actually works.

Search "cancel my plan" and get a result titled "ending your subscription." No shared words, same meaning, found anyway. That's embeddings at work: a way of turning text into numbers that capture meaning, so a computer can measure how similar two ideas actually are, not just whether they share the same letters.
If you haven't covered what a large language model actually is yet, start there first.
Key Takeaways
- An embedding is a list of numbers, a vector, that represents the meaning of a piece of text
- Similar meanings end up as similar vectors, sitting close together in that numeric space, even when the words themselves don't match
- This is what makes semantic search possible: finding relevant content by meaning, not exact keyword matches
- Embeddings show up in search, recommendations, duplicate detection, and RAG pipelines, RAG is one application among several, not the only one
- Comparing embeddings from two different models can silently break, even when nothing throws an error
What Are Embeddings?
Computers can't directly compare meaning, only numbers. "Dog" and "puppy" look completely different as strings of letters, but they mean nearly the same thing. An embedding is how AI bridges that gap: a model converts a piece of text into a long list of numbers, a vector, positioned so that text with similar meaning ends up close together in that numeric space, and text with very different meaning ends up far apart.
For the short version of this definition, see the embedding glossary entry.
How Embeddings Turn Meaning Into Geometry
Once meaning becomes a set of coordinates, comparing meaning becomes comparing distance. "Dog" and "puppy" land as nearby points. "Dog" and "carburetor" land far apart. Nobody hand-coded that relationship, an embedding model learned it by training on massive amounts of text until similar passages consistently produced similar vectors.
Modern embedding models are usually built on the same transformer architecture behind large language models, which is part of why they're good at this: they generate a vector for a whole chunk of text at once, accounting for the surrounding context, rather than assigning one fixed number pattern per word regardless of how it's used.

What Embeddings Are Used For
Once you can measure meaning as distance, a lot becomes possible.
Where embeddings show up
| Use case | What it does |
|---|---|
| Semantic search | Finds relevant results even when the query and document share no exact words |
| Recommendations | Finds "more like this" by locating nearby points in the same space |
| Duplicate detection | Flags near-identical content at scale by checking which vectors sit almost on top of each other |
| RAG pipelines | Retrieves the most relevant documents for a model to reference at query time |
RAG is one specific, well-known application of the same idea, not the only one. The full mechanics of how embeddings power a RAG pipeline go deeper if that's the specific use case you're building toward, including the chunking details that trip up most real implementations. If you're deciding between RAG and fine-tuning for a project, that decision framework covers it directly.
A Practical Gotcha Worth Knowing
You don't need to train an embedding model yourself for typical use. Call one through an API or a small local model, get a vector back, store it, and compare it against other vectors generated the same way.
That last part matters more than it sounds. Each embedding model builds its own numeric space, shaped by how it was trained. Mix vectors from two different models, or even two different versions of the same model, and comparisons silently stop making sense. Nothing throws an error. The numbers are all still valid numbers. They just no longer mean what you think they mean, because they were never placed in the same space to begin with.
If semantic search or retrieval starts returning oddly irrelevant results with no obvious cause, mismatched embedding models between indexing and querying is one of the first things worth checking, right alongside how the source text was split into chunks.
FAQ