timescale / pgvectorscale

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

Support inner product distance #96

Open JHawk0224 opened 3 weeks ago

JHawk0224 commented 3 weeks ago

Right now only cosine is supported, but it would be great to have support for inner product (<#>) as well!

cevian commented 3 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 3 weeks ago

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

irowberryFS commented 3 weeks ago

All OpenAI embedding models normalize their embeddings. So inner product (as far as I know) is faster than cosine.