Embedding Model
An embedding model converts text, images, or other data into dense numerical vectors that capture semantic meaning, so that items with similar meaning end up close together in vector space and can be compared mathematically.
Definition
An embedding model converts text, images, or other data into dense numerical vectors that capture semantic meaning, so that items with similar meaning end up close together in vector space and can be compared mathematically.
Overview
Rather than generating text, an embedding model's job is representation: it takes an input — a sentence, a document chunk, an image — and outputs a fixed-length vector of numbers, typically a few hundred to a few thousand dimensions. These vectors are constructed so that semantic similarity translates into geometric closeness: two sentences that mean roughly the same thing produce vectors that are close together, measured by cosine similarity or dot product, even if they share few exact words. Embedding models are usually derived from the same Transformer architectures used for generative language models, but trained with a contrastive objective that pulls related pairs together and pushes unrelated pairs apart, rather than being trained to predict the next token. Well-known families include OpenAI's text-embedding models, Cohere's embedding models, and open alternatives available through Hugging Face. Providers such as Amazon Titan also ship dedicated embedding models alongside their generative offerings. Embeddings are the backbone of semantic search and Retrieval-Augmented Generation: documents are embedded once and stored in a Vector Database, and a user's query is embedded at request time so the system can retrieve the most semantically relevant chunks via Vector Search before handing them to an LLM. Because retrieval quality depends directly on embedding quality, choosing and evaluating the right embedding model — including dimensionality, domain fit, and multilingual support — is a foundational decision in any RAG system, a topic covered in depth in the blog post Vector Databases Explained.
Key Concepts
- Converts text, images, or other data into fixed-length dense vectors
- Trained with a contrastive objective so similar items end up close in vector space
- Distinct from generative LLMs — outputs numbers, not natural-language text
- Vector similarity (cosine or dot product) measures semantic closeness
- Available as both proprietary API-based models and open-weight alternatives
- Core dependency for semantic search, clustering, and recommendation systems
- Often paired with a Reranker Model to refine initial retrieval results