Automated RAG vector store sync by Filip MijicAutomated RAG vector store sync by Filip Mijic

Automated RAG vector store sync

Filip Mijic

Filip Mijic

Automated RAG vector store sync (n8n + Supabase pgvector)
The problem: a retrieval-augmented chatbot whose knowledge base drifts out of date the moment the source docs change — unless someone remembers to manually re-embed everything.
What I built: a fully automated reindex pipeline in n8n that keeps the vector store current with zero manual steps.
How it works:
Triggers on a daily schedule and on a deploy webhook
Fetches source markdown, chunks it on heading boundaries with overlap to preserve context
Embeds in batches via a Supabase Edge Function (384-dim)
Bulk UPSERTs vectors into Postgres with pgvector
Removes stale chunks from deleted or shortened docs automatically
Why it's solid:
Idempotent — safe to re-run any number of times, no duplicates, no drift
Runs entirely on free tiers ($0 infra)
Retry-on-fail on network calls + a dedicated error workflow for alerts
I design and ship production automations like this — RAG pipelines, data sync, internal tooling, and API integrations. If you're building anything with AI retrieval or you've got a repetitive data process worth automating, send me a message and let's scope it.
Like this project

Posted Jun 17, 2026

Automated RAG vector store sync (n8n + Supabase pgvector) The problem: a retrieval-augmented chatbot whose knowledge base drifts out of date the moment the s...