Data & Retrieval

Embedding

A vector that places a piece of text in space so that nearby vectors mean similar things.

An embedding maps text (a word, sentence, or document) to a dense vector — typically hundreds to a couple thousand dimensions (768, 1536) — so that semantic similarity becomes geometric closeness. Embeddings power search, clustering, and the retrieval step of RAG, where a query vector is matched against document vectors by cosine similarity.

Worked example: “How do I reset my password?” and “I forgot my login” share almost no words, yet their embeddings sit close together, so a retriever finds the right doc even without keyword overlap — that is the whole point over lexical search. Gotcha: embeddings from different models (or model versions) live in different spaces and are not comparable, so if you re-embed with a new model you must re-embed everything, not just the new documents.