timescale / pgvectorscale

A complement to pgvector for high performance, cost efficient vector search on large workloads.
PostgreSQL License
606 stars 23 forks source link

Support L2 distance #95

Open xcu opened 3 weeks ago

xcu commented 3 weeks ago

Right now only cosine is supported, but it would be great to have support for L2 as well.

cevian commented 2 weeks ago

Please vote on this issue of there is interest. We are also happy to get PRs. Otherwise, we'll prioritize this on our roadmap too.

cevian commented 2 weeks ago

@xcu It would also be useful to know which models need this? i.e. why this is important for your use-case.

xcu commented 2 weeks ago

@cevian I am running some tests to extract faces and see how much one resembles to the other, so L2 comes pretty handy for this. So far I'm using pgvector for it with IVF, but I'd love to try pgvectorscale and see how recall/speed improves.