正在加载视频...

视频加载失败

We open sourced Postgres LLM many developer AI work flows look like this: upsert row -> api call -> process with ai -> update row so we thought what if you can run LLMs right in your database with all the primitives and auth - fully async, doesn't block...

60,425 次观看 • 5 个月前 •via X (Twitter)

25 条评论

Yoeven 的头像
Yoeven5 个月前

Full blog:

Supabase 的头像
Supabase5 个月前

This is 🔥

CryptoClaw 的头像
CryptoClaw5 个月前

this is clean. the upsert -> api call -> process -> update pattern is literally every AI workflow i've built. putting the LLM call inside the db layer removes so much plumbing. no more orchestrating between supabase and an external service. async + any model is the right call too

Sadiq (mech interp arc) 的头像
Sadiq (mech interp arc)5 个月前

uhh finally someone built it And it's yoeven

Occludra - AI Security Gateway 的头像
Occludra - AI Security Gateway5 个月前

Interesting architecture. Running LLMs inside Postgres means your row data flows directly into prompts. Worth thinking about which columns get passed to the model and whether PII redaction lives at the DB layer or above it.

Yoeven 的头像
Yoeven5 个月前

@AISGateway Great point. You can define which columns from your row flow into your prompt, only selected columns will be seen but the prompt. So you can architect it accordingly

opensourceaihub 的头像
opensourceaihub5 个月前

Moving LLM calls into the DB layer is a clever inversion. Eliminates the app-orchestration round trip and keeps the logic where the data already lives. How does it handle provider rate limits at query scale?

Yoeven 的头像
Yoeven5 个月前

There's a batching queue system built in which you can adjust according to the rate limits you have

Keith Vaughan 的头像
Keith Vaughan5 个月前

@MekongWhisper

Pratham Patel 的头像
Pratham Patel5 个月前

This is interesting something i would love to use, but doesn't supabase already have this?

Yoeven 的头像
Yoeven5 个月前

Now it does ;)

Saïd Aitmbarek 的头像
Saïd Aitmbarek5 个月前

dope!

Saylor 的头像
Saylor5 个月前

Baking the AI natively into Postgres triggers gives you perfect ACID compliance and zero middleware. Postgres isn't an async HTTP client. If you insert 10,000 rows at once, pg_cron will fire 10,000 HTTP requests to the LLM. You'll exhaust the database worker pool waiting for inference. Edge workers should poll the DB.

Yoeven 的头像
Yoeven5 个月前

It's batched by default by chunks of 20, you can increase it or reduce it based on your compute. You could set up edge workers if you want but it defeats the purpose since it leaves the Postgres word and goes back to calling a server.

Saylor 的头像
Saylor5 个月前

Batching by 20 reduces the request count, but it doesn't solve the core scalability limit: inference latency.

Vincenzo Domina, M.eng 的头像
Vincenzo Domina, M.eng5 个月前

YES finally ... super excited! was thinking about this for a while similar like cloudflare is going for a fullstack agent in a box with batteries included (state, db, etc) this sounds like the missing piece for a full agent runtime in a "supabase box"

gary IH fung 的头像
gary IH fung5 个月前

yikes

Yoeven 的头像
Yoeven5 个月前

Well idk what to tell you, more and more app logic between your database, server and even frontend is more shared than ever before. Authorisation used to be server logic, now we have RLS. The implementation does matters, give it a try, you might like it :)

gary IH fung 的头像
gary IH fung5 个月前

add rls is an antipattern to my list

Yoeven 的头像
Yoeven5 个月前

Ok boomer

gary IH fung 的头像
gary IH fung5 个月前

ah, Slop Combinator invested in you? That explains it good luck kid

Mr Trava 的头像
Mr Trava5 个月前

@dshukertjr Running LLMs inside Postgres could slash API overhead for real time product enrichment. How do you handle concurrency when multiple order rows trigger AI processing at the same time?

🇺🇸captain america 🇺🇸 的头像
🇺🇸captain america 🇺🇸5 个月前

@supabase Yoooo very cool 👀

mac 的头像
mac5 个月前

"Claude integrate this somehow into our supabase projects and make no mistakes"

Trevor I. Lasn 的头像
Trevor I. Lasn5 个月前

oh this is exactly the piece i've been wanting. my pgvector pipeline is mostly upsert plus external call plus update row, running it inline kills the round trip

相关视频