index-versioning-and-reindexing
Skill8 starsChanged 7 months agoMITView on GitHub
Version the vector index and reindex or migrate embeddings without downtime or quality regressions.
In this repository39 other files it gives its agents.
- AGENTS.mdAGENTS.md
- rag-skillsSkill
- choosing-a-chunking-frameworkSkill
- contextual-chunk-headersSkill
- hierarchical-chunkingSkill
- semantic-chunkingSkill
- chunkingSkill
- sliding-window-chunkingSkill
- rag-for-code-documentationSkill
- rag-for-multimodal-contentSkill
- data-type-handlingSkill
- production-rag-deploymentSkill
- deploymentSkill
- generation-evaluation-metricsSkill
- rag-evaluation-frameworksSkill
- retrieval-evaluation-metricsSkill
- evaluation-metricsSkill
- optimize-retrieval-latencySkill
- performance-optimizationSkill
- agentic-rag-routingSkill
- multi-agent-rag-orchestrationSkill
- rag-agentsSkill
- adaptive-retrievalSkill
- context-enrichment-windowSkill
- crag-corrective-ragSkill
- explainable-retrievalSkill
- graph-ragSkill
- hybrid-search-bm25-denseSkill
- hyde-hypothetical-document-embeddingsSkill
- hype-hypothetical-prompt-embeddingsSkill
- multi-pass-retrieval-with-rerankingSkill
- query-transformation-strategiesSkill
- raptor-hierarchical-retrievalSkill
- self-ragSkill
- retrieval-strategiesSkill
- choosing-vector-db-by-datatypeSkill
- qdrant-for-production-ragSkill
- qdrant-setup-ragSkill
- vector-databasesSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 29
Create the new version as a separate collection or index while the current one keeps serving traffic.
- Distinctive: line 34
Run the evaluation golden set against the new index and compare scores to the current baseline before switching.
- Distinctive: line 43
Never serve queries from a mix of two embedding models: re-embed the whole corpus when the model changes.
- Distinctive: line 64
No Model Mixing: All live vectors come from a single embedding model
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Overview
This skill covers evolving the index behind a live RAG system: rebuilding embeddings after a model or chunking change, migrating between embedding models, and versioning indexes so changes are reversible and queries never go dark.
Problem Statement
The index is not static. Embedding models improve, chunking strategies change, and documents update. Reindexing in place takes search offline and, if the new build is worse, there is no way back. Mixing vectors from two embedding models silently corrupts similarity scores.
Key Concepts
- Immutable index version: Each build is a named artifact, never edited in place.
- Alias or pointer swap: Traffic moves between versions by flipping one pointer.
- Embedding migration: Switching models requires re-embedding all vectors, not mixing.
- Blue-green reindex: Build the new index alongside the old, then cut over.
Implementation Guide
Step 1: Build the New Index Alongside the Old
Create the new version as a separate collection or index while the current one keeps serving traffic.
Why: Building beside the live index means queries never hit a half-built or empty collection.
Step 2: Validate Before Cutover
Run the evaluation golden set against the new index and compare scores to the current baseline before switching.
Why: Comparing against a baseline catches a regression before it reaches users instead of after.
Step 3: Swap by Alias and Keep Rollback Ready
Cut over by repointing an alias to the new version and retain the previous version until the new one is proven.
Why: An alias swap makes both cutover and rollback near-instant and low-risk.
Never serve queries from a mix of two embedding models: re-embed the whole corpus when the model changes. See the Qdrant aliases guide and Qdrant snapshots.
When to Use This Skill
- Changing the embedding model, chunking strategy, or index schema in production
- Documents update often and the index must stay fresh
- You need reversible, zero-downtime index changes
When NOT to Use This Skill
- The corpus is static and never re-embedded
- A managed service handles reindexing and versioning for you
- The system is a prototype where downtime is acceptable
Related Skills
- Production RAG Deployment - Serve the versioned index
- Qdrant for Production RAG - Collection and alias operations
- Retrieval Evaluation Metrics - Validate before cutover
- Choosing Vector DB by Datatype - Store selection
Metrics & Success Criteria
- Zero Downtime: Queries keep serving throughout reindexing
- Reversibility: Rollback to the prior version is fast and tested
- No Model Mixing: All live vectors come from a single embedding model
- Validated Cutover: New index meets or beats the baseline before swap
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

