MultiDoc RAG
A multi-document RAG platform that ingests PDFs asynchronously, indexes them into a shared retrieval layer, and answers grounded questions with citations.
MultiDoc RAG is a document-intelligence platform built around one core idea: retrieval should work across a real document set, not only within a single uploaded file. The system lets users upload many PDFs, processes them asynchronously, stores embeddings and metadata in a workspace-scoped retrieval layer, and answers grounded questions using citations drawn from the indexed corpus.
The project moves beyond a small RAG demo by treating ingestion, indexing, retrieval, and usage control as first-class concerns. The query path can pull relevant context from multiple indexed documents together rather than limiting the user to one source file at a time.
Inspiration Behind It
The project was built to go beyond a toy retrieval demo and make document QA work across a larger corpus. The goal was not just to embed one file, but to ingest many documents, manage them reliably, and query across them in one system.
That required more than prompt assembly. MultiDoc RAG was shaped around the surrounding engineering work as well: signed uploads, background extraction and indexing, chunk and embedding persistence, workspace isolation, token controls, and grounded answer generation.
System Architecture
Architecture Diagram
MultiDoc RAG
11 nodes
About The Flow / Architecture
The architecture combines a React client, FastAPI server, Redis and RQ worker pipeline, Supabase authentication and storage, and Postgres with pgvector. Uploads are processed asynchronously so ingestion can scale without blocking the request path.
A key design choice is the split between binary storage and retrieval storage. PDFs live in Supabase Storage, while extracted text, chunks, embeddings, usage state, and query logs live in Postgres. The query path embeds the question, retrieves relevant chunks across the indexed document set, and builds a grounded answer with citations.
MultiDoc RAG ingests many PDFs into one retrieval system instead of treating document QA as a one-file demo. Users can upload documents, let background workers process them, and query across the indexed set with grounded citations tied back to source chunks and pages.
The repository combines FastAPI, React, Redis and RQ workers, Supabase auth and storage, and pgvector-backed Postgres. It stands out because it treats ingestion scale, retrieval behavior, and operational controls as part of the product rather than afterthoughts.