What are Embeddings? (Vector Representations)
Embeddings convert text, images, or audio into lists of numbers that capture semantic meaning. They power semantic search, recommendations, and RAG systems.
TL;DR: Embeddings convert text, images, or audio into lists of numbers that capture semantic meaning. They power semantic search, recommendations, and RAG systems.
The Core Idea: Meaning as Numbers
An embedding model converts any piece of text into a vector — a list of hundreds or thousands of floating-point numbers. Similar meanings produce similar vectors. "Cat" and "kitten" are close in vector space; "cat" and "democracy" are far apart.
How Similarity Search Works
To find documents similar to a query: embed the query → compare it to all document embeddings using cosine similarity → return the top-K closest matches. This is faster and more semantic than keyword matching.
Embeddings vs LLMs
Embedding models (text-embedding-3-large, sentence-transformers) just encode — they output a fixed-size vector. LLMs generate text. In a RAG system, an embedding model retrieves the right documents, then an LLM synthesizes the answer.
Where Embeddings Power Products You Use
Spotify recommendations, Netflix suggestions, Google semantic search, Notion AI search, GitHub Copilot code completion — all use embeddings under the hood to find semantically similar content.