Find answers from the community

Updated 2 years ago

Pgvector

At a glance

The post indicates that the community member has moved to PostgreSQL. The comments discuss the use of the pgvector library and the Supabase vector store, and whether they are returning distance or similarity. Some community members are unsure about the differences between the PostgreSQL adaptor and the Supabase version, but they conclude that the differences are not significant.

Useful resources
Yes, I moved to postgresql.
L
S
14 comments
Hmm, the code just uses the raw similarity returned by pgvector.

I haven't looked into it much, but maybe pgvector is returning distance instead of similarity? So smaller is closer?
Should probably find pgvector docs for this
Wait a sec. I didn't know you have your own postgres adaptor. I actually used the supabase version
Oh! Yea we support both pgvector/postgres and supabase/vecs
Looks like it's assuming it's distance πŸ€”
what means the less the better, right?
Yea, that's what distance means. And we are converting the distance to a similarity

But it seems like it probably isn't returning distance
Oh I see it's in the query function. Thanks!!
btw what is the difference between your postgres adaptor and supabase's one?
Tbh, I really have no clue haha

I think they both use postgres, but supabase uses this vecs library instead of pgvector? Maybe?
they use pgvector on top of postgres
yeah I don't think the difference is significant
Add a reply
Sign up and join the conversation on Discord