pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
From: ankane (@ankane) <noreply+ankane@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #640: Late interaction embedding support
Date: Mon, 12 Aug 2024 22:30:12 +0000
Message-ID: <gh-pgvector-pgvector-640-c2285010134@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-640@github.com>
References: <gh-pgvector-pgvector-640@github.com>

Hi @az-arteria, with Psycopg, you'll need to pass a list of NumPy arrays for the `vector[]` type.

```python
embeddings = [np.array([1, 2, 3]), np.array([4, 5, 6])]
conn.execute('INSERT INTO documents (embedding) VALUES (%s)', (embeddings,))
```

For searching, you could write a SQL function to compute MaxSim.

view thread (20+ messages)  latest in thread

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