Embedding models, generation, storage, and limitations
Words made simple
A few useful meanings before you read the explanation.
- Embedding
- A list of numbers that represents the meaning of some content. Similar meanings can produce nearby lists of numbers.
- Vector
- An ordered list of numbers. An embedding is a vector used to represent content for tasks such as similarity search.
- Retrieval
- Finding and fetching information that is useful for the current question.
More words from this lesson
- Tenant
- A customer or organization whose data must stay separate from other customers in a shared application.
- Evaluation
- Checking results against examples and clear criteria to find whether the system works well and where it fails.
- Chunking
- Dividing a long document into smaller pieces so relevant parts can be found and sent to the model.
- Metadata
- Extra information describing a record, such as its owner, date, policy version or document type.
- Reranking
- Checking an initial set of search results again and putting the most useful ones nearer the top.
Overview
- An embedding model creates vectors; an embedding pipeline manages generation, versions, and storage.
- An embedding is a derived index representation, not a replacement for the original text.
- Different models, dimensions, or preprocessing choices can produce incompatible vector spaces.
Why this matters
Search must remain consistent as documents change and models are upgraded.
An everyday example
A library catalog must be rebuilt or migrated when its classification system changes.
A technical example
Store {chunkId, text, vector, embeddingModel, dimensions, contentHash, tenantId, documentVersion}.
How it works
- Normalize and chunk
- Hash content
- Embed changed chunks in bounded batches
- Validate dimension and finite values
- Upsert
- Publish a completed document version
- Remove obsolete vectors.
Architecture and flow
Ingestion job → embedding adapter → versioned chunk store → index → query adapter using matching version.
The insurance assistant example
A revised policy creates a new indexed version. New answers should no longer cite withdrawn wording.
When to use it
Whenever similarity-based retrieval needs persistent, refreshable data.
When to avoid it
Do not repeatedly embed unchanged documents, compare vectors from unrelated models, or embed secrets without approved handling.
Interview answer
“I version the embedding model and corpus, retain source text and metadata, and use incremental re-embedding plus retrieval evaluation for upgrades.”
Benefits, trade-offs, and production considerations
-
Embeddings can struggle with negation, precise numbers, rare identifiers, and domain language.
-
“Covered” and “not covered” may appear close.
-
Use keyword search, filters, reranking, or exact rules to compensate.
-
Embeddings may leak information and require the same tenant isolation and deletion controls as source data.
-
Raw float32 storage estimate:
number of vectors × dimensions × 4 bytes. -
One million 768-dimensional vectors use about 3.1 GB for raw vector values alone; text, metadata, index structures, replicas, and backups add overhead.
-
Estimate total database storage separately.
Can you explain it without the notes?
Embedding models, generation, storage, and limitations
Use your own words. Explain an example and one limitation before checking the explanation.
Check your explanation
An embedding model creates vectors; an embedding pipeline manages generation, versions, and storage. An embedding is a derived index representation, not a replacement for the original text. Different models, dimensions, or preprocessing choices can produce…
Turn this concept into a clear answer.
Practice this conceptKeep connecting the ideas.
Next lesson: Vector databases, vector search, and semantic searchAdapted from 13_AI.MD · “Embedding models, generation, storage, and limitations”. Examples are study fragments; framework behavior can depend on your version.