Assessing Code Generation with Intermediate Languages
On the map: LLM reasoning → Reasoning for agents, planning and code
Abstract (arXiv)
Intermediate step methodologies like chain of thoughts (COT) have demonstrated effectiveness in enhancing the performance of Large Language Models (LLMs) on code generation. This study explores the utilization of intermediate languages, including various programming languages, natural language solutions, and pseudo-code, and systematically evaluates their impact on the performance of LLMs in code generation tasks. Our experiments encompass eleven models across the CodeLlama, GPT, and Mistral families, as well as newly released smaller models. Our findings reveal that intermediate languages generally exhibit greater efficacy in larger models that have not yet achieved state-of-the-art performance. Natural language consistently emerges as the most effective intermediate representation across all target languages. However, we observe no universally effective intermediate formal language across different models and target languages. Furthermore, we uncover a weak correlation between the correctness of intermediate solutions and final generation, suggesting that improvements may stem from the chain-of-thought effect rather than language-specific transfer. Interestingly, we discover that for GPT family models, prompting multiple times without explicit self-correction instructions yields performance gains across the studied languages.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. First posted on arXiv 7 Jul 2024.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2026: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2025Understanding Chain-of-Thought Effectiveness in Code Generation: An Empirical and Information-Theoretic Analysis
- 2023Chain-of-Thought in Neural Code Generation: From and For Lightweight Language Models
- 2025Towards Advancing Code Generation with Large Language Models: A Research Roadmap
- 2025An Empirical Study of Reasoning Steps in Thinking Code LLMs
- 2023L2CEval: Evaluating Language-to-Code Generation Capabilities of Large Language Models
- 2025code_transformed: The Influence of Large Language Models on Code
- 2026Are you Synthesizing or Recalling? Evaluating LLMs on Algorithmic Code Retrieval
- 2024Comments as Natural Logic Pivots: Improve Code Generation via Comment Perspective