Skip to content
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

delete_collection() Does Not Remove Records from upsertion_record Table #131

Open
ElderBarbosaLima opened this issue Oct 23, 2024 · 0 comments

Comments

@ElderBarbosaLima
Copy link

Problem Description:
When attempting to delete a collection using the delete_collection() method, the records in the upsertion_record table are not deleted. This causes an issue when trying to re-populate the collection with the same name. Upon embedding the new content, LangChain skips these records because they still exist in the upsertion_record table.

Steps to Reproduce:
Create a collection and embed content.
Use the delete_collection() method to delete the collection.
Recreate a collection with the same name and try embedding new content.
Observe that LangChain skips embedding records due to existing entries in upsertion_record.
Expected Behavior:
The delete_collection() method should remove all associated records, including entries in the upsertion_record table, allowing new content to be embedded without being skipped.

Actual Behavior:
The collection is deleted, but records in the upsertion_record table remain, preventing new content from being embedded.

Environment:
libs versions: langchain==0.3.1 langchain-openai==0.2.1 langchain-community==0.3.1 langchain-text-splitters==0.3.0 pgvector==0.2.5 tiktoken==0.7.0 certifi==2023.11.17 semchunk==2.2.0 openpyxl==3.1.5 PyPDF2==3.0.1 transformers==4.43.3 PyMuPDF==1.24.10 uvicorn==0.31.0 fastapi==0.115.0 executing==2.1.0 pyyaml==6.0.2 boto3==1.35.36 langchain_postgres==0.0.12 psycopg2-binary==2.9.9 psycopg-binary==3.2.3 psycopg-pool==3.2.3 bs4==0.0.2

Database: Postgres with an extension vector
Possible Solution:
Ensure that the delete_collection() method properly deletes all records from both the collection and associated metadata tables such as upsertion_record.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant