Skip to content

Support for the sparse embeddings #71

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
magaton opened this issue Jun 11, 2024 · 3 comments
Open

Support for the sparse embeddings #71

magaton opened this issue Jun 11, 2024 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@magaton
Copy link

magaton commented Jun 11, 2024

The latest pgvector version supports sparsevec.
However, langchain's PGVector supports only one embeddings column in langchain_pg_embedding table.
It would be great to have a sparse_embedding column and sparse_embedding field in PGVector.

I have considered the alternative and that is to have 2 PGVector stores, 1 for dense and 1 for sparse vectors. However there are 2 problems with that:

  • PGVector has hardcoded table names for collection and embeddings
  • I would like to leverage excellent langchain indexer with SQL manager.
@eyurtsev eyurtsev added help wanted Extra attention is needed enhancement New feature or request labels Jun 11, 2024
@gecBurton
Copy link

hi @magaton I would be interested in collaborating on this, I would also like some kind of full-text/dense feature #61

@Freezaa9
Copy link

Freezaa9 commented Oct 23, 2024

Hello, would be interested also.

But I think each vector DB should be separated.
So for a hybrid search it would be

And then rerank by using EnsembleRetriever (for example: https://python.langchain.com/docs/how_to/ensemble_retriever/ )

To achieve this we should also bump the pgvector python version: #82

This was referenced Apr 27, 2025
@gecBurton
Copy link

hi, I could really do with this feature. I have made a very crude PR that suggests how this might be done, I would appreciate some help as I do not know this codebase well :) #204

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants