Embedding Model
ELI5 — The Vibe Check
An embedding model turns words, sentences, or documents into lists of numbers (vectors) that capture meaning. Similar things end up close together in this number space — 'king' is near 'queen,' 'Python' is near 'programming.' It's like giving every concept a GPS coordinate in meaning-space. This is how AI search, recommendations, and RAG actually work under the hood.
Real Talk
An embedding model maps text (or other data) to dense vector representations in a high-dimensional space where semantic similarity correlates with vector proximity. Modern text embedding models (like OpenAI's text-embedding-3, Cohere's Embed, BGE) produce vectors of 256-3072 dimensions. They're used for semantic search, clustering, classification, and as the retrieval component in RAG systems.
Show Me The Code
# Generate embeddings with OpenAI
from openai import OpenAI
client = OpenAI()
response = client.embeddings.create(
model="text-embedding-3-small",
input="What is Docker?"
)
vector = response.data[0].embedding # 1536 floats
When You'll Hear This
"We use an embedding model to power semantic search." / "The embedding space clusters similar support tickets together."
Related Terms
Cosine Similarity
Cosine similarity measures how similar two things are by comparing the angles of their vectors.
Embedding
An embedding is turning words, sentences, or entire documents into lists of numbers (vectors) that capture their meaning.
RAG (Retrieval Augmented Generation)
RAG is how you give an AI access to your private documents without retraining it.
Semantic Search
Semantic search finds results based on meaning, not just keyword matching.
Vector Database
A vector database is a special database built to store and search embeddings.