Embeddings basics concept page: shows offline indexing pipeline (S3 docs -> chunker -> embedder API -> vector DB) and online query path (user -> API -> Redis cache -> query embedder -> vector DB -> LLM). Three scenarios: text-to-embedding model call, cosine similarity comparison (synonyms close, unrelated far), and batch embedding pipeline for 10K docs. Includes ADRs on embeddings vs BM25 keyword search and on dimension sizing (1536 vs 3072 with Matryoshka truncation).
An embedding is a learned representation produced by one model and input contract. Distance is meaningful only under the model's documented preprocessing, similarity function, version, and evaluated task distribution.
Versioned document encoding. The stored vector is meaningful only with its pinned preprocessing, model, dimension, and metric.
Similarity is an evaluated ranking signal. Cosine, dot product, and Euclidean distance are mathematical choices, not universal relevance thresholds.
Shadow re-embedding migration. A model change creates a new vector schema and index; it does not mutate old vectors in place.
Privacy, truncation, and drift failure path. Encoding can leak sensitive content, silently truncate evidence, or drift after a model change.
Version the model, preprocessing, vector dimension, normalization, and distance metric as one schema. Build task-specific retrieval evaluations before choosing thresholds. Redact or reject sensitive inputs before an external embedding call, and re-embed into a new index before changing the schema.
Введите числа или выберите пресет