Source content changes: docs get revised, pages get deleted, products get discontinued. If your vector index does not keep up, retrieval and chat can answer from stale chunks.
Ragrails maintenance is chunk-level today. You update stored chunks with edit() and remove exact chunk IDs with delete().
Use the interface-specific docs when you need exact parameters, flags, request fields, or response shapes.
Maintenance depends on stable chunk IDs. Derive IDs from source identity and section location, then keep a manifest that maps each source to the chunk IDs currently stored for it.
Stable IDs
A stable ID lets a later run replace or delete the same stored vector.
Use IDs that survive normal edits. A file path plus heading slug is usually better than a random UUID. If a heading moves but still means the same thing, keep the ID.
Update changed chunks
edit() accepts unembedded replacement chunks. Ragrails embeds each replacement with input_type="document" and upserts it into the configured vector store.
Result:
Delete stale chunks
delete() removes exact IDs. It does not delete by metadata filter or by source path.
Result:
Refresh one source
A full source refresh is a small reconciliation loop:
- Load the old manifest entry for the source.
- Parse, chunk, embed, and store the current source content.
- Collect the new chunk IDs from the store result.
- Delete
old_ids - new_ids.
- Save the new manifest entry.
store() and edit() upsert by ID. If a refreshed source produces the same IDs, the new vectors replace the previous vectors.
Operational checklist
Current boundaries
Possible errors
Most stage-level failures are returned in the result errors list instead of raising immediately. REST validation and setup failures may return an exception envelope instead. See Errors for the shared shapes.
Next steps
- Use Storing for the initial store operation.
- Use Pipeline Overview to place maintenance after ingestion and query workflows.
- Use Retrieval to verify maintained content is searchable.