Asistente RAG

Intelligent customer support system based on RAG (Retrieval-Augmented Generation): knowledge PDFs (FAQs, policies, manuals) are uploaded and a chat answers questions in real time grounded only in those documents, with no hallucinations. It includes a multi-tenant admin panel designed for public demos.
Ingestion processes the PDFs with text extraction, smart chunking and semantic embeddings. The chat streams answers token by token (SSE), keeps conversational memory of the last 10 interactions in the session and refuses honestly: if the information is not in the documents, it says so instead of making things up.
The architecture is multi-tenant without login: isolated anonymous sessions with automatic cleanup, hybrid vector search across global and private documents, and quota safeguards (per-session limits and daily counters) designed to live within the providers' free tiers.
Stack: Next.js 16 (App Router) with strict TypeScript, Route Handlers as a same-origin API, Supabase (PostgreSQL + pgvector) as the vector database, Google Gemini embeddings (gemini-embedding-001) and Groq Cloud as the LLM. Models configurable through environment variables.