Understanding Embeddings
An embedding is a list of numbers that represents meaning.
Texts with similar meaning should have similar vectors.
What embeddings are used for
- semantic search
- clustering
- recommendation
- duplicate detection
- classification
- RAG retrieval
- reranking features
Mental model
Imagine a map where nearby points mean similar ideas.
text
"refund policy" near "money back rules"
"password reset" near "forgot login"
What affects quality
| Factor | Why it matters |
|---|---|
| embedding model | different models capture different semantics |
| chunk quality | embeddings represent the chunk, not the whole document |
| metadata | filters improve precision |
| distance metric | cosine/dot product changes ranking |
| evaluation | proves retrieval works |
Knowledge check
Q1: What does an embedding represent?
The meaning or features of text as a vector.
Q2: Why do embeddings matter for RAG?
They help retrieve relevant source chunks for the model.