gannonh/chatgpt-pgvector
A starter app using OpenAI embeddings and pgvector to create a domain-specific conversational interface with source-cited answers.

This starter application demonstrates how to build a domain-specific question-answering system by combining OpenAI’s embedding API with vector search. Documents are scraped, chunked into 1000-character segments, and converted to embedding vectors stored in a Supabase PostgreSQL database using pgvector. When a user asks a question, the query is embedded and cosine similarity search finds the most related documents, which are then used to construct a prompt for GPT-3.5-turbo’s chat completions API. The response is streamed to the user, providing grounded answers with cited sources.