finds.dev

gannonh/chatgpt-pgvector

ChatGTP (gpt3.5-turbo) starter app

View on GitHubHomepage ↗

★ 935TypeScriptupdated May 2023

// the take

A starter app showing how to wire OpenAI embeddings + pgvector (via Supabase) into a Next.js chat interface, so you can ask questions against your own scraped documents instead of relying on GPT's training data. It's a proof-of-concept, not a production tool — the value is in seeing the RAG pattern end to end in a few hundred lines of TypeScript.

The core RAG loop is clear and readable: scrape → embed → store → similarity search → construct prompt → stream response. Using a Postgres function for the similarity search keeps the vector query logic version-controlled alongside the schema. The streaming response via the OpenAI API is wired up correctly, which is the part most tutorials get wrong. Good starting point if you want to understand the mechanics before reaching for a framework like LangChain.

Last commit was May 2023 — it's frozen in time and uses text-embedding-ada-002 (1536 dimensions), which OpenAI has since superseded. No chunking strategy beyond a flat 1000-character split, which will produce terrible retrieval on structured content like code or tables. The Supabase SQL setup is manual copy-paste with no migrations, so there's no way to evolve the schema without manual intervention. No evaluation or observability — you have no idea whether the retrieved chunks are actually relevant to the query.

We read the README, the directory tree and a key source file in July 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
935
Forks
127
Language
TypeScript
Last commit
5 May 2023

// nearby

If chatgpt-pgvector isn't quite it.

All repos →