Embedding
Plain Explanation
An embedding is a way to turn text, images, or other inputs into numeric coordinates that are easy for software to compare. If “cat,” “dog,” and “car” are embedded well, cat and dog should land closer to each other than to car. This lets search systems find meaningfully related content even when the exact words do not match.
Examples & Analogies
- Map coordinates: Seoul and Incheon are closer than Seoul and New York; in embedding space, “refund policy” and “return rules” can be close.
- Recommendations: a system can recommend items whose vectors are near a user’s interest vector.
- RAG retrieval: a user question is embedded and compared against embedded document chunks.
At a Glance
| Concept | What it compares | Common use |
|---|---|---|
| Token | Pieces of text | LLM input/output processing |
| Embedding | Meaning as a vector | Search, recommendation, clustering |
| Vector Database | Stored embeddings | RAG and semantic search |
| Cosine Similarity | Vector direction similarity | Nearest-neighbor retrieval |
Where and Why It Matters
Embeddings let systems search for meaning, not just exact keywords. In RAG, questions and document chunks are placed in the same vector space, and nearby chunks are sent into the LLM context. Recommenders place users and items in comparable spaces. Classifiers learn vector patterns for labels. Strong embeddings improve retrieval, while poor chunking or the wrong distance metric can surface irrelevant evidence.
Common Misconceptions
- “An embedding stores the original text” → it is a vector representation for comparison, not a copy of the source.
- “More dimensions are always better” → accuracy, storage, and search speed trade off.
- “Nearby means factually correct” → it means semantically similar; factual verification is separate.
- “Any embedding model works” → domain, language, input length, and refresh cadence matter.
How It Sounds in Conversation
- “If retrieval quality is weak, check the embedding model and chunking together.”
- “A high cosine score is not enough; inspect the source before grounding an answer.”
- “We need a separate multilingual retrieval evaluation for Korean queries.”
- “Reducing dimensions saves storage but may lower recall.”
Related Reading
References
- Efficient Estimation of Word Representations in Vector Space
Classic word2vec paper introducing efficient dense vector representations.
- Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks
Representative bi-encoder paper for sentence embeddings and semantic similarity.
- Embeddings Guide
Official guide to embeddings, similarity search, clustering, classification, and distance-based comparison.
- Faiss documentation
Vector search library documentation for large-scale similarity search over embeddings.
- Vector stores
Application-level explanation of storing and querying embeddings in vector stores.