Glossary termConcept

Embedding

Also known as: Vector embedding, Vector representation

A learned numerical vector that represents an item such as a word, document, image or user so that similar items have nearby vectors.

An embedding turns something discrete or complex into a list of numbers that a computer can compare. A sentence, product, image or song is mapped to a point in a high-dimensional space, typically with hundreds or thousands of dimensions, such that items with similar meaning or function lie close together. Closeness is usually measured with cosine similarity or a distance metric. Embeddings let software treat meaning mathematically: finding the documents most similar to a query becomes a matter of finding the nearest vectors.

Word embeddings became widely known with word2vec, released by Tomas Mikolov and colleagues at Google in 2013, followed by Stanford's GloVe in 2014. These methods learned vectors from patterns of word co-occurrence, famously capturing analogies such as king minus man plus woman landing near queen. Transformer models later produced contextual embeddings, in which the same word gets different vectors depending on its sentence. Dedicated embedding models encode whole passages, images and audio, and multimodal models place text and images in a shared space.

Embeddings are a building block of semantic search, recommendation systems, clustering, classification and retrieval-augmented generation, and they are typically stored and searched in vector databases. They carry the associations present in their training data, and studies have shown that word embeddings can encode gender and racial stereotypes that then propagate into downstream systems. Because embeddings can sometimes be partially inverted to recover the original text, they should be treated as sensitive when derived from private data.

Key points

  • Embeddings map items to vectors so that similarity in meaning becomes measurable distance.
  • Word2vec, released by Google researchers in 2013, popularized learned word embeddings.
  • Transformer models produce contextual embeddings that vary with the surrounding text.
  • Embeddings can encode social biases and may leak information about the data they represent.

Related entries

Glossary term

Vector Database

AIProgramming

Database designed to store embeddings and quickly find the vectors most similar to a query, supporting semantic search and AI retrieval.

Glossary term

Search technique that matches queries to content by meaning and intent rather than by exact keywords, often using embeddings and language models.

Glossary term

Technique that improves a language model's answers by first retrieving relevant documents and supplying them to the model as context.

Glossary term

An abstract, usually lower-dimensional space in which a model represents data so that similar items sit close together and patterns become explicit.

Glossary term

The process of splitting text into smaller units called tokens, such as words, subwords or characters, that a language model can process as numbers.

Technology

Chroma

AIProgrammingFOSS

Open-source vector database that stores documents with their embeddings so language model applications can retrieve relevant information by meaning.

Glossary term

Knowledge Graph

AIProgramming

Structured representation of knowledge as a network of entities and the relationships between them, used for search, reasoning and data integration.

Featured in guides

Referenced by

Other entries that discuss or point to Embedding.