What Does Embedding Mean?
An embedding is a list of numbers, often several hundred to a few thousand long, that represents the meaning of a piece of text. A dedicated embedding model produces it. Texts with similar meanings get lists that are close together when you measure the distance between them, even if they share no words. That makes embeddings useful for search by meaning, grouping similar documents, finding duplicates and recommending related items. An embedding is not readable by people, and you cannot reliably turn it back into the original text. It only makes sense compared with other embeddings from the same model.
Why Does Embedding Matter?
Embeddings are the engine behind most retrieval-augmented generation, where an app finds the most relevant documents and hands them to a chat model. If search results in an AI app seem off, the embedding model, how documents were split into chunks, or how many results were returned are usually the cause, not the chat model itself. Fixing retrieval often improves answers more than switching chat models.
What Does Embedding Look Like in Practice?
A help center stores an embedding for every article. When a user asks "how do I change my login email," the app embeds the question and finds the closest articles, including one titled "Updating your account address" that shares almost no words with the question. Those articles are then passed to a chat model to write the answer. A plain keyword search would have missed that article entirely.
What Do People Get Wrong About Embedding?
Embeddings are not a privacy shield. Although they look like random numbers, research has shown that text can sometimes be partly reconstructed from them. Treat stored embeddings of sensitive text as sensitive data.
Which Terms Are Related?
- RAG (retrieval-augmented generation): Looking up relevant documents first and giving them to the model, so its answer is grounded in real sources.
- Token: A small chunk of text, often part of a word, that models process; limits and prices are counted in tokens.
- Large language model: An AI model trained on vast amounts of text to predict the next token, which lets it write, answer questions and code.
- Context engineering: Deciding what goes into a model context window, including instructions, files and tool output, so the model can do the task well.
All 28 terms are in the AI glossary. For models side by side, see frontier vs open-weight.
Frequently Asked Questions
Do I need a vector database to use embeddings?
Not always. For a few thousand items, comparing embeddings in memory or with a database extension such as pgvector works fine. Dedicated vector databases help when you have millions of items or need fast filtering at scale.
Can I mix embeddings from different models?
No. Each model places meanings in its own space, so numbers from two models are not comparable. If you switch embedding models, you need to re-embed all stored documents.
Are embeddings the same as tokens?
No. Tokens are the chunks text is split into before a model processes it. An embedding is a single list of numbers that summarizes the meaning of a whole word, sentence or document.