langchain icon indicating copy to clipboard operation
langchain copied to clipboard

Add upserting capability to PGVector

Open angelol opened this issue 1 year ago • 1 comments

Currently, the PGVector vectorstore only supports adding embeddings to the store. This PR adds upserting capability to the store, so you can update existing embeddings if the underlying text have changed. This is useful if you have indexed a set of documents but some of the documents are being changed and you want to keep the index up-to-date.

To use this feature, simply provided ids for all texts/or documents. The pgvector notebook has been updated accordingly.

The lack of upserting capability has been mention in issue #6866.

👀 @rlancemartin, @eyurtsev

In case you want to announce on Twitter, my Twitter handle is @angelol

angelol avatar Jul 07 '23 09:07 angelol

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchain ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 13, 2023 9:53am

vercel[bot] avatar Jul 07 '23 09:07 vercel[bot]

@angelol Hi , could you, please, resolve the merging issues? After that ping me and I push this PR for the review. Thanks!

leo-gan avatar Sep 18 '23 23:09 leo-gan

Closing because the PR wouldn't line up with the current directory structure of the library (would need to be in /libs/langchain/langchain instead of /langchain). Feel free to reopen against the current head if it's still relevant!

efriis avatar Nov 07 '23 03:11 efriis