Skip to content
All tutors

Keeping a RAG Index Fresh

Keep retrieval in sync with changing documents: updates, deletions, versions, permissions and re-embedding.

By Skill Lab Advanced RAG and search New

Your first 3 replies from the tutor are free. Then you can continue the lesson for $10 from your credit.

A taste of a lesson

One question and the answer, as this tutor gives it.

Keeping a RAG Index Fresh AI tutor following Skill Lab's plan
Student:

We updated a policy, but the bot sometimes still quotes the old wording. What went wrong?

Tutor:

Most likely the old chunks were never removed. If updates insert new chunks without deleting the previous ones, both versions live in the index and either can be retrieved. Key every chunk by document id, and on update delete all chunks for that id before inserting the new set, ideally in one operation. Also check for an answer cache holding the old reply. Then search for a phrase that exists only in the old wording. Does anything still come back?

Written with AI under Skill Lab's direction as an example. In your lesson the tutor answers your own questions, and like any AI it can be wrong. Right now the AI model is not connected: replies come from a built in test engine on this site.

What you will be able to do

  • Choose between full rebuilds, incremental updates and reconciliation
  • Detect changes with timestamps, hashes and change feeds
  • Design stable chunk ids so updates replace old content cleanly
  • Handle deletions, permission revocations and document versions reliably
  • Migrate to a new embedding model without downtime and monitor freshness

Lesson plan

6 lessons. Pick one to start there.

  1. 1 How documents change List change types and set freshness targets per source. Start
  2. 2 Rebuild or increment Choose a sync strategy that fits size and change rate. Start
  3. 3 Change detection and stable ids Detect changes reliably and replace chunks cleanly. Start
  4. 4 Deletions, permissions and versions Give the critical change types the care they need. Start
  5. 5 Re-embedding migrations Switch embedding models or chunking without downtime or mixing. Start
  6. 6 Monitoring freshness Notice staleness before users do. Start

Try asking

Tap a question to start a lesson with it.

About this tutor

For experienced developers running retrieval over documents that change: policies revised monthly, wikis edited daily, files deleted, permissions changed. You learn to choose between full rebuilds and incremental updates, detect changes with timestamps, hashes and change feeds, design stable chunk ids so updates replace rather than duplicate, and treat deletions and permission revocations as the critical path. You also plan a re-embedding migration when switching embedding models, handle multiple versions of the same document, and monitor freshness so stale answers are noticed before users complain.

Reviews

Students can review a tutor after a paid lesson. Nobody has yet.