Skip to content

Commit 0e74a19

Browse files
authored
Added sudowrite blog post (postgresml#1608)
1 parent 2e26626 commit 0e74a19

10 files changed

+129
-10
lines changed

pgml-cms/blog/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Table of contents
22

33
* [Home](README.md)
4+
* [Sudowrite + PostgresML](sudowrite-postgresml.md)
45
* [Korvus x Firecrawl: Rag in a single query](korvus-firecrawl-rag-in-a-single-query.md)
56
* [A Speed Comparison of the Most Popular Retrieval Systems for RAG](a-speed-comparison-of-the-most-popular-retrieval-systems-for-rag.md)
67
* [Korvus The All-in-One RAG Pipeline for PostgresML](introducing-korvus-the-all-in-one-rag-pipeline-for-postgresml.md)

pgml-cms/blog/how-to-improve-search-results-with-machine-learning.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: >-
33
PostgresML makes it easy to use machine learning on your data and scale
44
workloads horizontally in our cloud. One of the most common use cases is to
55
improve search results.
6-
featured: true
6+
featured: false
77
image: ".gitbook/assets/image (2) (2).png"
88
tags: ["Engineering"]
99
---

pgml-cms/blog/introducing-the-openai-switch-kit-move-from-closed-to-open-source-ai-in-minutes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
featured: true
2+
featured: false
33
tags: [engineering, product]
44
description: >-
55
Quickly and easily transition from the confines of the OpenAI APIs to higher

pgml-cms/blog/korvus-firecrawl-rag-in-a-single-query.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: How to perform all-in-one RAG over any website with Firecrawl and Korvus.
3-
featured: true
3+
featured: false
44
tags: [engineering]
55
image: ".gitbook/assets/Blog-Image_Korvus-Firecrawl.jpg"
66
---

pgml-cms/blog/meet-us-at-the-2024-ai-dev-summit-conference.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
featured: true
2+
featured: false
33
description: in South San Francisco May 29-30
44
image: ".gitbook/assets/image/ai_dev_summit.png"
55
---
@@ -20,7 +20,7 @@ Excitement is brewing as the [AI DevSummit](https://aidevsummit.co/) approaches,
2020

2121
AI DevSummit is the world’s largest artificial intelligence developer & engineering conference with tracks covering chatbots, machine learning, open source AI libraries, AI for the enterprise, and deep AI / neural networks.
2222

23-
<div id="ai-dev-summit-tip-container">
23+
<div class="hide-admonition-title-container">
2424

2525
!!! tip
2626

pgml-cms/blog/semantic-search-in-postgres-in-15-minutes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: >-
33
How to implement semantic search in Postgres with nothing but SQL.
4-
featured: true
4+
featured: false
55
tags: ["Engineering"]
66
image: ".gitbook/assets/Blog-Image_Semantic-Search.jpg"
77
---

pgml-cms/blog/serverless-llms-are-dead-long-live-serverless-llms.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: >-
33
Building LLM infrastructure presents a series of tradeoffs that aren't obvious at the outset, even for seasoned teams. This is our journey to high-performance LLMs at scale.
4-
featured: true
4+
featured: false
55
tags: [engineering]
66
image: ".gitbook/assets/serverless_llms.png"
77
---

pgml-cms/blog/speeding-up-vector-recall-5x-with-hnsw.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: >-
44
we announce our updated SDK that utilizes HNSW indexing to give world class
55
performance in vector search.
66
tags: [engineering]
7-
featured: true
7+
featured: false
88
image: ".gitbook/assets/blog_image_hnsw.png"
99
---
1010

pgml-cms/blog/sudowrite-postgresml.md

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
---
2+
description: How the best AI-powered app for fiction writers built their winning RAG stack
3+
featured: true
4+
tags: []
5+
image: ".gitbook/assets/sudowrite-pgml_blog-image.png"
6+
---
7+
8+
# Sudowrite + PostgresML
9+
10+
<div align="left">
11+
12+
<figure><img src=".gitbook/assets/image.png" alt="Author" width="100"><figcaption></figcaption></figure>
13+
14+
</div>
15+
16+
Cassandra Stummer
17+
18+
August 26, 2024
19+
20+
## The challenge
21+
22+
[Sudowrite](https://www.sudowrite.com/) is an AI-powered writing assistant that helps author's craft compelling stories and overcome writer's block. They wanted to give authors a cool new feature: the ability to chat with an AI editor about their stories.
23+
24+
James Yu, Sudowrite’s founder and CTO, knew that meant standing up a RAG (retrieval augmented generation) system. RAG is a cutting-edge AI technique, but James was searching for a solution that worked in production and at-scale, not just in the latest prototype trending on Hacker News.
25+
26+
“I didn’t want to geek out about RAG for days or weeks. Just give me something that approximately works and then I can move on to the next thing.”
27+
28+
## Enter PostgresML
29+
30+
PostgresML is simple – it’s PostgreSQL with GPUs for ML/AI apps. Along with GPUs, the PostgresML Cloud provides a full-featured machine learning platform right in the database; with functionality for search, embeddings, retrieval and more.
31+
32+
James was sold on the simplicity of doing AI in Postgres, the database his engineers already use and love
33+
34+
35+
<div class="hide-admonition-title-container">
36+
37+
!!! tip
38+
39+
<p class="center">
40+
"Why add yet another database to your stack if you don't have to? Being able to co-locate your data – to query across the same metadata stack – is a no brainer.”
41+
</p>
42+
43+
<p><i>James Yu, Founder @Sudowrite</i></p>
44+
45+
!!!
46+
47+
</div>
48+
49+
## Quick and easy implementation
50+
51+
Time to prototype was key for the Sudowrite team when testing out RAG systems. They used the Javascript SDK to get a full proof of concept chatbot fully synced to document changes in three hours flat. Once they decided to use PostgresML, it just took a few function calls with the SDK to start syncing data with production.
52+
53+
“It was pretty easy,” James said. “I also just like the visibility. As it's indexing I can just refresh my Postgres and I see the chunks, I can inspect it all. It’s immediate validation.” His team knows Postgres, so there was no need to get familiar with a niche vector database service like Pinecone or Qdrant.
54+
55+
James added: “I tried Pinecone and it felt very opaque - it’s a weird API and the data felt weirdly structured. I’m not going to pay exorbitant fees for a proprietary database where I’m not even sure how they’re performing the queries. I had to go through their UI, whereas for PostgresML I could visually see it in the same way as all my other data.”
56+
57+
And since PostgresML has ML/AI functionality built-in, they didn’t need to create complex data pipelines to connect to embedding services, data pre-processors, or other ML/AI microservices. The Sudowrite team performs embedding generation and retrieval using SQL queries, right inside their PostgresML database.
58+
59+
Additionally the Sudowrite team had access to an on-call PostgresML engineer and a private slack channel with same-day responses to ensure implementation was as smooth and fast as possible.
60+
61+
"The support from the PostgresML team has been top-notch," James adds. "They're always quick to respond when we have questions, and they understand our need for flexibility.”
62+
63+
## The results: In-database AI is a win for devs and users
64+
65+
With PostgresML in place, Sudowrite's new AI chatbot feature is already making waves:
66+
67+
- Sudowrite's RAG system makes more than 1 million calls per hour
68+
- The engineering team is loving the streamlined operations
69+
- A growing percentage of daily active users are chatting it up with the AI editor
70+
71+
Performance and scalability were initial concerns for Sudowrite, given their large document base. James recalls his pleasant surprise: **"I thought, 'wow it's really fast, it's indexing all these things.' I was skeptical at first because we had a lot of documents, but it indexed quickly and it's really performant."**
72+
73+
<div class="hide-admonition-title-container">
74+
75+
!!! tip
76+
77+
<p class="center">
78+
“The quality – especially the RAG piece – has been great. In terms of scaling and everything, it’s been great.”
79+
</p>
80+
81+
!!!
82+
83+
</div>
84+
85+
Additionally, PostgresML's integration has been seamless for Sudowrite's development team, allowing engineers to focus on enhancing the user experience rather than wrestling with complex infrastructure. “I even have a contractor, and we handed it off to him pretty easily…And for him to be able to get up to speed was relatively painless,” James added.
86+
87+
This efficiency has given Sudowrite confidence in their ability to scale the chatbot feature to meet growing demand – and the Sudowrite team sees tremendous potential for further adoption: "People want more chat. We have plans to make it more up front and center in the app."
88+
89+
## What's next for Sudowrite?
90+
91+
James and his team are just getting started. They're cooking up plans to:
92+
93+
- Make the chatbot even more visible in the app
94+
- Allow authors to import their entire novel and interact with it via RAG
95+
- Create automated knowledge graphs from author’s stories
96+
97+
98+
<div class="hide-admonition-title-container">
99+
100+
!!! tip
101+
102+
<p class="center">
103+
“PostgresML has given us a solid foundation for our product. Their RAG extends the capabilities of our LLMs. It’s an essential ingredient for us to create tools that help writers create even more amazing stories."
104+
</p>
105+
106+
!!!
107+
108+
</div>
109+
110+
## The bottom line
111+
112+
By choosing PostgresML, Sudowrite found a powerful, flexible solution that:
113+
114+
- Integrates seamlessly with their existing systems
115+
- Scales effortlessly without the need for complex infra management
116+
- Provides the transparency and flexibility to customize and expand their offering
117+
118+
James sums it up perfectly: "For me, PostgresML just makes a lot of sense.”

pgml-dashboard/static/css/scss/layout/_containers.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,9 @@
180180
background-color: #{$pink};
181181
}
182182

183-
#ai-dev-summit-tip-container {
183+
.hide-admonition-title-container {
184184
.admonition-title {
185-
display: none
185+
display: none !important;
186186
}
187187

188188
.admonition-tip {

0 commit comments

Comments
 (0)