# What are embeddings in AI? A simple explanation · AI in Bed

https://www.aiinbed.com/blog/what-are-embeddings · Published 2026-11-25

**Short answer:** An embedding is a list of numbers, called a vector, that represents the meaning of something: a word, a sentence, a document, an image or a product. Things with similar meanings get vectors that are close together, so a computer can find related items by measuring distance. Embeddings power semantic search, RAG chatbots, recommendations and clustering.

### Meaning as coordinates

Imagine placing every word on a map so that similar words sit near each other: "cat" next to "kitten", both near "dog", all far from "spreadsheet". An [embedding](https://www.aiinbed.com/glossary/embedding) is a word's coordinates on that map.

A real embedding map doesn't have two dimensions but hundreds or thousands, so each embedding is a list of that many numbers. No single number means anything obvious on its own; meaning comes from where the whole point sits relative to others.

The [embeddings lesson](https://www.aiinbed.com/learn/intermediate/embeddings) has an interactive map you can explore.

### How similarity is measured

To compare two embeddings, systems usually use **cosine similarity**: how closely the two vectors point in the same direction. A score near 1 means very similar, near 0 means unrelated.

This is what lets you search by meaning. A search for "how do I get my money back" can find a page titled "Refund policy" even though they share no words, because their embeddings land close together.

Famously, the 2013 word2vec work showed directions in the space can capture relationships: the vector for "king" minus "man" plus "woman" lands near "queen". Modern embeddings are messier, but the idea of meaning as geometry stuck.

### Where embeddings come from

Embeddings are learned. A [neural network](https://www.aiinbed.com/glossary/neural-network) is trained on a huge amount of data with a task that forces it to understand meaning, such as predicting nearby words or matching questions with their answers. Along the way it learns to place similar things close together.

Inside a [large language model](https://www.aiinbed.com/glossary/llm), the very first step turns each [token](https://www.aiinbed.com/glossary/token) into an embedding, and every layer after that refines those vectors using [attention](https://www.aiinbed.com/glossary/attention). Separate **embedding models** are trained just to produce one good vector per sentence or document for search.

### What embeddings are used for

- **Semantic search:** find documents by meaning, not exact words.
- **RAG chatbots:** find the passages an AI should read before it answers. See [what is RAG](https://www.aiinbed.com/blog/what-is-rag).
- **Recommendations:** embed users and items, and suggest items close to what you liked. See the [recommender systems lesson](https://www.aiinbed.com/learn/intermediate/recommender-systems).
- **Clustering:** group similar support tickets, reviews or articles automatically ([clustering](https://www.aiinbed.com/glossary/clustering)).
- **Duplicates and anomalies:** spot near-identical items or ones that don't fit.
- **Images and multimodal:** models like CLIP put pictures and captions in the same space, so you can search photos with words. See [multimodal](https://www.aiinbed.com/glossary/multimodal).

### Vector databases

Comparing a question against millions of embeddings one by one would be slow. A **vector database** or vector index stores embeddings and uses clever shortcuts (approximate nearest-neighbour search) to find the closest ones in milliseconds. Open-source options include FAISS, and many ordinary databases now support vectors too.

> Always use the same embedding model for your documents and your queries. Vectors from different models live on different maps and can't be compared.

### Key takeaways

- An embedding is a point in a space with hundreds or thousands of dimensions.
- Close together means similar in meaning; far apart means unrelated.
- They're learned by a neural network, not written by hand.
- Uses: search by meaning, RAG, recommendations, duplicates, clustering.

### Questions

**What is an embedding in simple terms?**

It's a list of numbers that represents the meaning of a piece of data, like a word or sentence. Similar meanings get similar numbers, so a computer can tell which things are related.

**What is the difference between a token and an embedding?**

A token is a piece of text, such as a word or part of a word, with an ID number. An embedding is the list of numbers a model uses to represent that token's, or a whole text's, meaning.

**What are embeddings used for?**

Semantic search, finding passages for RAG chatbots, recommendations, clustering similar items, spotting duplicates, and searching images with text.

**What is a vector embedding?**

The same thing as an embedding: the word vector just stresses that it's a list of numbers that can be treated as a point or direction in a high-dimensional space.

### Sources

- [The Illustrated Word2vec](https://jalammar.github.io/illustrated-word2vec/) by Jay Alammar
- [Efficient Estimation of Word Representations in Vector Space](https://arxiv.org/abs/1301.3781) by Mikolov et al., 2013
- [Machine Learning Crash Course: Embeddings](https://developers.google.com/machine-learning/crash-course) by Google
