Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: