Back to index
01/AI Agents / RAG/2025/Production

multiagent RAG Platform

LLM-powered multi-agent system with avatar-driven RAG over scheme & franchise corpora.

multiagent RAG Platform
-2s
Latency cut
+30%
Support efficiency
30+
RLS policies
// Overview

Built at Fabapps Lab. End-to-end retrieval-augmented generation platform: PDF ingestion through S3 + BullMQ workers, OpenAI embeddings into Pinecone, and a TypeScript LangChain agent server orchestrating scheme, brand and RAG agents. Powers HeyGen and Anam AI avatars on a Next.js kiosk.

// Problem

Government scheme + franchise data trapped in long PDFs. Citizens needed real-time, multilingual avatar conversations grounded in the actual documents — not hallucinated answers.

// Approach
01Two-server split: ragUploaderServer for ingestion (Express + BullMQ), ragServer for query (TypeScript + LangChain agents).
02Recursive chunking (1000/200) with rich metadata (sector, industry, scaleFrom/scaleTo) for filtered retrieval.
03Dynamic system-prompt middleware: detect criteria → build Pinecone filter → inject top-k docs + user profile.
04PostgresSaver checkpointing on Supabase for cross-session conversation memory.
05Hindi mode bypasses LangChain streaming via raw fetch to prevent leakage into avatar speech.
// Outcome
Latency reduced ~2s on RAG path
Support efficiency +30%
30+ Supabase RLS policies, 25+ modular services for multi-tenant integrity
Three frontends share the same agent backend (admin, embeddable widget, kiosk)
// Stack
TypeScriptNext.jsLangChainOpenAIPineconeBullMQ + RedisSupabaseAWS S3HeyGenAnam AI
Next case →

Align AI