How do you keep a RAG index up to date as documents change?
RAG · Pro 1
Short answer
Use incremental indexing instead of rebuilding: detect changes with timestamps, content hashes or change data capture from the source, re-parse and re-embed only changed documents, delete chunks of removed ones, and keep stable document IDs so updates replace old chunks. Track freshness and run the pipeline on a schedule or from change events.
Deeper answer
Deletions are the part teams forget: a removed policy that still sits in the index will be retrieved. Store a document ID and version on every chunk so you can remove all of a document's chunks at once.
Changing the embedding model or chunking means a full re-index, so version the index and switch over only after evaluating the new one.
What a strong answer covers
- Incremental updates, not full rebuilds
- Detects changes: timestamps, hashes or CDC
- Handles deletions
- Stable document IDs and versions
- Full re-index when the embedding model changes
Answer it out loud in the mock interview about 1.5 min
Follow-ups to expect
- How would you detect that a document was deleted at the source?
- What forces a full re-index?
Common mistakes
- Forgetting deletions
- Mixing embeddings from two models in one index
Learn it
- How do you choose a chunk size for RAG?
- Your RAG app gives wrong answers. How do you find the cause?
- Design a RAG system that lets a law firm search and ask questions about 50,000 contracts.
- How would you detect hallucinations in a production RAG application?
- What are embeddings, and how are they used in search?
- How do you make a RAG system cite sources and stay grounded?
- What are hybrid search and reranking, and when do they help?
- How do metadata filters improve retrieval?
- How would you build RAG over documents full of charts and images?
- Your RAG system must handle scanned PDFs, tables and slides. How do you ingest them?
- How do you make sure users only get answers from documents they are allowed to see?
- What are query rewriting and HyDE, and when do they help?
- Your HR assistant keeps quoting last year's leave policy. How do you fix it?
- Tell me about a RAG system you built and how you measured whether it worked.
- Can you do retrieval for long documents without a vector database?
- What is RAG, and why would you use it?
- When would you use graph RAG instead of standard vector RAG?