Embedding

A numeric vector representation that captures semantic similarity between items such as words, images, or documents.

Put three phrases on a tiny map

For an invented two-dimensional example, put “desk light” at (2, 2). Think of each coordinate pair as the address of a phrase.

“Reading lamp” · (2, 3)

Moving from “desk light” to this point takes one unit up.

“Train timetable” · (6, 5)

This point sits four units across and three up. Its straight-line distance from “desk light” is five units.

Where real coordinates come from

Here the coordinates were assigned by hand to make the geometry visible. A trained embedding model learns representations from data. The dimensions may have no simple human-readable names, and closeness reflects the model’s training and the chosen similarity measure. Compare vectors produced by compatible models.

How Embeddings Are Used

A common workflow is simple: generate embeddings for documents, store them in a vector database, convert a user query into an embedding, and retrieve the nearest matches. But embeddings are also used for recommendation engines, deduplication, anomaly detection, clustering, reranking, and representation learning inside larger models.

Embeddings are powerful, but they are not perfect mirrors of truth. Their quality depends on the model that produced them, the data domain, and the way the system uses them. That is why evaluation matters. A vector can be mathematically close to a query and still not be the most useful result for the user.

Follow the idea

Vector search ranks candidates by comparing these coordinates.

Clustering uses similarities to group items together.

Related concepts (6)

Examples in the AI guides

Related Yenra articles (2)

Source · Sentence Transformers’ semantic search guide

Return to Embedding in the A–Z glossary