Skip to main content
A RAG index goes stale when source content changes. The SDK gives you two maintenance paths:

Track Source Manifests

For long-lived indexes, keep a manifest that maps each source to the chunk IDs produced from it.
When the source changes, re-ingest it, compare old IDs to new IDs, and delete stale chunks.

Edit Known Chunks

Use edit() when you know the exact chunk IDs to replace.
edit() re-embeds the replacement chunk text before writing it back to the vector database.

Delete Removed Chunks

Use delete() for exact chunk IDs that should no longer appear in retrieval.
Deletes do not perform semantic matching. They only remove exact IDs.

Full Refresh Pattern

Operational Guidance

Storing

Use store, edit, and delete directly.

Retrieval

Verify updated results.