RAG app for Paul Graham's essays
Top 18.0% on sourcepulse
This project provides an AI-powered search and chat interface for Paul Graham's essays, targeting users who want to query his writings. It leverages Retrieval Augmented Generation (RAG) to deliver contextual answers based on the essay content.
How It Works
The system uses OpenAI Embeddings (text-embedding-ada-002) to generate vector representations of text chunks from Paul Graham's essays. A Supabase PostgreSQL database with the pgvector
extension stores these embeddings. User queries are embedded and matched against the database using cosine similarity to retrieve relevant passages. These passages are then used to construct a prompt for GPT-3.5-turbo, enabling a conversational Q&A experience.
Quick Start & Requirements
npm i
OPENAI_API_KEY
, NEXT_PUBLIC_SUPABASE_URL
, SUPABASE_SERVICE_ROLE_KEY
in .env.local
.npm run scrape
npm run embed
(approx. 20-30 minutes).npm run dev
pgvector
.Highlighted Details
pgvector
.Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
The project prioritizes simplicity over composability, with much of the application logic contained within a single homepage component.
2 years ago
Inactive