Earlier quoted context omitted.
Going to paste together snippets from comments on this thread. This bit is from the paper. > Typical programming languages have invariances and equivariances in their semantics that human programmers intuitively understand and exploit, such as the (near) invariance to the renaming of identifiers. This is bullshit lol. Identifier renaming may be a no-op for the code, or even for the compiler/interpreter, but it's abso…
@TeMPOraL and @og_kalu are the same people right?
Large language models do not recognize identifier swaps in Python
71–80 of 103 posts
Re: Large language models do not recognize identifier swaps in Python
#72Earlier quoted context omitted.
Yup. The whole premise of this test is idiotic. When you give a piece of code to an LLM, it doesn't magically switch into "code focused mode". They write: > Typical programming languages have invariances and equivariances in their semantics that human programmers intuitively understand and exploit, such as the (near) invariance to the renaming of identifiers. But this is bullshit . Identifier renaming may be a no-op…
To be clear, did you have any trouble figuring out the correct answer in the motivating example in the article's introduction? I'm asking because sure, a human programmer might well get tripped up by a name swap if they had missed the swap, or forgot it, but when presented with a short test of three lines like the one in the article's motivating example, the majority of human programmers would pass the test easily. T…
Re: Large language models do not recognize identifier swaps in Python
#73It’s like saying “cars can’t run off gasoline” but their testing methodology is based around a Tesla.
Re: Large language models do not recognize identifier swaps in Python
#74My pet peeve is when articles say “LLMs can’t do X” but they really mean “OpenAI’s Chat GPT”. It’s like saying “cars can’t run off gasoline” but their testing methodology is based around a Tesla.
Re: Large language models do not recognize identifier swaps in Python
#75Earlier quoted context omitted.
I think the issue is just that, however silly or pointless the puzzle is, it's clearly understandable by any human who knows Python. You just use "len" any time you mean "print", and "print" any time you mean "len". And these large language models, despite being language models, simply cannot handle this concept.
Going to paste together snippets from comments on this thread. This bit is from the paper. > Typical programming languages have invariances and equivariances in their semantics that human programmers intuitively understand and exploit, such as the (near) invariance to the renaming of identifiers. This is bullshit lol. Identifier renaming may be a no-op for the code, or even for the compiler/interpreter, but it's abso…
I would simply write the code I intend to write, then execute three replace operations in vim: %s/len/temporary/g, %s/print/len/g, %s/temporary/print/g.
It's not tripping me up at all. Maybe I don't think the same way that these models do?
Re: Large language models do not recognize identifier swaps in Python
#76Earlier quoted context omitted.
Going to paste together snippets from comments on this thread. This bit is from the paper. > Typical programming languages have invariances and equivariances in their semantics that human programmers intuitively understand and exploit, such as the (near) invariance to the renaming of identifiers. This is bullshit lol. Identifier renaming may be a no-op for the code, or even for the compiler/interpreter, but it's abso…
@TeMPOraL and @og_kalu are the same people right?
Re: Large language models do not recognize identifier swaps in Python
#77My pet peeve is when articles say “LLMs can’t do X” but they really mean “OpenAI’s Chat GPT”. It’s like saying “cars can’t run off gasoline” but their testing methodology is based around a Tesla.
the whole "prompt science" is utter ridiculous to begin with because you can't even isolate what your testing. not to mention you're graduating with a paper on the 2000 equivalent of "how to find mp3s on Google" lol.
Re: Large language models do not recognize identifier swaps in Python
#78My pet peeve is when articles say “LLMs can’t do X” but they really mean “OpenAI’s Chat GPT”. It’s like saying “cars can’t run off gasoline” but their testing methodology is based around a Tesla.
Except right now, GPT-4 is the best LLM in terms od performance/capabilities, by a large degree; every other one is strictly inferior, and they all share the same architecture and training methodology. So it's like comparing cars from 10 years ago against a top-of-the-line Toyota from 10 years ago and top-of-the line Toyota from today (or BMW, or whoever does quality cars; I'm not a car person).
Re: Large language models do not recognize identifier swaps in Python
#79 def print_len(x):
"""Print the length of x"""
original_print = __builtins__.print
original_len = __builtins__.len
__builtins__.print = original_len
__builtins__.len = original_print
print(len(x))
__builtins__.print = original_print
__builtins__.len = original_len
However, trying to run this function caused my Python to crash (as in, my interpreter crashed entirely), for reasons I don't understand.One other funny thing is that ChatGPT lectured me about how swapping `print` and `len` is bad programming practice:
> Please note that modifying built-in function names like this is generally not recommended, as it can lead to confusion and unexpected behavior in your code. It's advisable to use different variable names to avoid such issues.
Quite right, ChatGPT.
Re: Large language models do not recognize identifier swaps in Python
#80https://chat.openai.com/share/06cd9838-a46f-4477-a8c8-95f324...