-
Notifications
You must be signed in to change notification settings - Fork 15.9k
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
Resolve: VectorSearch enabled SQLChain? #10177
Merged
baskaryan
merged 2 commits into
langchain-ai:bagatur/myscale_vector_sql
from
myscale:myscale/vector_sql_retriever
Sep 7, 2023
Merged
Resolve: VectorSearch enabled SQLChain? #10177
baskaryan
merged 2 commits into
langchain-ai:bagatur/myscale_vector_sql
from
myscale:myscale/vector_sql_retriever
Sep 7, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
dosubot
bot
added
Ɑ: vector store
Related to vector store module
🤖:enhancement
A large net-new component, integration, or chain. Use sparingly. The largest features
labels
Sep 4, 2023
baskaryan
reviewed
Sep 4, 2023
one comment about dependencies, otherwise looks pretty good to me! |
rsharath
pushed a commit
to getjavelin/langchain
that referenced
this pull request
Sep 8, 2023
Squashed from langchain-ai#7454 with updated features We have separated the `SQLDatabseChain` from `VectorSQLDatabseChain` and put everything into `experimental/`. Below is the original PR message from langchain-ai#7454. ------- We have been working on features to fill up the gap among SQL, vector search and LLM applications. Some inspiring works like self-query retrievers for VectorStores (for example [Weaviate](https://python.langchain.com/en/latest/modules/indexes/retrievers/examples/weaviate_self_query.html) and [others](https://python.langchain.com/en/latest/modules/indexes/retrievers/examples/self_query.html)) really turn those vector search databases into a powerful knowledge base! 🚀🚀 We are thinking if we can merge all in one, like SQL and vector search and LLMChains, making this SQL vector database memory as the only source of your data. Here are some benefits we can think of for now, maybe you have more 👀: With ALL data you have: since you store all your pasta in the database, you don't need to worry about the foreign keys or links between names from other data source. Flexible data structure: Even if you have changed your schema, for example added a table, the LLM will know how to JOIN those tables and use those as filters. SQL compatibility: We found that vector databases that supports SQL in the marketplace have similar interfaces, which means you can change your backend with no pain, just change the name of the distance function in your DB solution and you are ready to go! ### Issue resolved: - [Feature Proposal: VectorSearch enabled SQLChain?](langchain-ai#5122) ### Change made in this PR: - An improved schema handling that ignore `types.NullType` columns - A SQL output Parser interface in `SQLDatabaseChain` to enable Vector SQL capability and further more - A Retriever based on `SQLDatabaseChain` to retrieve data from the database for RetrievalQAChains and many others - Allow `SQLDatabaseChain` to retrieve data in python native format - Includes PR langchain-ai#6737 - Vector SQL Output Parser for `SQLDatabaseChain` and `SQLDatabaseChainRetriever` - Prompts that can implement text to VectorSQL - Corresponding unit-tests and notebook ### Twitter handle: - @MyScaleDB ### Tag Maintainer: Prompts / General: @hwchase17, @baskaryan DataLoaders / VectorStores / Retrievers: @rlancemartin, @eyurtsev ### Dependencies: No dependency added
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
🤖:enhancement
A large net-new component, integration, or chain. Use sparingly. The largest features
Ɑ: vector store
Related to vector store module
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Squashed from #7454 with updated features
We have separated the
SQLDatabseChain
fromVectorSQLDatabseChain
and put everything intoexperimental/
.Below is the original PR message from #7454.
Hello from MyScale AI team! 😊👋
We have been working on features to fill up the gap among SQL, vector search and LLM applications. Some inspiring works like self-query retrievers for VectorStores (for example Weaviate and others) really turn those vector search databases into a powerful knowledge base! 🚀🚀
We are thinking if we can merge all in one, like SQL and vector search and LLMChains, making this SQL vector database memory as the only source of your data. Here are some benefits we can think of for now, maybe you have more 👀:
With ALL data you have: since you store all your pasta in the database, you don't need to worry about the foreign keys or links between names from other data source.
Flexible data structure: Even if you have changed your schema, for example added a table, the LLM will know how to JOIN those tables and use those as filters.
SQL compatibility: We found that vector databases that supports SQL in the marketplace have similar interfaces, which means you can change your backend with no pain, just change the name of the distance function in your DB solution and you are ready to go!
Issue resolved:
Change made in this PR:
types.NullType
columnsSQLDatabaseChain
to enable Vector SQL capability and further moreSQLDatabaseChain
to retrieve data from the database for RetrievalQAChains and many othersSQLDatabaseChain
to retrieve data in python native formatSQLDatabaseChain
andSQLDatabaseChainRetriever
Twitter handle:
Tag Maintainer:
Prompts / General: @hwchase17, @baskaryan
DataLoaders / VectorStores / Retrievers: @rlancemartin, @eyurtsev
Dependencies:
No dependency added