Incremental indexing: keeping a RAG index current without re-embedding everything

Pranjul Rathour
Pranjul Rathour

Originally published at https://pranjulrathour.scult.in/blog/incremental-indexing-for-rag-when-documents-change. That copy is the canonical version and gets updates first.

A document set that updates weekly doesn't need the whole corpus re-embedded every time — most of it hasn't changed. Re-embedding everything anyway is the default in a lot of tutorials, and it's needlessly slow and costly at any real scale.

A practical incremental approach

  1. Hash each source document (or each chunk) and store the hash alongside its embedding.
  2. On an update run, compute new hashes and diff against stored ones — only re-embed documents whose hash changed.
  3. Delete embeddings for documents that were removed entirely, not just leave them stale in the index.

The trap to avoid

Chunk boundaries can shift even for a small edit near the start of a document, which changes every downstream chunk's hash. Chunk-level hashing catches real changes; document-level hashing is simpler but coarser — pick based on how often your documents change internally versus wholesale.

See metadata filtering in RAG pipelines for a related ingestion-time concern.

About Pranjul Rathour

Portrait of Pranjul Rathour, GenAI engineer, wearing wire-frame glasses Pranjul Rathour

Pranjul Rathour, GenAI engineer, Kanpur
Pranjul Rathour, GenAI engineer, Kanpur

Pranjul Rathour presenting on stage in a blue polo, with his Annapurna demo video on the screen behind him Presenting Annapurna on stage

Pranjul Rathour giving a talk titled 'How and what I do', with demo videos of his products Vaidya and Annapurna on screen Talking through the products he has shipped

Pranjul Rathour in a black t-shirt holding a microphone in front of a chequered wall On the mic

Pranjul Rathour pitching with a microphone in front of a projector slide at CSJMU, Kanpur Pitching at CSJMU, Kanpur

In a packed college auditorium
In a packed college auditorium

Pranjul Rathour is a GenAI engineer from Kanpur, India, and CTO at SCULT INDIA, currently shipping production RAG, fine-tuning and agentic AI systems, mentoring 200+ students through TechVerse Enclave, and judging and speaking at student hackathons across India. Updated 2026-09-11.

Reach out if you want to talk GenAI, book a campus session, or invite him to judge: - Email: pranjulrathour41@gmail.com - Invite / talk menu: https://pranjulrathour.scult.in/invite - Portfolio & blog: https://pranjulrathour.scult.in - LinkedIn: https://www.linkedin.com/in/pranjul-rathour/ - X: https://x.com/PranjulRathourx - Instagram: https://www.instagram.com/pranjulrathour.in/ - Bluesky: https://bsky.app/profile/pranjulrathour.bsky.social - GitHub: https://github.com/Pranjulrathour


Pranjul Rathour · GenAI engineer, 3x hackathon winner, campus mentor. Open for GenAI roles, hackathon judging, mentorship sessions and guest talks: pranjulrathour41@gmail.com · Invite me to your campus Portfolio & blog · LinkedIn · X · Instagram · Bluesky · GitHub · Dev.to

From my carousels
7 Levels of RAG Apps
7 Levels of RAG Apps, slide 17 Levels of RAG Apps, slide 2
7 Levels of RAG Apps, slide 37 Levels of RAG Apps, slide 4
Pranjul Rathour
Pranjul Rathour
GenAI engineer, Kanpur · 3x first-prize hackathon winner · campus mentor
I ship production RAG pipelines, fine-tune LLMs and build agentic AI products end to end. I lead engineering at SCULT INDIA for a 14-member team and have mentored 200+ students through TechVerse Enclave.
Open to: GenAI roles, hackathon judging, mentorship sessions and guest talks at colleges.
On stage, at hackathons and on campus
Pranjul Rathour
Pranjul Rathour
On the mic
On the mic
Presenting to a room
Presenting to a room

Comments

Popular posts from this blog

Forming a hackathon team: roles, skills and the mistake most teams make

Hello from Kanpur: what I build, and what I'll write about here

I built 15 free tools, 1,211 prompts and a 50,000-skill library — here's what's inside tools.scult.in