← all repositories

gannonh/chatgpt-pgvector

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

935 stars TypeScript RAG · SearchChat Assistants
chatgpt-pgvector
Velocity · 7d
+0.8
★ / day
Trend
steady
star history

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.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.