AI docs · Foundations
Embeddings
Numeric representations of text (or images) that place similar meanings close together, enabling search and retrieval by meaning.
What it is
- An embedding is a vector (a list of numbers) that represents the meaning of a piece of content.
- Similar content has similar vectors, so you can measure semantic similarity with simple math.
How it works
- An embedding model converts text into a vector.
- Vectors are stored in a vector database; a query is embedded and the nearest vectors are retrieved.
- This powers semantic search and is the retrieval half of RAG.
Trade-offs
- Captures meaning better than keyword search, but quality depends on the embedding model and the data.
- Adds infrastructure (a vector store) and a pipeline to keep embeddings fresh.
When to use it
- Semantic search, recommendations, deduplication, and grounding LLMs in your own data.
Common pitfalls
- Stale embeddings when the source data changes.
- Assuming semantic similarity always equals relevance for the user's intent.
Quick check
What does an embedding represent?
Related concepts
Let's get to work
Want to build with AI for real?
Beyond the explainer, we design, secure, build and run production AI. Tell us what you have in mind.