// the find
mckaywrigley/paul-graham-gpt
RAG on Paul Graham's essays.
A minimal RAG demo over Paul Graham's essays — embed each essay chunk with OpenAI's ada-002, store vectors in Postgres/pgvector via Supabase, and either do similarity search or feed the top matches into GPT-3.5-turbo for chat. Built by McKay Wrigley (of chatbot-ui fame) as a teaching example, not a product.
The whole app is small enough to read end to end in 20 minutes — two API routes (search.ts, answer.ts) and a single page component, no framework ceremony hiding the RAG mechanics. Using pgvector on Supabase instead of a dedicated vector DB is a legitimately good call for this scale and is a pattern worth copying for small corpora. It ships a pre-computed embeddings CSV so you can run the whole thing without re-scraping or burning OpenAI credits on embeddings first.
Dead since July 2023 — pinned to ada-002 and gpt-3.5-turbo, both of which OpenAI has since deprecated or pushed into legacy status, so it won't run as documented without someone updating the model calls. The author admits he dumped most logic into the homepage component for simplicity, so there's no separation between fetching, chunking, and rendering to learn from or extend. There's no chunking strategy discussion, no reranking, no evaluation of retrieval quality — it's the textbook naive RAG with top-k cosine similarity and nothing else, so it teaches the happy path but not the parts that actually make RAG work well in practice. Zero tests.