Large Language Models (LLMs) are widely adopted for assisting in software development tasks, yet their performance evaluations have narrowly focused on the functional correctness of generated code. Human programmers, however, require LLM-generated code to be not only correct but also optimally efficient. We propose PerfCodeGen, a training-free framework that enhances the performance of LLM-generated code by incorporating feedback based on runtime during test case execution into the self-refinement iterations. With PerfCodeGen, we achieve speedups for a significantly higher proportion of problems compared to using the base LLM with sophisticated prompting techniques. Applied to open language models like Phi-3-mini, PerfCodeGen achieves runtime efficiency comparable to prompting powerful closed models like GPT-4. We achieve state-of-the-art runtime efficiency on benchmarks such as HumanEval, MBPP, and APPS, frequently surpassing the ground truth reference solutions with PerfCodeGen using GPT-3.5 and GPT-4. Additionally, we demonstrate the effectiveness of our approach in enhancing code quality across a range of open LLMs of varying sizes including Phi-3-mini, Llama 3 8B, Mixtral 8x7B, Command R, and Llama 3 70B.
Making Language Models Better Tool Learners with Execution Feedback
College of Computer Science and Technology, Zhejiang University(浙江大学计算机科学与技术学院);ZJU-Ant Group Joint Research Center for Knowledge Graphs, Zhejiang University(浙江大学-蚂蚁集团知识图谱联合研究中心);ZJU-Hangzhou Global Scientific and Technological Innovation Center, Zhejiang University(浙江大学杭州国际科技创新中心);Alibaba Group(阿里巴巴集团)
OpenCodeInterpreter: Integrating Code Generation with Execution and Refinement
Multimodal Art Projection Research Community(多模态艺术投影研究共同体);University of Waterloo(滑铁卢大学);Allen Institute for Artificial Intelligence(艾伦人工智能研究所);HKUST(香港科技大学);IN.AI Research(IN.AI研究机构)
SciWalker: Synthesizing Scientific Coding Problems with Operator Graphs and Execution Feedback
The Hong Kong University of Science and Technology(香港科技大学);Shanghai AI Laboratory(上海人工智能实验室);Tsinghua University(清华大学);Nanyang Technological University(南洋理工大学)
A Multi-agent Text2SQL Framework using Small Language Models and Execution Feedback
Griffith University (Australia)(格里菲斯大学);VinUniversity (Vietnam)(文大学);Humboldt-Universitat zu Berlin (Germany)(柏林洪堡大学);The University of Queensland, Australia (2025)(昆士兰大学)
ReEx-SQL: Reasoning with Execution-Aware Reinforcement Learning for Text-to-SQL
Soochow University(苏州大学);Guangdong Laboratory of Artificial Intelligence and Digital Economy (SZ)(广东省人工智能与数字经济发展实验室);South China University of Technology(华南理工大学);University of Chinese Academy of Sciences(中国科学院大学);Alibaba DAMO Academy(阿里巴巴达摩院);International Digital Economy Academy (IDEA), China(国际数字经济学院(IDEA),中国)
Write, Execute, Refine: From Skill Follower to Skill Optimizer via Reinforcement Learning from Execution Feedback
Harbin Institute of Technology, Shenzhen(哈尔滨工业大学(深圳));The Chinese University of Hong Kong(香港中文大学);Huawei Technologies Co., Ltd.(华为技术有限公司);Harbin Institute of Technology(哈尔滨工业大学)
ToolSafe: Enhancing Tool Invocation Safety of LLM-based agents via Proactive Step-level Guardrail and Feedback
National Engineering Research Center for Software Engineering, Peking University(软件工程国家工程研究中心,北京大学);Shanghai Artificial Intelligence Laboratory(上海人工智能实验室)
School of Artificial Intelligence, Jilin University(吉林大学人工智能学院);School of Artificial Intelligence, Shanghai Jiao Tong University(上海交通大学人工智能学院);King Abdullah University of Science and Technology(阿卜杜拉国王科技大学)
MemScope: Evolving Agent Memory Architectures through Localized Code Repair
State Key Laboratory of AI Safety(人工智能安全国家重点实验室);Institute of Computing Technology, Chinese Academy of Sciences(中国科学院计算技术研究所);University of Chinese Academy of Sciences(中国科学院大学);Meituan(美团)
Multi-LLM Orchestration for High-Quality Code Generation: Exploiting Complementary Model Strengths
Chinese Academy of Science(中国科学院);University of Arizona(亚利桑那大学);Wuhan University(武汉大学);East Carolina University(东卡罗来纳大学);University of Georgia(佐治亚大学);University of Waterloo(滑铁卢大学)
AgentForge: Execution-Grounded Multi-Agent LLM Framework for Autonomous Software Engineering
International Research Center for Complexity Sciences(复杂科学国际研究中心);Hangzhou International Innovation Institute(杭州国际创新研究院);Beihang University(北京航空航天大学);College of Science, Mathematics and Technology(科学、数学与技术学院);Wenzhou-Kean University(温州-凯恩大学);Fakulti Teknologi Maklumat dan Komunikasi(信息技术与通信学院);Universiti Teknikal Malaysia Melaka(马来西亚Melaka理工大学);Computer Systems Engineering Department(计算机系统工程系);Sukkur IBA University(苏库尔IBA大学);University of Electronic Science and Technology of China(电子科学与技术大学)