Generative AI & Agentic AIRAG ingestion and document preparation

Version embeddings alongside the source text

PK
Pankit Kumar
Sr. Data Scientist at Parexel (a Goldman Sachs–backed company) · 20 September 2026 · 2 min read
Technically reviewed by Ishaan Sharma
In this article (5 sections)

A vector without provenance cannot be reproduced, compared or deleted reliably. The same chunk encoded by a different model or normalization may have a different dimension and meaning, even when its ID appears unchanged.

Record a complete embedding identity

The RAG ingestion lab creates two metadata records for one synthetic chunk.

python
from ingestion_cases import embedding_version_case

result = embedding_version_case()
assert result["versions"] == 2
assert result["distinct_vector_digests"] is True
assert result["embedding_model_executed"] is False
print(result["records"])

Both records link to the same source digest and chunk ID, but use different fictional model names and dimensions. Their vector digests differ. No embedding is calculated; the case verifies the version contract.

Include all transformation inputs

Store source ID/version/digest, page/span, normalized chunk text digest, chunker version, embedding model snapshot, dimensions, normalization, instruction prefix and generation date. If preprocessing or language routing changes, it belongs in the identity too.

Do not overwrite vectors in place during an upgrade. Build a versioned collection or named vector, evaluate it against the current index and switch an approved pointer. Keep old evidence long enough for rollback under policy.

Test compatibility and deletion

Reject a query vector with incompatible dimensions or model space. Ensure every source deletion finds records across all embedding versions. Retrieval logs and eval runs should identify which index version served them.

Re-embedding can change nearest neighbours even when the source does not. Freeze labelled queries, compare per-case transitions and measure cost/storage plus quality. A model release note is not task-specific evidence.

The Generative & Agentic AI course connects embedding provenance to model selection, reindexing and retrieval evaluation.

Exercise

Create two embedding-version manifests for the same corpus. Make one dimension incompatible, verify the client refuses cross-space queries, and demonstrate a version switch plus rollback without losing source lineage.

Continue learning

This article is part of the RAG ingestion and document preparation sequence. Use the neighbouring tasks when you need the prerequisite or the next application.

Reference: Qdrant vector documentation.

PK
Pankit Kumar
Lead Instructor, NeuraPath Academy

Pankit Kumar has 10 years in Data Science & AI, building and shipping production systems in regulated pharma and clinical environments. He is a freelance trainer at Boston Institute of Analytics, AnalytixLabs and Scaler, and has taught this material to thousands of working professionals.

This article is part of our Generative & Agentic AI programme — 3 months. Add practical GenAI, retrieval and agent-building skills to your existing toolkit.

Explore Generative & Agentic AI
Counselling is free · no obligation

Not sure which programme fits?

Tell us your background and we will map it to the right entry point — including saying so when a cheaper programme is the better fit. A counsellor replies within one working day.