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.