What Makes Large Language Models Reason in (Multi-Turn) Code Generation?

Kunhao Zheng, Juliette Decugis, Jonas Gehring, Taco Cohen, Benjamin Négrevergne +1 more
2/12/2026

No confident code implementation found for this paper. 7 possible matches can be shown below.

Abstract

Prompting techniques such as chain-of-thought have established themselves as a popular vehicle for improving the outputs of large language models (LLMs). For code generation, however, their exact mechanics and efficacy are under-explored. We thus investigate the effects of a wide range of prompting strategies with a focus on automatic re-prompting over multiple turns and computational requirements. After systematically decomposing reasoning, instruction, and execution feedback prompts, we conduct an extensive grid search on the competitive programming benchmarks CodeContests and TACO for multiple LLM families and sizes (Llama 3.0 and 3.1, 8B, 70B, 405B, and GPT-4o). Our study reveals strategies that consistently improve performance across all models with small and large sampling budgets. We then show how finetuning with such an optimal configuration allows models to internalize the induced reasoning process and obtain improvements in performance and scalability for multi-turn code generation.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 7 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{zheng2026what,
  title  = {What Makes Large Language Models Reason in (Multi-Turn) Code Generation?},
  author = {Kunhao Zheng and Juliette Decugis and Jonas Gehring and Taco Cohen and Benjamin Négrevergne and Gabriele Synnaeve},
  year   = {2026},
  eprint = {2410.08105},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2410.08105},
  journal = {ICLR 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2410.08105.svg)](https://codeofpaper.com/paper/2410.08105)

Discussion