6 ms·
> Regex.ai is an AI-powered tool that generates regular expressions. Or, just write regular expressions? > ... Regex.ai's intuitive interface makes it easy to
by AdieuToLogic 4y ago
> Regex.ai is an AI-powered tool that generates regular expressions.
Or, just write regular expressions?
> ... Regex.ai's intuitive interface makes it easy to input sample text and generate complex regular expressions quickly and efficiently.
See: https://www.ibm.com/topics/overfitting https://www.ibm.com/topics/overfitting
Inputting the sample text:
foo bar baz
baz bar foo
And highlighting the first "baz" produced patterns which all had "[A-Z][a-z]*@libertylabs\\.ai" included, assumedly due to the default inclusions.
Removing those and highlighting the second "baz" resulted "<Agent B>" as the results in one case.
There is no explanation of any patterns generated. If a person is to use one of the generated patterns and Regex.ai is supposed to "save you time and streamline your workflow", no matter "[w]hether you're a novice or an expert", then some form of verification and/or explanation must exist.
Otherwise, a person must know how to formulate regular expressions in order to determine which, if any, of the presented options are applicable. And if a person knows how to formulate regular expressions, then why would they use Regex.ai?
- qwertox 4y agoUsing your example and deselecting the email addresses I end up with these suggestions: \b(foo|bar|baz)\b \w(foo|bar|baz)\w \bbaz\b [fF][oO][oO]|[Bb][Aa][Rr]|[Bb][Aa][Zz] It only lacks a dice button which randomly selects the "correct" answer.
- 6510 4y agoThere are tools that somewhat explain what each part of a regex does.
- barbariangrunge 4y agoI’d you don’t understand regexes well enough to write them yourself, you should not get some ai to generate them for you. You won’t be able to verify whether they do what you want and the bugs can be subtle and destructive
- soiler 4y agoI read a few weeks ago here on HN about one large SAAS grinding to a halt because of a greedy selector in one line of regex. Not sure how people find old stories, it's lost to me now. But it was an excellent example of why regex is dangerous and requires a lot of care to write. I wouldn't trust an AI to write my regex unless I saw that people were finding it to be consistently better than they were are writing what they need.
- jameshart 4y agoYou gave it an example where inferring the semantics you were after was basically a crapshoot. It’s not going to do well under those conditions. Nor will a random human who lacks insight into what specifically you are after. Did you want all the bazzes that are at the end of lines? The bazzes that follow bars? Who knows? Try giving it examples where the data provides context cues.
- anileated 4y agoI often find it faster to write something from scratch rather than to work with someone else’s code to fix it. In the latter case I need to understand the intent, the whys behind the choices. Well guess what, LLM-generated code is someone else’s code: an amalgamation derived from many peoples’ code. Except those people are ‘helpfully’ “abstracted away” from you by the middleman, so you can’t know their original intents and choices. What’s worse, it’s someone else’s code that will be treated as your code—unlike working with a legacy system that everyone knows was written by some guy, in this case any bugs will be squarely on you.
- cyanydeez 4y agoLike autopilot in planes that fall back to experienced pilots, we're embarking on the most dangerous "uncanny valley" maneuver where these systems will be adopted by experienced pilots who know the limits but who will inevitably be followed by either no one or students whose conception is entirely synthetic. At that point the plane AI better be 100% TRUSTWORTHY cause there's no safe fallback.
- AdieuToLogic 4y agoThis offering, and the other half-dozen like it this past week or so, is like giving a kid a flamethrower. It's all fun and games until they burn down your house. > ... I need to understand the intent, the whys behind the choices. As do I. And that is something ChatGPT-X (for any given X) cannot provide, regardless of whether or not what is produced is correct. Perhaps with some form of backward chaining[0] a ChatGPT-X someday can explain how it arrived at what was produced works. But "the why" is the domain of people. 0 - https://en.wikipedia.org/wiki/Backward_chaining https://en.wikipedia.org/wiki/Backward_chaining
- circuit10 4y agoYou can ask it to explain why. It might not be a true representation of why those decisions were made but at least it’s a plausible explanation of why something could work like that which is better than nothing. I’m not sure why you think it can’t do that already?
- 4y ago
- regexLL 4y agoThanks for your feedback! Updated ver 1.1 coming soon with more descriptions and better performance :)
- AdieuToLogic 4y agoIf you have a choice between descriptions or performance, I humbly suggest detailed descriptions perhaps with links to tutorials and/or further reading. Who cares if the wrong thing is returned quickly if that means it lacks any context. Also, consider how to express anchoring and/or grouping preferences in the UI or weighting based on highlight positioning. These are oft used features of regex languages.