An embedding is a numerical representation of text, images or other data as a vector, arranged so that similar content ends up close together in the vector space.
An embedding model converts, for example, a word, a sentence, or an entire document into a list of several hundred to several thousand numbers. Content with similar meaning produces vectors that sit geometrically close together in this high-dimensional space – for instance, the embeddings for "king" and "queen" sit closer together than those for "king" and "bicycle".
This property makes embeddings the technical foundation of semantic search: instead of matching exact keywords, a system can calculate how similar in meaning a search query is to stored documents.
This is exactly the principle RAG systems use to find the most contextually relevant text passages from a large knowledge base (often stored in what's called a vector database) for a given user question.




