Embedding
Definition
An embedding is a dense vector, typically hundreds to a few thousand dimensions, that an embedding model computes from text (or images) so that distance between vectors reflects semantic similarity.
In practice
Embeddings make meaning searchable: documents are split into chunks, each chunk is embedded once at ingestion, and at query time the question is embedded and compared with the stored vectors. RAG retrieval, semantic caches, recommendations and deduplication all build on this. Embedding calls are cheap compared with generation and are batched for throughput.
Vectors are only comparable within one model and version: two models with the same dimension still produce incompatible spaces, so changing the model means re-embedding everything into a new index. Embeddings blur exact terms such as product codes and names, which is why keyword search is often combined with them.
Example
A pipeline embeds 2 million chunks with a 1,024-dimensional model; stored as 4-byte floats, the raw vectors take about 8 GB before index overhead.