←back to thread

358 points andrewstetsenko | 1 comments | | HN request time: 0.237s | source
Show context
taysix ◴[] No.44360808[source]
I had a fun result the other day from Claude. I opened a script in Zed and asked it to "fix the error on line 71". Claude happily went and fixed the error on line 91....

1. There was no error on line 91, it did some inconsequential formatting on that line 2. More importantly, it just ignored the very specific line I told it to go to. It's like I was playing telephone with the LLM which felt so strange with text-based communication.

This was me trying to get better at using the LLM while coding and seeing if I could "one-shot" some very simple things. Of course me doing this _very_ tiny fix myself would have been faster. Just felt weird and reinforces this idea that the LLM isn't actually thinking at all.

replies(4): >>44360819 #>>44360879 #>>44360917 #>>44363593 #
senko ◴[] No.44360879[source]
> This was me trying to get better at using the LLM while coding

And now you've learned that LLMs can't count lines. Next time, try asking it to "fix the error in function XYZ" or copy/paste the line in question, and see if you get better results.

> reinforces this idea that the LLM isn't actually thinking at all.

Of course it's not thinking, how could it? It's just a (rather big) equation.

replies(3): >>44361118 #>>44363350 #>>44365992 #
throwdbaaway ◴[] No.44361118[source]
As shared by Simon in https://news.ycombinator.com/item?id=44176523, a better agent will prepend the line numbers as a workaround, e.g. Claude Code:

    54 def dicts_to_table_string(
    55     headings: List[str], dicts: List[Dict[str, str]]
    56 ) -> List[str]:
    57     max_lengths = [len(h) for h in headings]
    58 
    59     # Compute maximum length for each column
    60     for d in dicts:
replies(2): >>44361176 #>>44362579 #
1. throwdbaaway ◴[] No.44362579[source]
I just learnt the `nl -ba` trick from Codex. Claude Code is most likely doing the same.