Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Adds the new clippy post

Copple568d93de1d34
diff --git a/apps/www/_blog/2023-02-03-openai-embeddings-postgres-vector.mdx b/apps/www/_blog/2023-02-03-openai-embeddings-postgres-vector.mdx
index caf2c2bd758..264b04033f6 100644
--- a/apps/www/_blog/2023-02-03-openai-embeddings-postgres-vector.mdx
+++ b/apps/www/_blog/2023-02-03-openai-embeddings-postgres-vector.mdx
@@ -7,7 +7,7 @@ thumb: embeddings/og_pgvector.png
tags:
- postgres
- ai
-date: '2023-01-06'
+date: '2023-02-06'
toc_depth: 3
---
diff --git a/apps/www/_blog/2023-02-07-chatgpt-supabase-docs.mdx b/apps/www/_blog/2023-02-07-chatgpt-supabase-docs.mdx
new file mode 100644
index 00000000000..675436c6153
--- /dev/null
+++ b/apps/www/_blog/2023-02-07-chatgpt-supabase-docs.mdx
@@ -0,0 +1,120 @@
+---
+title: 'Supabase Clippy: ChatGPT for Supabase Docs'
+description: Creating a ChatGPT interface for the Supabase documentation.
+author: paul_copplestone
+image: docsgpt/og_supabase_clippy.png
+thumb: docsgpt/og_supabase_clippy.png
+tags:
+ - postgres
+ - ai
+date: '2023-02-07'
+toc_depth: 3
+---
+
+We all know that Microsoft's real agenda for pouring billions into OpenAI 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).
+
+![Clippy](/images/blog/docsgpt/clippy.png)
+
+
+
+Want to try it out? It's a hidden feature while in MVP - visit [supabase.com/docs](/docs) and hit `cmd` + `/` to pull up the search box (sorry mobile users).
+
+# ChatGPT for Supabase Docs
+
+Last launch week we [released](/blog/new-supabase-docs-built-with-nextjs) our new documentation site, which gives us more control of the developer experience with Supabase.
+
+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. We're seeing a lot of developers who have never used Postgres before, and it's becoming incumbent on us to train these developers on best-practices.
+
+![Missing indexes](/images/blog/docsgpt/indexes.png)
+
+### The “ask” interface
+
+Thanks to ChatGPT, developers have recently gained an the ability to trust a bot. Where Clippy failed, GPT succeeded.
+
+Developers now know that the best way to get an answer isn't Google, it's ChatGPT. So today we're providing a similar interface which is trained on our own docs.
+
+<video width="99%" 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 wanted to share this iteration so that you can build something similar yourself.
+
+## How it's built
+
+You can also get a full write up in our previous blog post: [Storing OpenAI embeddings in Postgres with pgvector](https://supabase.com/blog/openai-embeddings-postgres-vector)
+
+It's built with Supabase/Postgres, and consists of several key parts:
+
+1. Parsing the Supabase docs into sections.
+2. Creating embeddings for each section using OpenAI's embeddings API.
+3. Storing the embeddings into Postgres using the pgvector extension.
+4. Getting a user's question.
+5. Query the Postgres database for the most relevant documents related to the question.
+6. Inject these documents as context for GPT-3 to reference in its answer.
+7. Streaming the results back to the user in realtime.
+
+All the changes we made are in [this](https://github.com/supabase/supabase/pull/12056) Pull Request. Greg is here to explain every step in full detail:
+
+<iframe
+ width="560"
+ height="315"
+ src="https://www.youtube-nocookie.com/embed/Yhtjd7yGGGA"
+ title="ClippyGPT"
+ frameborder="0"
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
+ allowfullscreen
+></iframe>
+
+## What's next
+
+This current version is very basic, which makes it a good starting point if you want to build something similar.
+
+- **Expand the knowledge base:** Create embeddings for our reference docs, GitHub Discussions, Discord discussions, etc. The current iteration is only using the Guides.
+- **Caching:** Cache queries so that we can provide answers instantly to similar/matching questions.
+- **User-assisted improvements:** Ability to thumbs-up responses for relevance.
+- **Beyond search:** perhaps we can make this interface interactive, guiding users through instructions.
+
+## Bonus: The power of open source
+
+One of the coolest things about this implementation was *how* it happened - almost all from open source contributions. A short series of events:
+
+### A friendly email
+
+A few weeks ago I received an email, drawing our attention to a [Pull Request](https://github.com/supabase/postgres/pull/472) in our `[postgres](https://github.com/supabase/postgres)` GitHub repo:
+
+![Greg](/images/blog/docsgpt/greg.png)
+
+
+### A friendly chat
+
+After it was merged I reached out to see if he was interested to help with some documentation or a blog post that would help the community to use pgvector with embeddings. On the call, Greg showed me a full 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:
+
+
+<iframe
+ width="560"
+ height="315"
+ src="https://www.loom.com/embed/277e04a5242849c2aae18806350971ce"
+ title="ClippyGPT"
+ frameborder="0"
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
+ allowfullscreen
+></iframe>
+
+### A friendly collaboration
+
+And then a friendly collaboration was started. Greg [pushed all his changes](https://github.com/supabase/supabase/pull/12056) to the Supabase Docs, and we wrote a couple of blog posts together to help developers build the same features themselves.
+
+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 don't need to jump through IP hurdles. All code is available, so developers can contribute and build prototypes without being granted access. Of course, Supabase chooses what will be merged into production but there are so many obstacles cleared by building in public.
+
+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](https://prmpts.ai/).
+
+While you're at it, consider supporting [@ankane](https://github.com/ankane)'s great work on [pgvector](https://github.com/pgvector/pgvector) by starring them on GitHub, and sending your thanks
+
+## Try it out
+
+Want to try Supabase Clippy? It's a hidden feature while in MVP - visit [supabase.com/docs](/docs) and hit `cmd` + `/` to pull up the search box (sorry mobile users).
+
+{ /* If you have any comments we'd love to hear them in our ShowHN: */ }
diff --git a/apps/www/public/images/blog/docsgpt/clippy.png b/apps/www/public/images/blog/docsgpt/clippy.png
new file mode 100644
index 00000000000..6995b48bfb5
Binary files /dev/null and b/apps/www/public/images/blog/docsgpt/clippy.png differ
diff --git a/apps/www/public/images/blog/docsgpt/greg.png b/apps/www/public/images/blog/docsgpt/greg.png
new file mode 100644
index 00000000000..3e6eb4298a9
Binary files /dev/null and b/apps/www/public/images/blog/docsgpt/greg.png differ
diff --git a/apps/www/public/images/blog/docsgpt/indexes.png b/apps/www/public/images/blog/docsgpt/indexes.png
new file mode 100644
index 00000000000..08484086e18
Binary files /dev/null and b/apps/www/public/images/blog/docsgpt/indexes.png differ
diff --git a/apps/www/public/images/blog/docsgpt/og_supabase_clippy.png b/apps/www/public/images/blog/docsgpt/og_supabase_clippy.png
new file mode 100644
index 00000000000..fe5f609b554
Binary files /dev/null and b/apps/www/public/images/blog/docsgpt/og_supabase_clippy.png differ
diff --git a/apps/www/public/rss.xml b/apps/www/public/rss.xml
index 3debdf27d81..2d92d96eaa1 100644
--- a/apps/www/public/rss.xml
+++ b/apps/www/public/rss.xml
@@ -5,14 +5,21 @@
<link>https://supabase.com</link>
<description>Latest news from Supabase</description>
<language>en</language>
- <lastBuildDate>Thu, 05 Jan 2023 23:11:00 +0000</lastBuildDate>
+ <lastBuildDate>Mon, 06 Feb 2023 23:11:00 +0000</lastBuildDate>
<atom:link href="https://supabase.com/rss.xml" rel="self" type="application/rss+xml"/>
<item>
+ <guid>https://supabase.com/blog/chatgpt-supabase-docs</guid>
+ <title>Supabase Clippy: ChatGPT for Supabase Docs</title>
+ <link>https://supabase.com/blog/chatgpt-supabase-docs</link>
+ <description>How to create a ChatGPT interface for developer documentation.</description>
+ <pubDate>Mon, 06 Feb 2023 23:11:00 +0000</pubDate>
+</item>
+<item>
<guid>https://supabase.com/blog/openai-embeddings-postgres-vector</guid>
<title>Storing OpenAI embeddings in Postgres with pgvector</title>
<link>https://supabase.com/blog/openai-embeddings-postgres-vector</link>
<description>An example of how to build an AI-powered search engine using OpenAI's embeddings and PostgreSQL.</description>
- <pubDate>Thu, 05 Jan 2023 23:11:00 +0000</pubDate>
+ <pubDate>Sun, 05 Feb 2023 23:11:00 +0000</pubDate>
</item>
<item>
<guid>https://supabase.com/blog/supabase-beta-december-2022</guid>