rag-collection-rebuild

Drops and rebuilds a Qdrant collection with full document re-ingestion.

Updated Nov 19, 2020
One-click install
npx skills add https://github.com/kwojtasinski-repo/ECommerceApp --skill rag-collection-rebuild-kwojtasinski-repo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rag-collection-rebuild
Source: https://github.com/kwojtasinski-repo/ECommerceApp/tree/main/.github/skills/rag-collection-rebuild
Command: npx skills add https://github.com/kwojtasinski-repo/ECommerceApp --skill rag-collection-rebuild-kwojtasinski-repo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When a Qdrant vector collection becomes unusable due to embedder dimension changes, model switches, index corruption, or collection migration, incremental ingestion cannot fix it. This Skill provides a safe, confirmed procedure to drop the collection and re-ingest every document from disk. ## Core Features & Use Cases - Destructive rebuild with safeguards: Confirms the target collection name, stops the affected HTTP server, and optionally snapshots the collection before dropping it. - State reset and re-ingest: Clears the chunk-hash manifest in .rag/ingest-state.json and runs a forced full ingest for both Python and .NET pipelines. - Verification and recovery: Restarts the HTTP server, validates point counts, runs end-to-end query probes, and documents recovery steps for snapshot restore and Qdrant memory issues. - Use Case: After switching the embedder from MiniLM-384 to e5-768 in rag-config.yaml, use this Skill to drop ecommerceapp_docs, clear the ingest manifest, and re-ingest all documents so vector dimensions match the new model. ## Quick Start Ask the assistant to rebuild the Qdrant collection ecommerceapp_docs after confirming the collection name and stopping the rag-python-http server.

Frequently Asked Questions about rag-collection-rebuild

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I rebuild a Qdrant collection from scratch?

Stop the affected RAG HTTP server, delete the collection via the Qdrant REST API, remove the ingest-state manifest file, then run the ingest pipeline with the force-full flag. Restart the server and verify the point count is non-zero.

When should I drop a Qdrant collection instead of re-ingesting?

Drop the collection when embedder dimensions or models change, when segments are corrupted with vector dimension mismatch errors, or when migrating to a new collection name. For stale files or metadata rule changes, incremental or force-full ingest without dropping is sufficient.

How do I back up a Qdrant collection before deleting it?

Trigger a snapshot through the Qdrant snapshots endpoint before dropping the collection. The snapshot is stored in Qdrant's storage directory and can be restored later by posting to the collection's snapshots recover endpoint.

Why does my RAG server return collection not found after a rebuild?

The collection is recreated automatically on the first ingest after a drop. Re-run the ingest pipeline with the force-full flag and the collection will be recreated and populated.

What happens if Qdrant re-ingest hangs during a rebuild?

A hanging re-ingest usually indicates memory pressure in the Qdrant container. Check the Qdrant container logs and restart the Qdrant service with docker compose restart, then retry the ingest.