Embedding
In short
An embedding is a list of numbers that an AI system uses to represent a piece of text, an image or another item, arranged so that things with similar meanings end up close together. Embeddings power meaning-based search and recommendations.
- Also called
- Embeddings, Vector embedding, Word embedding, Text embedding
- Topic
- How AI models work
- Level
- Some background helps
Computers cannot work with words directly, so AI systems turn them into numbers. An embedding is that numerical form. OpenAI's documentation defines it as "a vector (list) of floating point numbers" and says the distance between two embeddings measures how related they are: small distances suggest high relatedness1.
The idea of learning a "distributed representation" for each word was set out by Yoshua Bengio and colleagues in 2003. Their model could handle sentences it had never seen, because words with nearby representations were treated as similar2. In 2013 Tomas Mikolov and colleagues at Google showed that good word vectors could be learned from a 1.6 billion word data set in less than a day3. Their paper notes that vector("King") minus vector("Man") plus vector("Woman") lands closest to the vector for "Queen"3.
Modern embedding models work on whole sentences and documents, not just single words. OpenAI's text-embedding-3-small produces 1,536 numbers per input by default, and text-embedding-3-large produces 3,0721. OpenAI lists search, clustering, recommendations, anomaly detection and classification as typical uses1.
Embeddings also sit inside every language model. The transformer begins by using learned embeddings to convert each input token into a vector4.
An embedding is not the text itself, and you cannot read it like a sentence. It only tells a system how close one item is to another.
Example
Search "rain coat" on a shop site that uses embedding search and it can still find a "waterproof jacket". The phrases share no words, but their embeddings sit close together, so the system treats them as related1.
Why it matters
Embeddings are how AI tools find information by meaning rather than exact keywords. They sit behind retrieval-augmented generation, where a chatbot looks things up in your documents before answering.
Questions people ask
Is an embedding the same as a vector?
Every embedding is a vector, meaning a list of numbers1. But not every vector is an embedding. The word embedding means the numbers were learned so that similar items sit close together.
What are embeddings used for?
Mainly search and retrieval by meaning. OpenAI also lists clustering, recommendations, anomaly detection, diversity measurement and classification1. Chatbots that answer from your own files usually use embeddings to find the relevant passages first.
Related terms
Tools that use it
- Gemini Embedding 2Google's first embedding model that maps text, images, video, audio and PDFs into one space
- EmbeddingGemma 2Small open Google model that turns text, code, images, audio and video into searchable vectors on-device
- PineconeManaged vector database that lets AI apps and agents search company data by meaning
Sources
- OpenAI API documentation, Vector embeddings guide
- Bengio, Ducharme, Vincent and Jauvin (2003), A Neural Probabilistic Language Model, Journal of Machine Learning Research 3
- Mikolov, Chen, Corrado and Dean (2013), Efficient Estimation of Word Representations in Vector Space, arXiv:1301.3781
- Vaswani et al. (2017), Attention Is All You Need, arXiv:1706.03762