agentsop-idempotent-ingestion

Make RAG ingestion idempotent with a persisted content-hash ledger.

287|16|Updated May 20, 2026
One-click install
npx skills add https://github.com/agentsope/SkillAlchemy --skill agentsop-idempotent-ingestion
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agentsop-idempotent-ingestion
Source: https://github.com/agentsope/SkillAlchemy/tree/main/skills/agentsop-idempotent-ingestion
Command: npx skills add https://github.com/agentsope/SkillAlchemy --skill agentsop-idempotent-ingestion

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents duplicated, corrupted, or stale vector indexes caused by ingestion pipelines that are re-run over changing corpora without a persisted correctness ledger. It helps coder-agents guarantee that a second ingestion run over unchanged documents becomes a no-op, and that deletions are handled intentionally.

Core Features & Use Cases

  • Idempotent ingestion contract: derives insert/update/skip decisions from a stable document content hash stored in a persisted docstore ledger.
  • Delete propagation correctness: explains why deletes do not happen “for free” and when to use snapshot-based vs incremental cleanup strategies.
  • Twice-run regression gate: provides a concrete test that proves the second run processes zero nodes and does not change vector counts.
  • Cross-framework mapping: aligns LlamaIndex (IngestionPipeline + docstore/docstore_strategy) and LangChain (index + RecordManager + cleanup modes) plus a manual hash-ledger equivalent.

Quick Start

Tell the coder-agent to “use agentsop-idempotent-ingestion to review my ingestion pipeline so re-indexing over a changing corpus stays idempotent, includes delete handling, and contains a twice-run no-op test in CI.”

Frequently Asked Questions about agentsop-idempotent-ingestion

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

FAQPage Schema
Why does re-running my RAG ingestion pipeline create duplicate vectors in the database?

Re-running RAG ingestion creates duplicates because the pipeline lacks a persisted content-hash ledger to track previously indexed documents. Implementing idempotent ingestion with a docstore-backed strategy ensures unchanged documents are skipped on subsequent runs.

How do I make a LlamaIndex ingestion pipeline idempotent for scheduled re-indexing?

To make LlamaIndex ingestion idempotent, configure the IngestionPipeline with a docstore and set a docstore_strategy. This persists document content hashes, enabling the pipeline to derive insert, update, or skip decisions during scheduled or webhook-triggered re-indexing.

Does LangChain support idempotent ingestion and delete propagation for vector stores?

LangChain supports idempotent ingestion through its index API combined with a RecordManager. This pairing enables explicit delete propagation strategies and cleanup modes, ensuring vector store synchronization when documents are edited or removed between runs.

What is the best way to handle document deletions during RAG re-indexing?

Handling document deletions during RAG re-indexing requires an explicit delete propagation strategy. You must choose between snapshot-based cleanup for full corpus synchronization or incremental cleanup, because deletions are not automatically propagated to the vector store.

How do I test if my RAG ingestion pipeline is truly idempotent?

Test RAG ingestion idempotency using a twice-run regression gate. Run the pipeline once to populate the vector store, then run it again and verify the second run processes zero nodes and produces no changes to vector counts.

Do I need stable document identities to prevent duplicate vectors during upserts?

Yes, stable document identities are required to prevent duplicate vectors during upserts. Idempotent ingestion relies on a stable document content hash stored in a persisted docstore ledger to accurately determine if a document should be inserted, updated, or skipped.