Embedding
An embedding is a dense vector representation of text that captures semantic meaning, enabling similarity search, clustering, and retrieval for tasks like RAG and semantic search.
An embedding is a numerical vector (typically 256 to 4096 dimensions) that maps discrete tokens or text passages into a continuous latent space where semantic similarity corresponds to vector proximity. For example, 'dog' and 'puppy' have embeddings that are close together (high cosine similarity), while 'dog' and 'telephone' are far apart. Embeddings are produced by encoder models (e.g., BERT, sentence-transformers, text-embedding-3-small) that are trained to minimize contrastive loss-pulling semantically similar pairs together and pushing dissimilar pairs apart. In AI hardware/LLM contexts, embeddings serve as the glue for RAG systems: documents and queries are both embedded, enabling efficient nearest-neighbor search in vector databases. The quality of an embedding model depends on its training data and architectural choices. Modern embedding models like BGE, E5, and Voyage are fine-tuned on massive pairs of (query, relevant document) data, often using hard negative mining. Key metrics for embedding models include MIRACL scores, MTEB benchmarks, and latent dimensionality. Higher dimensions (e.g., 1024+) capture more nuance but increase storage and search latency. AI builders should choose embedding models based on the language domain (e.g., multilingual, code, medical) and retrieval task. A common mistake is using the same model for both embedding and generation-they serve different purposes and should be distinct. Embeddings are also used for text classification, anomaly detection, and recommendation systems. In hardware terms, embedding inference is typically lightweight (CPU or small GPU) but can become a bottleneck at high query volume.
Embeddings do not 'understand' meaning in a human sense-they represent statistical co-occurrence patterns from training data, and identical words may have different embeddings in different contexts.
Related terms
Concepts you'll usually encounter alongside this one.
RAG augments LLM prompts with relevant documents retrieved from an external knowledge base, grounding responses in factual data to reduce hallucination and enable dynamic knowledge.
A specialized database that stores and indexes high-dimensional vector embeddings for efficient similarity search in AI and LLM retrieval-augmented generation (RAG) pipelines.
A neural network architecture using self-attention mechanisms to process sequential data in parallel, forming the foundation of modern LLMs.
Used in benchmarks
Workloads on MyAI Bench that involve Embedding.
Mentioned in tutorials
Hands-on guides that put this concept to work.
See how this term affects your memory budget.
Real numbers, real chips, every workload.
Picks for builders, by use case.
Stay Ahead of the AI Curve
Get weekly AI hardware news, benchmark updates, and deals in your inbox. Founding-subscriber list, be one of the first.