Hacker News new | ask | show | jobs
by senko 359 days ago
> 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.

3 comments

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:
That’s not what he’s saying there. There’s a separate tool that adds line numbers before feeding the prompt into the LLM. It’s not the LLM doing it itself.
The separate tool is called the agent.
My understanding is that an agent is comprised of many tools that provide a harness for the LLM.
I just learnt the `nl -ba` trick from Codex. Claude Code is most likely doing the same.
In Aider, I would add a comment `fix this ai!` and Aider adds the context and updates the code. Wish it were more seamless though.
> It's just a (rather big) equation.

So are you.