Embeddings
In One Sentence
Dense numeric vectors that map discrete tokens, sentences, or items into a continuous geometric space where similar meanings sit close together.
ELI5 (Intuition)
Imagine plotting every word on a giant 3D map where 'dog' and 'puppy' are next-door neighbors, 'king' and 'queen' sit across the street, and 'toaster' lives in another neighborhood.
ELI18 (Technical)
A lookup table \(E \in \mathbb{R}^{V \times d}\) (for token embeddings) or encoder \(f_\theta(x) \in \mathbb{R}^d\) (for text embeddings) trained so semantic similarity aligns with cosine similarity \(\cos(\mathbf{u}, \mathbf{v}) = \frac{\mathbf{u} \cdot \mathbf{v}}{\|\mathbf{u}\|\|\mathbf{v}\|}\).
In Practice
Semantic search, RAG document retrieval, duplicate bug detection, and recommendation engines embed queries and documents into vectors and run fast approximate nearest-neighbor (ANN) search in vector databases.