apps/www/_blog/2023-02-07-chatgpt-supabase-docs.mdx
🆕 Want to build your own Clippy based on your own content? Use our Next.js OpenAI Doc Search Template to deploy your own now!
</div>We all know that Microsoft's real agenda for pouring billions into OpenAI is to revive their favorite friend Clippy. Today, we're doing our part to support the momentum by releasing “Supabase Clippy” for our docs (and we don't expect this name to last long before the lawyers catch on).
Want to try it out? It's a hidden feature while in MVP - visit supabase.com/docs and hit cmd + / to pull up the search box (sorry mobile users).
Last launch week we released our new documentation site to improve the developer experience, especially for new users.
When we first started Supabase our docs were very concise. We deliberately withheld "non-critical information" so that developers could consume everything in one sitting.
Our product suite has grown in the past 2 years and our docs have grown as a result. There's a lot to read. We're also attracting developers who've never used Postgres before, and it's becoming incumbent on us to train these developers on best-practices.
Developers have recently gained the ability to trust a bot. Where Clippy failed, ChatGPT succeeded.
This is convenient timing for us, since our documentation content is more than the average developer wants to consume in one go. Today we're providing a similar interface to ChatGPT which is trained on our own docs.
<video width="100%" autoPlay loop muted playsInline controls={true}> <source src="/images/blog/embeddings/embeddings.mp4" type="video/mp4" /> </video>To keep your expectations low, this implementation is a 1-week MVP. We're sharing this iteration to gather feedback and to teach you how to build something similar.
It's built with Supabase/Postgres, and consists of several key parts:
All the changes we made are in this Pull Request. Greg is here to explain every step in full detail:
<div class="video-container"> <iframe title="ClippyGPT" src="https://www.youtube-nocookie.com/embed/Yhtjd7yGGGA" frameborder="1" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen ></iframe> </div>You can find a full write up in our previous blog post: Storing OpenAI embeddings in Postgres with pgvector.
This current version is very basic, which makes it a good starting point if you want to build something similar.
One of the most interesting things about this feature was how it happened - almost completely from open source contributions. A short series of events:
A few weeks ago I received an email, drawing our attention to a Pull Request in our postgres GitHub repo:
After we merged the PR, I reached out to see if Greg was interested in helping with some documentation or a blog post to help the community to use pgvector. On the call, Greg surprised me with an initial prototype where he had ingested the Supabase docs for a ChatGPT-like experience. I was suitably impressed and suggested that we could explore ways to work together to build it into the Supabase docs. He wasted no time:
<div class="video-container"> <iframe title="ClippyGPT" src="https://www.youtube-nocookie.com/embed/yAsR7oe5vng" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen ></iframe> </div>We sponsored Greg to work on an MVP with us, along with some guides to help developers do the same. He pushed all his changes to the Supabase Docs, and we wrote a blog post together to help developers build something similar.
If you re-read the events above and swap “Supabase” for any other big-tech company, you'll grasp how impossible this series of events is for any company that's not open source. All the code that was contributed is licensed liberally, so we didn't need to jump through IP checklists. Our docs are publicly available on GitHub, so Greg could build his prototype without being granted access.
We're incredibly grateful for Greg's work here, so if you like what he's done then consider supporting him by checking out prmpts.ai and following him on twitter: @ggrdson.
While you're at it, consider supporting @ankane's great work on pgvector by starring them on GitHub, and sending your thanks.
Want to try Supabase Clippy? It's a hidden feature while in MVP - visit supabase.com/docs and hit cmd + / to pull up the search box (sorry mobile users).