pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
From: clemensvonmuu (@clemensvonmuu) <noreply+clemensvonmuu@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #762: Negative values for the square prevent vector calculations in pgvector/postgress
Date: Tue, 21 Jan 2025 14:34:33 +0000
Message-ID: <gh-pgvector-pgvector-762-c2604903728@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-762@github.com>
References: <gh-pgvector-pgvector-762@github.com>

> You can use the `vector_norm` function to make a comparison, though because it's floating point math, you'll want to check if the distance is within some epsilon, e.g.
> 
> SELECT id, vector_norm(vector) BETWEEN 0.99999 AND 1.00001 AS is_normalized

Hello: thank you very much! The problem is: the error I described above is only the smallest reproducible error, so to speak. I am building a RAG scenario and it is about vector similarity searches. They always go wrong because the similarities cannot be calculated. The reproducible reason is that this problem occurs with the negative squares. So I would not only need a small solution for the problem described. I would need to understand what the reason for the error is - and how to fix ist. It is said everywhere that Postgres/pgvector works perfectly. The question is: why not on my end?

Translated with DeepL.com (free version)

view thread (7+ messages)  latest in thread

Message-ID: <gh-pgvector-pgvector-762-c2604903728@github.com>
Permalink:  ../gh-pgvector-pgvector-762-c2604903728@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