News for hackers. Stuff that matters.
Re:Pgvector 0.5.0 Feature Highlights and how tos by 101011 on Tuesday August 29, 2023 @08:01PM (#37315861)
The constant stream of features getting added to pgvector is impressive. Also, really love some of the benchmarks and explanations that were thrown in here.
Re:Pgvector 0.5.0 Feature Highlights and how tos by chpatrick on Tuesday August 29, 2023 @08:12PM (#37315945)
Just out of curiosity, is it possible to efficiently get "For all rows in table A, give me the two nearest neighbors in table B" in SQL?
Re:Pgvector 0.5.0 Feature Highlights and how tos by winslett on Tuesday August 29, 2023 @08:31PM (#37316088)
You can do this with a lateral join.

SELECT * FROM A, LATERAL (SELECT * FROM B ORDER BY a.embedding <-> b.embedding LIMIT 2) AS closest_in_b ORDER BY A.id;

It’s going to have so-so performance. So, don’t hose your production server. Create a vector index on b.embedding. HNSW will be nice for this use case.

Re:Pgvector 0.5.0 Feature Highlights and how tos by chpatrick on Wednesday August 30, 2023 @09:21AM (#37321735)
Thanks! I've implemented this manually with HNSW and I was wondering if pgvector would be an easy replacement.
Re:Pgvector 0.5.0 Feature Highlights and how tos by thawab on Tuesday August 29, 2023 @09:46PM (#37316653)
Congratulations, can anyone give an insight on how this compares to pg_embedding [0] (Postgres and use HNSW). Or the use-cases compared to other victor databases. It’s getting hard to keep up what’s happening in the LLM scene.

[0] https://github.com/neondatabase/pg_embedding

Re:Pgvector 0.5.0 Feature Highlights and how tos by kordlessagain on Tuesday August 29, 2023 @10:12PM (#37316830)
I suspect a lot of the paying use cases for vector search right now have a lot to do with enterprise search functionality. As for the LLM stuff, I do wonder if it's paying bills yet.

If anyone is into embeddings, check out Instructor Large/XL. It's quite good and super fast using L4s. Haven't quite figured out the instructions bits yet, but got it clustering things today and that was cool.

Re:Pgvector 0.5.0 Feature Highlights and how tos by roseway4 on Tuesday August 29, 2023 @11:26PM (#37317318)
Jonathan did just that in his prior blog post: https://jkatz05.com/post/postgres/pgvector-hnsw-performance/

pgvector_hnsw outperforms pg_embedding using a query per sec / recall measure across various common embedding widths and a range of dataset sizes.

Re:Pgvector 0.5.0 Feature Highlights and how tos by tpetry on Wednesday August 30, 2023 @02:11AM (#37318292)
Is there a reason left to use ivfflat compared to hnsw? I am not that deep in the tech. But if hnsw is much much faster thats a big argument. Is hnsw better in every aspect or is the recall accurracy better for ivfflat?