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

Hi, thanks for the reply

So if I'm understanding correctly I should be able to do something like this?
```python
conn.execute("CREATE TABLE documents (id bigserial PRIMARY KEY, content text, embedding vector[])")
conn.execute("INSERT INTO documents (content, embedding) VALUES (%s, %s)", ("example content", [[0.08865993, 0.16410036], [0.0221169, 0.1254668]]))
```
I'm still getting `ValueError: expected ndim to be 1` from this block of code, so I'm assuming syntax-wise maybe I'm doing something wrong here.

As for how to use / search, I see that some vector databases like [here](https://qdrant.tech/documentation/concepts/vectors/#multivectors) support multiple vectors for a single text, and have a function for computing similarity score for two separate lists of vectors (shown in url). This is particularly useful for models like colbert, which output multiple vectors for one piece of text.

Do you know if this sort of functionality is supported by PGVector as well?


view thread (20+ messages)  latest in thread

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