-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
feat(community): MariaDB vector store implementation. #7360
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
Can i still help to get this PR merged ? about the vercel failure, i cannot have access to it. so i leave it to you to indicate what's wrong |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really sorry about the delay - let's move the core work you've done into community
for now and make it MariaDB specific
I think it is interesting but there are a lot of filters to generalize across
langchain-core/src/filter.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is interesting but too broadly scoped
Let's put it in a separate PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would like too, but i don't now how to makes mariadb implementation without this filter other leed to injection.
Maybe a version like Dictionnaly in python ( like filter={ 'id': {'$in': [1, 5, 2, 9]} } ). It doesn't seem appropriate too.
what is the solution ? makes a different PR for the filter part, and wait for it for now ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's just move it to langchain-community/utils/mariadb.ts
for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just to be sure we're on the same page: are you going to move this yourself in langchain-community/utils/mariadb.ts or should I move the filter part in mariadb.ts?
(i've add the missing requiresOptionalDependencies and rebased to current version) |
Sorry for the delay again, let's just move the core changes to community Generally speaking we don't allow core changes and community changes in the same PR, and are much more selective about what goes in core |
Description
This is the MariaDB vectorstore implementation. see https://mariadb.org/projects/mariadb-vector/
Key Features
Test
Filtering proposal
This PR contains a proposal to unify filtering data. I might have not understood stuctured query well, but goal of this framework is to permit unifying behavior and it doesn't feel this part has succeed in it.
I'll detail what i've submitted, i'll let you judge if accurate or not.
There is now a new package "@langchain/core/filter"
an example of database filter implementation:
A builder permit to create the filter, and vectorstore implementation will convert it to expected format :
(Ideally, a text parser using antlr to generate the expression from a standardized query would next the next step)
When requiring the corresponding SQL to a filter expression, each vector store needs to implement a filter implementation, extending BaseFilterExpressionConverter. This prevent SQL injection, unify behavior, and permit any kind of filtering, like IN, NOT, gouping ...
(a database filtering implementation must be probably maximum 20 significant lines of code, mainly because each database use his specific JSON functions)