Knowledge & memory

Embeddings

An embedding is a numeric vector that represents the meaning of a piece of text or image, positioned so that similar meanings sit close together — the mechanism behind semantic search and retrieval.

An embedding model turns text into a list of numbers — a vector — placed so that semantically similar texts are near each other in that space. This lets a system find relevant material by meaning rather than exact keywords: embed the query, embed the documents, and return the nearest vectors. Embeddings are the engine under retrieval-augmented generation and long-term agent memory, and the quality of the embedding model largely sets the ceiling on retrieval quality.

Key points

  • Text or an image becomes a vector where similar meanings are close together.
  • Enables semantic search — matching by meaning, not exact keywords.
  • They power retrieval-augmented generation and long-term memory.
  • Embedding quality largely caps how good retrieval can be.

Learn it by building

Way of the Agent teaches AI agent engineering level by level — concepts like this one, then hands-on practice, XP, and the AI Chronicles.

Start learning free →