pg.ddx.io pgvector/pgvector GitHub issues and pull requestshelp / color / mirror / Atom feed
[pgvector/pgvector] issue #923: Bad recall with HNSW vector_ip_ops 3+ messages / 2 participants [nested] [flat]
* [pgvector/pgvector] issue #923: Bad recall with HNSW vector_ip_ops @ 2025-11-10 08:56 "vrana (@vrana)" <noreply+vrana@github.com> 0 siblings, 0 replies; 3+ messages in thread From: vrana (@vrana) @ 2025-11-10 08:56 UTC (permalink / raw) To: pgvector/pgvector <noreply+pgvector-pgvector@github.com> PostgreSQL: 17.6 I have this index created on a populated table: ```sql CREATE INDEX film_rating_vectors_vector_ip_idx ON film_rating_vectors USING hnsw (vector vector_ip_ops); ``` I have this query: ```sql ORDER BY film_rating_vectors.vector <#> (SELECT vector FROM user_rating_vectors WHERE user_id = 16265) ``` Without the index, my query returns ~13k rows. With the index, it returns 4 rows (not 4k, really only 4). Sometimes, when I drop the index and recreate it then the problem is fixed. But sometimes it's not. Different machines behave differently even though they run in the same VM environment. I didn't change the parameters like `hnsw.ef_search`. I know that the index reduces recall but 13k -> 4 seems too much. Please suggest how to debug this. ^ permalink raw [nested|flat] 3+ messages in thread
* Re: [pgvector/pgvector] issue #923: Bad recall with HNSW vector_ip_ops @ 2025-11-10 09:32 ` "ankane (@ankane)" <noreply+ankane@github.com> 1 sibling, 0 replies; 3+ messages in thread From: ankane (@ankane) @ 2025-11-10 09:32 UTC (permalink / raw) To: pgvector/pgvector <noreply+pgvector-pgvector@github.com> Hi @vrana, check out the [troubleshooting docs](https://github.com/pgvector/pgvector?tab=readme-ov-file#why-are-there-less-results-for-a-query-after...). ^ permalink raw [nested|flat] 3+ messages in thread
* Re: [pgvector/pgvector] issue #923: Bad recall with HNSW vector_ip_ops @ 2025-11-10 09:32 ` "ankane (@ankane)" <noreply+ankane@github.com> 1 sibling, 0 replies; 3+ messages in thread From: ankane (@ankane) @ 2025-11-10 09:32 UTC (permalink / raw) To: pgvector/pgvector <noreply+pgvector-pgvector@github.com> @ankane closed this. ^ permalink raw [nested|flat] 3+ messages in thread
end of thread, other threads:[~2025-11-10 09:32 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2025-11-10 08:56 [pgvector/pgvector] issue #923: Bad recall with HNSW vector_ip_ops "vrana (@vrana)" <noreply+vrana@github.com> 2025-11-10 09:32 ` "ankane (@ankane)" <noreply+ankane@github.com> 2025-11-10 09:32 ` "ankane (@ankane)" <noreply+ankane@github.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox