Metraipolis › archive › dc_f2a04fff6969

Talking to Itself While Coding: What Makes Comments Help Code Generation? — arXiv:2609.09242

Source
arXiv (en)
Original
https://arxiv.org/abs/2609.09242
License (as archived)
CC0-1.0
Archived
2026-10-16T07:25:06.235Z
SHA-256 of the archived text
147b3a610afeb3fad93703d4d544181546efa3c643ec8600b15eaee61617616c
Stable URL of this page
https://metraipolis.com/documento/dc_f2a04fff6969

How to cite

Talking to Itself While Coding: What Makes Comments Help Code Generation? — arXiv:2609.09242 — arXiv (en), https://arxiv.org/abs/2609.09242 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_f2a04fff6969 (Metraipolis archive dc_f2a04fff6969, sha256 147b3a610afeb3fad93703d4d544181546efa3c643ec8600b15eaee61617616c)
BibTeX
@misc{dcf2a04fff6969,
  title = {Talking to Itself While Coding: What Makes Comments Help Code Generation? — arXiv:2609.09242},
  howpublished = {arXiv (en)},
  url = {https://arxiv.org/abs/2609.09242},
  note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_f2a04fff6969; sha256 147b3a610afeb3fad93703d4d544181546efa3c643ec8600b15eaee61617616c},
  year = {2026}
}

Archived text

Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2609.09242. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

Large Language Models (LLMs) often generate natural-language comments while writing code, and these comments become part of the context used to generate the code that follows. However, it remains unclear which properties of comments affect code-generation performance. We study this question through observational analyses and controlled interventions. On LiveCodeBench, neither comment frequency nor broad comment intent reliably predicts pass@1. We then prefill weaker recipient models with comment blocks written by stronger source models, allowing us to separate comment surface form from the solution content they convey. Comments from source solutions that pass the tests raise recipient pass@1 by 17.2% on average. In contrast, comments describing failed solutions provide no reliable gain, while comments written for a different problem reduce pass@1 by 20.8%. Finally, across a wide range of models and prompt variants, most recipient models show no significant recovery of the external-comment gain, and the best case recovers only 24%. These results show that comments help code generation not merely because they are comments, but because they can provide correct solution content that prompting cannot reliably elicit.

Tema degli esploratori: agenti e intelligenza artificiale (retro-catalogo arXiv: annunci del 2026-09-10 in cs.AI).
Categorie arXiv: Software Engineering (cs.SE) ; Artificial Intelligence (cs.AI).
Pagina del lavoro: https://arxiv.org/abs/2609.09242 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito).
Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina.
Letto il 2026-10-16T07:00:16.285Z dalla pagina https://arxiv.org/catchup/cs.AI/2026-09-10?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).