Skip to main content
A CLI-managed RAG index goes stale when source content changes. Use ragrails ingest to rebuild sources, ragrails edit to replace known chunk IDs, and ragrails delete to remove stale IDs.

Refresh a Source

For simple refreshes, run ingest again against the changed source. New chunks are upserted by ID.
For long-lived indexes, keep your own manifest of source files and chunk IDs so you can delete IDs that are no longer produced.

Edit Known Chunks

edit reads chunk dictionaries from JSON files, re-embeds them, and replaces stored chunks by exact ID.
Output:

Delete Stale Chunks

Deletes are exact-ID operations. They do not perform semantic matching.

Practical Manifest Pattern

  1. Save extraction/chunking output during ingest when you need auditability.
  2. Store the produced chunk IDs in your own manifest by source path or URL.
  3. On refresh, ingest or edit the changed source.
  4. Delete IDs from the old manifest that no longer exist in the new output.
  5. Run ragrails query to verify the expected chunks are retrieved.

Options

edit

delete

Storing

Use store, edit, and delete directly.

Retrieval

Verify updated chunks.