Skip to content
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