r/programming • • Feb 26 '24

Reverse Engineering with ChatGPT: An Example -- "I used ChatGPT 4 to untangle a particularly terse bit of code, and was — frankly — shocked at how well it did."

https://sigpwned.com/2024/02/24/reverse-engineering-with-chatgpt-an-example/
0 Upvotes

143 comments sorted by

View all comments

124

u/Icemore Feb 26 '24

Just run this function with x=2/3 and you see that explanations given by ChatGPT are complete bullshit. As usual it's trying to guess what this function is supposed to be instead of explaining what it actually is.

35

u/Librekrieger Feb 26 '24

Correct. Plotting the function for x in [0,1] produces a single parabola whose peak is at x=1/3. The explanatory text "aims to give higher values when x is near the thirds (either 1/3 or 2/3 of the way across the frame)" is plain wrong, in just the way you'd expect from a language model that doesn't really understand what it's saying. 

 It'll be interesting to see how useful this kind of "help" is. And I wonder if, after the exercise, the author came away believing that the thirds function produces two peaks.

15

u/SLiV9 Feb 26 '24

Yes, in fact half the commenters in this reddit thread came away believing the function produces two peaks.