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

Myscale/improve string pattern match #6737

Closed
4 changes: 2 additions & 2 deletions langchain/chains/query_constructor/ir.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ class Comparator(str, Enum):
GTE = "gte"
LT = "lt"
LTE = "lte"
CONTAIN = "contain"
LIKE = "like"
CONTAIN = "list_contain"
LIKE = "string_pattern_like"
Copy link
Contributor

Choose a reason for hiding this comment

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

this name still feels ambiguous to me, what is the LIKE comparison doing again? is it a regex match?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it is just doing something like column LIKE '%pattern%'.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Personally I think this function should be bounded with datatypes. Unfortunately I didn't find any place to insert the allowed datatypes with those functions. Do you have better idea?

We also explored some new ways to implement self-query retriever with openai's function call. We found pretrained LLMs are good SQL translator so it is probably a good new to SQL based vector databases.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry I probably misunderstand the issue. Do you mean the LIKE is ambiguous? Perhaps SUBSTRING_MATCH would be a better fit?



class FilterDirective(Expr, ABC):
Expand Down