4 ms·
LLM-based regex generation is probably my absolute favorite thing. I give it a bunch of examples and say "create a regex of that" Does it hallucinate? Probably
by yawnxyz 3y ago
LLM-based regex generation is probably my absolute favorite thing. I give it a bunch of examples and say "create a regex of that"
Does it hallucinate? Probably! Do I "hallucinate" while trying to clobber together terrible regexes? Absolutely
- klysm 3y agoThis is what makes me nervous. Is it not bad to be generating stuff you don’t understand that _might_ work?
- throwuwu 3y agoMost of the complex regexes I write fall into the category of stuff I don’t understand that might work. I’m no slouch at regexes either but when you start trying to do weird data processing stuff that handles all kinds of edge cases the wheels really come off quick.
- SrslyJosh 3y ago...and that's where you stop using regexes exclusively and start using better parsing techniques.
- klysm 3y agoIf you write it you at least partially understand it. I don’t buy it
- throwuwu 3y agoIf gpt writes it and I don’t understand some parts I just paste it into a regex testing site and examine the groups and try it out with different snippets of text. Is that so hard? Is it any different from using something you found on SO?
- misja111 3y agoI try to avoid using regexes for exactly that reason.