What an embedding is
An embedding is a list of numbers that a model computes for a piece of data, such as a sentence, a product description or an image. The model places each item so that items with a similar meaning get similar numbers. Google's Machine Learning Crash Course defines embeddings as “low-dimensional representations of high-dimensional data, often used to capture semantic relationships between items.” IBM describes the same idea as points “in a continuous vector space where the locations of those points in space are semantically meaningful”.
Each number is one dimension. A sentence might become a list of 1,536 numbers, and a second sentence about the same topic gets a list that lies close to it. Google notes that positions can reflect a relationship, but “often the process of finding a lower-dimensional space, and relative positions in that space, is not interpretable by humans”. What carries the information is the position of one embedding relative to the others.
Four related terms, side by side:
| Term | What it is |
|---|---|
| Vector | Any list of numbers. Cohere puts the relation this way: “Embeddings are a specific type of vector”. |
| Embedding | A vector computed by a model so that its position reflects meaning. |
| One-hot encoding | An older way to turn categories into numbers: one long vector per item that says nothing about how items relate. Google names its “lack of meaningful relations between vectors” as a problem embeddings address. |
| Embedding model | The model that takes text or other data and returns an embedding instead of text. |
Illustration: two axes out of many
one dimension
another dimension
The same words as numbersmade-up example values
cat[0.12, -0.40, 0.33, …]
kitten[0.15, -0.37, 0.30, …]
invoice[-0.81, 0.66, -0.05, …]
Where embeddings come from
The idea became practical for words with word2vec, published by Mikolov and colleagues at Google in 2013. The paper describes “continuous vector representations of words from very large data sets” and reports that “it takes less than a day to learn high quality word vectors from a 1.6 billion words data set”. GloVe, by Pennington, Socher and Manning (2014), is another word-vector method of that period.
These early models give each word one fixed vector. Google's course names the limit: “Static embeddings like word2vec represent all meanings of a word with a single point, which can be a limitation in some cases.” The word2vec authors noted a second one in a follow-up paper the same year: “An inherent limitation of word representations is their indifference to word order and their inability to represent idiomatic phrases.”
The Transformer, described in 2017, starts with the same step. Its authors write: “we use learned embeddings to convert the input tokens and output tokens to vectors”. BERT (2018) built on it and is designed to learn “by jointly conditioning on both left and right context in all layers”, so the vector for a word depends on the sentence around it. Comparing whole sentences with BERT was slow, though. The Sentence-BERT paper of 2019 counts that finding the most similar pair among 10,000 sentences “requires about 50 million inference computations (~65 hours) with BERT” and reports a reduction “from 65 hours with BERT / RoBERTa to about 5 seconds with SBERT”.
How closeness is measured
Two embeddings are compared with a distance or similarity measure. Wikipedia's article on embeddings lists three:
| Measure | What it compares |
|---|---|
| Euclidean distance | The straight-line distance between two points. Smaller means closer. |
| Cosine similarity | The angle between two vectors, regardless of their length. |
| Dot product | Angle and length together. |
OpenAI writes that “The choice of distance function typically doesn’t matter much.” Wikipedia's article notes that “The cosine similarity disregards the magnitude of the vector when determining similarity”. OpenAI recommends cosine similarity and adds that its embeddings “are normalized to length 1”, which means a dot product gives the same value and “Cosine similarity and Euclidean distance will result in the identical rankings”. How this ranks documents against a query is covered under semantic search.
Models, dimensions and shortening
Embedding models are separate products with their own names and versions. As of 4 December 2026, OpenAI, Google and Voyage AI each publish a default length for their text embeddings, between 1,024 and 3,072 numbers, and each lets developers choose a shorter one:
| Provider | Model | Length |
|---|---|---|
| OpenAI | text- | 1,536 and 3,072 by default, shorter with the dimensions parameter |
| Google (Gemini API) | gemini- | 3,072 by default, 768 and 1,536 recommended as shorter sizes |
| Voyage AI | voyage- | 1,024 by default, also 256, 512 and 2,048 |
| Cohere | embed- | 256, 512, 768, 1,024, 1,536 or 2,048 to choose; 1,024 in the documentation examples |
Anthropic is not in the table because it states: “Anthropic does not offer its own embedding model.” Its documentation points to Voyage AI instead. Google calls gemini-embedding-2 “the first multimodal embedding model in the Gemini API”, so text, images, video and audio land in one shared space.
The method behind shortening is Matryoshka Representation Learning, published in 2022, which OpenAI cites in its announcement of the text-embedding-3 models. It “allows a single embedding to adapt to the computational constraints of downstream tasks”. Cohere describes it as embeddings “with coarse-to-fine representation within a single vector”. Google gives the reason to shorten: a smaller size “can save storage space and increase computational efficiency”. OpenAI gives an example from its own tests: “a text-embedding-3-large embedding can be shortened to a size of 256 while still outperforming an unshortened text-embedding-ada-002 embedding with a size of 1536.”
One public yardstick for quality is MTEB, the Massive Text Embedding Benchmark from 2022, which “spans 8 embedding tasks covering a total of 58 datasets and 112 languages.” According to OpenAI, text-embedding-3-small scores 62.3% and text-embedding-3-large 64.6% on it, against 61.0% for the older ada-002. These are the provider's own figures. The MTEB authors, after testing 33 models, concluded that “no particular text embedding method dominates across all tasks.”
Limits
Embedding models have a knowledge cutoff too. OpenAI states that text-embedding-3-large and text-embedding-3-small “lack knowledge of events that occurred after September 2021.” It adds that this matters less than for text generation, but “in certain edge cases it can reduce performance”.
Vectors from different models do not mix. A query and the documents it is compared with are embedded by the same model. OpenAI's own code search example embeds the query “using the same model” as the indexed functions. Voyage AI is an exception within one product line: “All embeddings created with the 4 series are compatible with each other.”
The numbers are hard to read. Because single dimensions often carry no meaning a person can name, an embedding does not explain why two texts count as similar.
One vector per text. A long page turned into a single embedding is reduced to one position. One way around this is to split a text into passages and embed each one; see content chunking.
What embeddings are used for
OpenAI lists the common uses of its text embeddings: search, clustering, recommendations, anomaly detection, diversity measurement and classification. All of them rest on the same step of finding items whose embeddings lie close together.
Search is the best-known case. A 2020 paper on dense passage retrieval reported that a retriever built on embeddings “outperforms a strong Lucene-BM25 system largely by 9%-19% absolute in terms of top-20 passage retrieval accuracy”. That figure comes from question-answering datasets, not from web search. In retrieval-augmented generation, embeddings are how the system finds the passages it hands to the language model. How search engines combine meaning with other signals is covered under semantic search and passage ranking.
Embedding model, LLM and vector database
An embedding model and a large language model both read text, but they return different things. An embedding model returns a list of numbers. An LLM returns text. Inside a Transformer-based LLM, the first step turns tokens into embeddings, as the Transformer paper describes, but those internal vectors are not what a chat assistant gives back.
The providers publish embedding models as products of their own: OpenAI the text-embedding-3 models, Google the gemini-embedding models. Anthropic states that it offers none and points to Voyage AI.
A vector database stores embeddings and finds the closest ones to a query quickly. OpenAI recommends one “For searching over many vectors quickly”. It is storage and search, not a model: it does not create embeddings itself.
Source
- Google, Machine Learning Crash Course, “Embeddings”. Source for one-hot encoding and the encoding/embedding distinction (retrieved 2026-12-04): https://developers.google.com/machine-learning/crash-course/embeddings
- Google, Machine Learning Crash Course, “Embedding space and static embeddings”. Source for the definition, interpretability and static embeddings (retrieved 2026-12-04): https://developers.google.com/machine-learning/crash-course/embeddings/embedding-space
- IBM, “What is embedding?”. Source for the vector-space description (retrieved 2026-12-04): https://www.ibm.com/think/topics/embedding
- Cohere, “What Are Embeddings?”. Source for embeddings as a type of vector (retrieved 2026-12-04): https://cohere.com/blog/embeddings
- Mikolov et al., “Efficient Estimation of Word Representations in Vector Space”, arXiv:1301.3781 (submitted 16 January 2013). Source for word2vec (retrieved 2026-12-04): https://arxiv.org/abs/1301.3781
- Mikolov et al., “Distributed Representations of Words and Phrases and their Compositionality”, arXiv:1310.4546 (submitted 16 October 2013). Source for the word-order limit (retrieved 2026-12-04): https://arxiv.org/abs/1310.4546
- Pennington, Socher and Manning, “GloVe: Global Vectors for Word Representation”, EMNLP 2014. Source for GloVe (retrieved 2026-12-04): https://aclanthology.org/D14-1162/
- Vaswani et al., “Attention Is All You Need”, arXiv:1706.03762 (submitted 12 June 2017). Source for embeddings in the Transformer (retrieved 2026-12-04): https://arxiv.org/html/1706.03762
- Devlin et al., “BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding”, arXiv:1810.04805 (submitted 11 October 2018). Source for BERT (retrieved 2026-12-04): https://arxiv.org/abs/1810.04805
- Reimers and Gurevych, “Sentence-BERT”, arXiv:1908.10084 (submitted 27 August 2019). Source for the 65 hours and 5 seconds (retrieved 2026-12-04): https://arxiv.org/abs/1908.10084
- Wikipedia, “Embedding (machine learning)”. Source for cosine similarity and magnitude (retrieved 2026-12-04): https://en.wikipedia.org/wiki/Embedding_(machine_learning)
- OpenAI API, “Vector embeddings” guide. Source for default lengths, normalization, distance functions, uses, MTEB figures and the September 2021 cutoff (retrieved 2026-12-04): https://developers.openai.com/api/docs/guides/embeddings
- OpenAI, “New embedding models and API updates” (25 January 2024). Source for shortening text-embedding-3-large (retrieved 2026-12-04): https://openai.com/index/new-embedding-models-and-api-updates/
- Google AI Studio, “Embeddings” (Gemini API). Source for gemini-embedding-2, default length and recommended sizes (retrieved 2026-12-04): https://aistudio.google.com/docs/embeddings
- Voyage AI, “Text Embeddings”. Source for voyage-4 lengths and compatibility (retrieved 2026-12-04): https://docs.voyageai.com/docs/embeddings
- Anthropic, “Embeddings”. Source for Anthropic having no embedding model (retrieved 2026-12-04): https://platform.claude.com/docs/en/build-with-claude/embeddings
- Cohere, “Introduction to Embeddings”. Source for the embed-v5.0-pro example (retrieved 2026-12-04): https://docs.cohere.com/docs/embeddings
- Kusupati et al., “Matryoshka Representation Learning”, arXiv:2205.13147 (submitted 26 May 2022). Source for shortening embeddings (retrieved 2026-12-04): https://arxiv.org/abs/2205.13147
- Muennighoff et al., “MTEB: Massive Text Embedding Benchmark”, arXiv:2210.07316 (submitted 13 October 2022). Source for the benchmark and its finding (retrieved 2026-12-04): https://arxiv.org/abs/2210.07316
- Karpukhin et al., “Dense Passage Retrieval for Open-Domain Question Answering”, arXiv:2004.04906 (submitted 10 April 2020). Source for the retrieval comparison (retrieved 2026-12-04): https://arxiv.org/abs/2004.04906
Frequently asked questions
What is the main purpose of embeddings?
Embeddings turn text, images or other data into numbers so that a program can measure how similar two items are. OpenAI lists search, clustering, recommendations, anomaly detection, diversity measurement and classification as the common uses.
What is the difference between vectors and embeddings?
A vector is any list of numbers. An embedding is a vector that a model computed so that its position reflects meaning. Cohere puts it as: embeddings are a specific type of vector.
Is GPT an embedding model?
No. GPT models generate text. OpenAI offers separate embedding models, text-embedding-3-small and text-embedding-3-large. Google likewise separates Gemini from its gemini-embedding models, and Anthropic offers no embedding model of its own and points to Voyage AI.
What is the difference between embedding and encoding?
One-hot encoding, the example in Google's Machine Learning Crash Course, gives each item its own long vector by a fixed rule, and Google notes that such vectors lack meaningful relations between items. An embedding is learned by a model, so related items end up close together.
Does ChatGPT use word embeddings?
Language models built on the Transformer architecture of 2017 start by turning input tokens into learned embeddings. Developers who need embeddings for search or comparison call OpenAI's separate embedding models, not ChatGPT.