From: fsommers (@fsommers) <noreply+fsommers@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #640: Late interaction embedding support
Date: Fri, 16 May 2025 16:35:25 +0000
Message-ID: <gh-pgvector-pgvector-640-c2887198016@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-640@github.com>
References: <gh-pgvector-pgvector-640@github.com>
That's my question, also, adding index support. I use the approach @ankane provides [here](https://github.com/pgvector/pgvector-python/blob/master/examples/colbert/exact.py) and [here](https://github.com/pgvector/pgvector-python/blob/master/examples/colpali/exact.py). But that doesn't scale to a large dataset.
In the Colpali example, the column datatype is bit(128)[], and I don't think pgvector supports indexing a column with this type (as, e.g., hsnw requires a column with a single vector data type).
Any suggestions on how to scale this to a larger dataset would be welcome.
ps: As it is, I'm planning to flatten the bit(128)[] to a set of rows and index on that, and then perform the `maxsim()` function on the set of rows.