From LLMs to Agents in Programming: The Impact of Providing an LLM with a Compiler
Viktor Kjellberg, Miroslaw Staron, Farnaz Fotrousi

TL;DR
This study demonstrates that providing large language models with a compiler significantly enhances their ability to generate correct, compilable code, transforming them into active agents capable of iterative development and error correction.
Contribution
The paper shows that integrating a compiler with LLMs improves code correctness and reduces errors, highlighting the importance of software tools in enhancing LLM capabilities.
Findings
Compiler access increased compilation success by up to 79.4%
Syntax errors reduced by 75%, undefined references by 87%
Smaller models with a compiler can outperform larger models without one
Abstract
Large Language Models have demonstrated a remarkable capability in natural language and program generation and software development. However, the source code generated by the LLMs does not always meet quality requirements and may fail to compile. Therefore, many studies evolve into agents that can reason about the problem before generating the source code for the solution. The goal of this paper is to study the degree to which such agents benefit from access to software development tools, in our case, a gcc compiler. We conduct a computational experiment on the RosettaCode dataset, on 699 programming tasks in C. We evaluate how the integration with a compiler shifts the role of the language model from a passive generator to an active agent capable of iteratively developing runnable programs based on feedback from the compiler. We evaluated 16 language models with sizes ranging from…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Natural Language Processing Techniques · Topic Modeling
