GTP-4 The math and basic programming genius

I am paying for GPT-4 and asked it to create me a regular expression that matches exactly 4 digits in a text followed by a hyphen with the possibility of there being spaces around the hyphen.

Yes, you guessed it - I only needed a simple regex to match year ranged like 2021-2023.

GPT-4 just not only couldn’t find a working solution, it also provided me with over 30 incorrect regular expression “solutions” (I am not exaggerated here) by only try its solution when I told it that it didn’t work.

First it matched numbers that were longer than 4 digits, a clear logical error on its part. It never checked the solution it provided if it was actually working on a sample text I also provided. I always had to manually tell it that it’s solution doesn’t work.

After about 10 incorrect solutions provided (“Oh I see that the regular expression doesn’t conform to the requirements. Let me try again” - doh!), it was finally able to come up with a regex that matched exactly 4 digits, no more and no less which is actually ridiculously easy to do but GPT-4 was bound on using word boundaries which of course won’t work and never consider any of the many other ways to accomplish this.

After it finally seemed to come up with a working solution, already knowning its limited grasp on a whole problem and instead focusing on a solution for a detail, I asked it “What if the text starts with a 4 digit number?” which I of course immediately saw that the regex was not checking for.

Same thing happened again and after providing about 10 incorrect solutions which I had to point out individually that they all didn’t work, it finally was able to come up with a working regex matching a number with exactly 4 digits.

Wow! Bravo and well done I guess. It took about 45 minutes for this. My 14 year old nephew could have solved the problem in a few minutes.

Without burdening you with the rest of the incorrect solutions it came up with to “solve” this most basic regex “problem” and 15 minutes later with no correct solution in sight, I just told it to stop since it was utterly useless to proceed.

The same thing happened with a simple mathematical equation involving 3 numbers and 1 unknown x. You would think GPT-4 would be able to provide an answer in a snap. 30 minutes of being given incorrect values for x, I finally told it to stop this embarrassment and gave it the correct value of x. After which it calculated the equation out and confirmed that my result was correct while also apologizing that it should have been able to solve this simple equation for 1st graders, yet insisting that it was still capable of solving mathematical equations. What a joke!

I have plenty of more examples of GPT-4 ridiculously low level of being capable of solving the simplest of problems.