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

Improve AnalyticDB Vector Store implementation without affecting user #6086

Merged
merged 1 commit into from
Jun 17, 2023

Conversation

wangxuqi
Copy link
Contributor

Hi there:

As I implement the AnalyticDB VectorStore use two table to store the document before. It seems just use one table is a better way. So this commit is try to improve AnalyticDB VectorStore implementation without affecting user behavior:

1. Streamline the post_init behavior by creating a single table with vector indexing.
2. Update the add_texts API for document insertion.
3. Optimize similarity_search_with_score_by_vector to retrieve results directly from the table.
4. Implement _similarity_search_with_relevance_scores.
5. Add embedding_dimension parameter to support different dimension embedding functions.

Users can continue using the API as before.
Test cases added before is enough to meet this commit.

@wangxuqi wangxuqi force-pushed the analyticdb_v2 branch 4 times, most recently from adeac0a to 2d3226f Compare June 14, 2023 14:19
… behavior:

1) Streamline the __post_init__ behavior by creating a single table with automatic indexing.
2) Update the add_texts API for document insertion.
3) Optimize similarity_search_with_score_by_vector to retrieve results directly from the table.
4) Implement _similarity_search_with_relevance_scores.
5) Add an embedding_dimension parameter to support different dimension embedding functions.
Users can continue using the API as before.
Copy link
Contributor

@hwchase17 hwchase17 left a comment

Choose a reason for hiding this comment

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

thanks!

@hwchase17 hwchase17 merged commit 444ca3f into langchain-ai:master Jun 17, 2023
This was referenced Jun 25, 2023
bradcrossen added a commit to bradcrossen/langchain that referenced this pull request Jun 29, 2023
Support for SQLAlchemy 1.3 was removed in version 0.0.203 by change langchain-ai#6086. Re-adding support.
rlancemartin added a commit that referenced this pull request Jun 29, 2023
Support for SQLAlchemy 1.3 was removed in version 0.0.203 by change
#6086. Re-adding support.

- Description: Imports SQLAlchemy Row at class creation time instead of
at init to support SQLAlchemy <1.4. This is the only breaking change and
was introduced in version 0.0.203 #6086.
  
A similar change was merged before:
#4647
  
  - Dependencies: Reduces SQLAlchemy dependency to > 1.3
  - Tag maintainer: @rlancemartin, @eyurtsev, @hwchase17, @wangxuqi

---------

Co-authored-by: rlm <pexpresss31@gmail.com>
vowelparrot pushed a commit that referenced this pull request Jul 4, 2023
Support for SQLAlchemy 1.3 was removed in version 0.0.203 by change
#6086. Re-adding support.

- Description: Imports SQLAlchemy Row at class creation time instead of
at init to support SQLAlchemy <1.4. This is the only breaking change and
was introduced in version 0.0.203 #6086.
  
A similar change was merged before:
#4647
  
  - Dependencies: Reduces SQLAlchemy dependency to > 1.3
  - Tag maintainer: @rlancemartin, @eyurtsev, @hwchase17, @wangxuqi

---------

Co-authored-by: rlm <pexpresss31@gmail.com>
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

Successfully merging this pull request may close these issues.

2 participants