/* case study */
Grounded RAG Notebooks
A NotebookLM-style app: upload documents, chat with grounded RAG answers, and generate studio artifacts such as summaries, mind maps, quizzes, flashcards and reports.
// impact: LangGraph agents with a durable, async artifact pipeline
// Context
An end-to-end exploration of production RAG: notebooks of source documents you can chat with, and that generate study and research artifacts.
// Challenges
- ›Answers must be grounded in the uploaded sources, not hallucinated
- ›Artifact generation is long-running and has to survive timeouts and retries
- ›Mixed inputs: .txt, .md, .pdf, .docx, public URLs, and discovered web sources
// Approach
- ›Supabase Postgres with pgvector for embeddings, with RLS, Storage and Realtime
- ›LangGraph agent orchestration for ingest, source discovery (Tavily) and studio generation
- ›Vercel Workflow for a durable async artifact pipeline, with Realtime pushing status to the UI
- ›Streaming chat through the Vercel AI SDK and OpenRouter, with Google OAuth and email auth
// Outcomes
- ›Deployed and live on Vercel
- ›Five artifact types generated from the same grounded source set
- ›Degrades gracefully when the database isn't connected, instead of crashing