AI-powered search and chat for a blog
Top 81.9% on sourcepulse
This project provides an AI-powered search and chat interface for the "Wait But Why" blog, enabling users to query and discuss Tim Urban's articles. It's designed for fans of the blog who want to explore its content through natural language.
How It Works
The system leverages OpenAI Embeddings (text-embedding-ada-002) to create vector representations of text chunks from the blog's essays. A search query is also embedded, and cosine similarity is used to find the most relevant passages stored in a Supabase PostgreSQL database with the pgvector extension. The chat functionality builds upon these search results by feeding them into GPT-3.5-turbo to generate contextually relevant answers.
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
(takes 20-30 minutes).npm run dev
Highlighted Details
Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
2 years ago
Inactive