Embedding

Also: embeddings, vector

A numeric representation of text that places similar meanings close together, used to search by meaning rather than keywords.

An embedding turns a piece of text into a list of numbers — a vector — positioned so that texts with similar meaning land near each other. This lets you search a corpus by semantic similarity: a query about 'refund windows' can find a passage about 'chargeback time limits' even with no shared words.

Embeddings are the retrieval engine behind RAG. You embed your documents once and store the vectors; at query time you embed the question and fetch the nearest passages to ground the model's answer. The quality of that retrieval sets the ceiling on the quality of the final response.

Go deeper