Resolve: VectorSearch enabled SQLChain? #10177
Merged
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
SQLDatabseChainfromVectorSQLDatabseChainand 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.NullTypecolumnsSQLDatabaseChainto enable Vector SQL capability and further moreSQLDatabaseChainto retrieve data from the database for RetrievalQAChains and many othersSQLDatabaseChainto retrieve data in python native formatSQLDatabaseChainandSQLDatabaseChainRetrieverTwitter handle:
Tag Maintainer:
Prompts / General: @hwchase17, @baskaryan
DataLoaders / VectorStores / Retrievers: @rlancemartin, @eyurtsev
Dependencies:
No dependency added