Field note

Building a RAG pipeline that processes documents with incremental updates

A build note from a RAG document system tested on real content. The retrieval was the easy part; the document lifecycle - incremental add/delete and domain separation - was the real work.

Jun 5, 2025 · Navin Agrawal · AI systems · 3 min read

Building a RAG pipeline that processes documents with incremental updates

Visual brief

Visual brief

Building a RAG pipeline that processes documents with incremental updates

As of June 2025 / build note

In a RAG system, similarity search is the easy part. The document lifecycle - adding, deleting, and keeping corpora separate without a full reindex - is the real engineering.

A build note from a document-processing pipeline I put together while working toward GenAI certification. I wanted it to handle real documents, not a clean demo dataset, so I tested it on Federal Reserve reports and AI research papers.

Most RAG tutorials stop at “embed the docs, search the vectors, return the chunks.” That gets you a demo. It does not get you something you can keep feeding new documents without rebuilding everything each time. So start with the system end to end, then look at the three parts that actually took the design time.

Pipeline (June 2025)

The flow end to end, and the three things that took the most design time - none of which is the vector search itself.

As of June 2025: a RAG pipeline - PDF in, semantic chunking (~10k+ chunks), embeddings, FAISS domain-separated index, retrieval with a real-time relevance filter and Word report output. Harder than expected: incremental add/delete that touches only the affected vectors, domain separation so queries stay inside their corpus, and the FAISS vs ChromaDB performance trade-offs.
Read it as the lifecycle, not just the query path: ingest, index, retrieve, and the selective updates in between.

Pipeline (June 2025)

Pipeline (June 2025)

As of June 2025: a RAG pipeline - PDF in, semantic chunking (~10k+ chunks), embeddings, FAISS domain-separated index, retrieval with a real-time relevance filter and Word report output. Harder than expected: incremental add/delete that touches only the affected vectors, domain separation so queries stay inside their corpus, and the FAISS vs ChromaDB performance trade-offs.

The system processes about 10,000+ text chunks and lets you search across different document types while keeping them separate, so an AI query about financial reports does not accidentally pull in unrelated research content. That separation sounds simple and was not.

Where the time actually went

The first lesson was that incremental updates are a feature, not a given. Adding a document through the UI automatically creates its chunks, embeddings, and vector-database entries. Deleting one removes just those chunks and embeddings without touching the rest of the index. Getting delete to be surgical - no full rebuild, no orphaned vectors - took more thought than the initial ingestion did.

The second was domain separation. Keeping document types in separate retrieval spaces is what stops a query from returning plausible-but-wrong context from the wrong corpus. In a banking setting that is not a nicety; it is the difference between a useful answer and a compliance problem.

The retrieval is easy. The lifecycle - selective updates, clean deletes, domain isolation - is where the engineering actually lives.

The architecture lesson

The interesting comparisons were not “which model” but “which vector store and why.” FAISS gave fast search; the trade-offs against ChromaDB were worth exploring rather than assuming. Adjustable relevance filtering that updates in real time, and report generation in Word for documentation, rounded out something usable rather than just demonstrable.

Corpus

~10,000+ chunks

Tested on real content - Federal Reserve reports and AI research papers - rather than a toy dataset, so the retrieval behavior reflects messy real documents.

Vector store

FAISS

Fast similarity search, with the FAISS-vs-ChromaDB performance trade-offs being the part most worth exploring.

The hard part

The lifecycle

Incremental add/delete and domain separation - not the search itself - were trickier than expected and where the design time went.

The honest framing: this was a learning project on the way into AI engineering, and the parts I expected to be hard (embeddings, search) were well-trodden, while the parts I underestimated (selective updates, separation) were where the real work sat.

Was this useful?

Choose once.

Related Posts

View All Posts »
Most AI agents never reach production. Payments is where that gets expensive

Most AI agents never reach production. Payments is where that gets expensive

The widely cited figure is that 88 percent of AI proofs of concept never reach production. Agentic payments inherit that gap, and the teams that cross it are not winning on model selection. They are winning on payments-specific infrastructure that makes an agent idempotent, governable, and rollback-safe at the rail boundary.

Multi-model is the new multi-rail

Multi-model is the new multi-rail

Every payment system routes across multiple rails - ACH fails, traffic moves to wire, and wire is dear for small amounts so you route to RTP. Most AI systems still call one model and hope it stays up. The LLM gateway is the same routing engine payments has run for decades, and it needs the same three things to count.

Agents do the wiring, architects carry the tradeoffs

Agents do the wiring, architects carry the tradeoffs

AI agents are arriving faster than most banking career ladders can adapt, and the market is already rewarding people who work with them. The career moat was never wiring up another API call. It is the judgment calls agents cannot own - which rail to trust, how much latency to spend, who the regulator will be.

AI agents can buy now, and fraud systems were not built for it

AI agents can buy now, and fraud systems were not built for it

Stripe, OpenAI, and Google shipped protocols that let AI agents complete purchases inside a conversation. The rails are already fast enough. The problem is that fraud detection was architected around a human clicking buy on a trusted surface, and agents break that assumption.