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

docs: Sample to use AlloyDB interface for vector search in PGVector database #204

Closed
wants to merge 14 commits into from

Conversation

twishabansal
Copy link
Contributor

This code samples shows users how to use AlloyDB interface for vector search in any DB created using the PGVector interface.

This would allow you to migrate from using PGVector to AlloyDB Vector Store search methods.

@twishabansal twishabansal requested review from a team as code owners August 20, 2024 04:29
@product-auto-label product-auto-label bot added the api: alloydb Issues related to the googleapis/langchain-google-alloydb-pg-python API. label Aug 20, 2024
samples/pg_to_alloy_migration_search.ipynb Outdated Show resolved Hide resolved
samples/pg_to_alloy_migration_search.ipynb Outdated Show resolved Hide resolved
samples/pg_to_alloy_migration_search.ipynb Outdated Show resolved Hide resolved
samples/pg_to_alloy_migration_search.ipynb Show resolved Hide resolved
samples/pg_to_alloy_migration_search.ipynb Outdated Show resolved Hide resolved
samples/pg_to_alloy_migration_search.ipynb Outdated Show resolved Hide resolved
samples/pg_to_alloy_migration_search.ipynb Outdated Show resolved Hide resolved
samples/pg_to_alloy_migration_search.ipynb Show resolved Hide resolved
samples/pg_to_alloy_migration_search.ipynb Show resolved Hide resolved
" \"cats\", k=5, filter=f\"collection_id='{uuid}' and cmetadata->>'topic' = 'animals'\"\n",
")"
]
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to also provide guidance on migrate collections to new tables? This would reduce the need to add a filter on each similarity search. If so can you give more background on why we think they should migrate there tables to individual tables. We will also need to show the users how to create a new table, load the old data and add the documents.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a Colab Notebook with code that users can reference to migrate to the new tables. The notebook contains several code blocks and SQL commands for data migration.

However, we're also currently developing a migration method within our engine class. It might be better to wait for this implementation and then provide users with a concise code snippet to facilitate their migration process.

What do you think?

@averikitsch
Copy link
Collaborator

@twishabansal This PR can be close in favor of #249 , correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: alloydb Issues related to the googleapis/langchain-google-alloydb-pg-python API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants