ENES

Embeddings

Turning words, images or documents into lists of numbers that capture meaning.

A map of points where dog, puppy and cat sit close together and invoice and tax sit far away, with a vector of numbers under one point

An embedding is a list of numbers (a vector) that represents a piece of content: a word, a sentence, a whole document, an image. A neural network produces it so that things with similar meaning get similar numbers. 'Dog' and 'puppy' end up close together; 'dog' and 'invoice' end up far apart. A typical embedding has a few hundred to a few thousand numbers.

Computers cannot compare meanings, but they can compare numbers very fast. Once everything is an embedding, 'find documents like this one' becomes 'find the nearest points', a geometry problem. That powers semantic search (results that match the idea, not the exact words), recommendations, duplicate detection and clustering.

Inside an LLM, every token becomes an embedding first; that is how text enters the math. Outside, embeddings are the backbone of RAG: documents are embedded once and stored in a vector database, the question is embedded at query time, and the closest chunks are retrieved.

Example: a help desk that gets 'my screen went black' should find the article titled 'Display not turning on' even though no word matches. With embeddings, the two sentences sit close together, so the search works.

Keep in mind

Go deeper

Related terms

More in AI