Client Goal:
The client needed a single AI system capable of answering questions across all their business data — structured spreadsheets, unstructured documents, and scanned image files — without manual maintenance when files change.
What I Built:
I designed and delivered a production-grade Agentic RAG pipeline in n8n combining three retrieval engines into one intelligent agent:
— LightRAG (GraphRAG): Builds a live knowledge graph from documents, enabling relationship-aware reasoning across multiple files that standard vector search cannot handle.
— SQL RAG: Automatically ingests Excel and Google Sheets data into a Supabase PostgreSQL database and uses AI-generated SQL queries for mathematically exact answers on structured data.
— Hybrid Vector Search + Cohere Reranker: Semantic and keyword retrieval over standard documents with precision reranking before passing results to Gemini 2.
An OCR pipeline handles scanned PDFs and image-based files automatically before indexing. The system monitors Google Drive continuously — new files are ingested, updated files are re-processed, and deleted files are removed from all vector stores without any manual action.
Result:
A fully self-maintaining AI knowledge base that routes every question to the right retrieval engine automatically, delivered as a portable n8n JSON workflow.