postgres icon indicating copy to clipboard operation
postgres copied to clipboard

Feature Request: support pgvecto.rs extension

Open haschu opened this issue 1 year ago • 2 comments

Hey there! I hope it's okay that I open an issue for this one.

See: https://github.com/orgs/supabase/discussions/679#discussioncomment-8611842

Supabase currently puts a lot of focus on AI, vectors, RAG, etc. and has published extremely high quality articles like this one that help users (including myself and my company) get the most out of their Supabase vector database in terms of performance and scalability - which is absolutely awesome!

However, pgvector suffers from some serious bottlenecks, like this, which makes it almost unusable in combination with additional filters and indexes without suffering from really bad recall. We are currently experiencing this problem and there seems to be no reasonable workaround for it.
 See also: https://github.com/run-llama/llama_index/issues/9519


While searching for possible solutions, we came across pgvecto.rs, which claims to have solved these problems and also works much faster and offers many more features (including compression, support for higher dimensions, lower memory and storage usage and more) than pgvector. We tested it locally and were surprised at how well it performed compared to pgvector - I really encourage you to give it a quick try.

I would love to see pgvecto.rs as an extension for supabase! I'd also create a PR to support it (since there's an official deb package, that shouldn't be too hard). I've also spoken to the pgvecto.rs maintainers on their discord and they seem to be on board with supporting this on Supabase.

Any chance for making this happen in the foreseeable future? :)

haschu avatar Feb 28 '24 13:02 haschu

pgvecto.rs isn't a trusted extension. https://github.com/tensorchord/pgvecto.rs/issues/109

ShravanSunder avatar Feb 28 '24 15:02 ShravanSunder

Yes, that's right. My current understanding is that the restriction for trusted language extensions only applies to custom extensions: https://github.com/supabase/supabase/issues/14235#issuecomment-1903742923

What I am asking for is an official integration into the Supabase postgres version. So that you'd be able to activate pgvecto.rs via the dashboard, as with any other extension.

haschu avatar Feb 28 '24 15:02 haschu

we have decided not to support pgvecto.rs for now mostly due to it being new and some of the features may become supported directly in pgvector core

If not, we may circle back and re-evaluate

olirice avatar Aug 07 '24 18:08 olirice