Book a demo →

Embeddings

Definition

An embedding is a list of numbers that represents text, an image or other data so that items with similar meaning sit close together.

In short

A separate embedding model computes it. As of 4 December 2026, OpenAI, Google and Voyage AI publish default lengths between 1,024 and 3,072 numbers, and OpenAI states that its text-embedding-3 models lack knowledge of events after September 2021.

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:

TermWhat it is
VectorAny list of numbers. Cohere puts the relation this way: “Embeddings are a specific type of vector”.
EmbeddingA vector computed by a model so that its position reflects meaning.
One-hot encodingAn 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 modelThe model that takes text or other data and returns an embedding instead of text.
Items with similar meaning get nearby positions. Real embeddings have hundreds or thousands of dimensions.

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:

MeasureWhat it compares
Euclidean distanceThe straight-line distance between two points. Smaller means closer.
Cosine similarityThe angle between two vectors, regardless of their length.
Dot productAngle 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:

ProviderModelLength
OpenAItext-embedding-3-small, text-embedding-3-large1,536 and 3,072 by default, shorter with the dimensions parameter
Google (Gemini API)gemini-embedding-2, gemini-embedding-0013,072 by default, 768 and 1,536 recommended as shorter sizes
Voyage AIvoyage-4-large, voyage-4, voyage-4-lite1,024 by default, also 256, 512 and 2,048
Cohereembed-v5.0-pro256, 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

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.