From: VladlenPopolitov (@VladlenPopolitov) <noreply+VladlenPopolitov@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] PR #524: Add search option to better process queries with WHERE clause (relaxed monotonicity)
Date: Thu, 18 Apr 2024 17:44:08 +0000
Message-ID: <gh-pgvector-pgvector-524-c2064715207@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-524@github.com>
References: <gh-pgvector-pgvector-524@github.com>
1. The reason to make ANN-benchmark without WHERE is to ensure, that there is no significant performance degradation, that can kill this idea. I tested this idea on hnswlib library and did benchmark, that had similar results. After that I implemented it in pgvector code and checked in benchmark. Attached picture above has results from benchmark with lastfm dataset (run on MacBookPro M1). PostgreSQL 16.1, maintenance_work_mem 16Gb, shared_buffers 4Gb. lastfm data set on the server with AMD EPYC 9654(AVX256) has the similar results. Also I tested on datasets glove-100 and fashion-mnist: decrease of rate 0-10% with the increase of recall by 0-3% (as value). The increase of a recall is mentioned in the article.
2. Benchmark with WHERE was not used. The article discuss the dataset Recipes1M+, that needs the permission for usage, that is not suitable for open-source benchmarks. I think now, how to prepare standard datasets for benchmarks with WHERE based on the standard datasets from ANN-benchmarks (with equal, less, more conditions in WHERE clause). The benchmark with WHERE is relevant only for algorithms , that implement filtering. Algorithms without filtering will show very low recall. It is like 2 different generations, it is not fair to compare them.