Get the 2026 ML Training Cookbook | 52 recipes — GRPO, Flow Matching, World Models, and everything in between Download Now →
Embedding
A learned dense vector representation of discrete tokens or entities that captures semantic relationships in continuous space.
An Embedding is a learned dense vector representation that maps discrete entities — such as tokens, words, sentences, images, or graph nodes — into a continuous vector space where geometric proximity reflects semantic similarity. In language models, an embedding layer maps each token ID to a learned vector of fixed dimension (e.g., 768, 4096), transforming discrete symbolic input into the continuous numerical representation that neural networks process.
The key property of embedding spaces is that they capture semantic relationships: entities with similar meanings are positioned close together in the space, and directions in the space can encode relationships (e.g., the classic word2vec result that vec('king') − vec('man') + vec('woman') ≈ vec('queen')). This structure emerges naturally from training objectives — language model embeddings learn from context prediction, while contrastive embeddings (like sentence transformers) learn from positive/negative pairs.
Embeddings are used throughout modern AI systems: token embeddings at the input of language models, positional embeddings to encode token order, sentence/document embeddings for semantic search and RAG, image embeddings for visual similarity, and multimodal embeddings that align text and image spaces (as in CLIP). The quality of embeddings directly impacts downstream task performance, and embedding models are often evaluated on retrieval benchmarks, analogy tasks, and clustering quality.
- ■Maps discrete entities (tokens, words, images) into continuous vector space
- ■Geometric proximity reflects semantic similarity
- ■Directions can encode relationships (e.g., king − man + woman ≈ queen)
- ■Used for: token input, positional encoding, semantic search, RAG, multimodal alignment
- ■Quality directly impacts downstream tasks; evaluated on retrieval and analogy benchmarks
Using a sentence embedding model to convert customer support tickets into vectors, then finding similar past tickets via cosine similarity to suggest relevant resolutions.