arXiv:2409.00985cs.SEcs.AI2024-09被引 12

用多智能体强化学习提升代码纠错准确率与效率

Co-Learning: Code Learning for Multi-Agent Reinforcement Collaborative Framework with Conversational Natural Language Interfaces

  • 构建多智能体框架,根据错误类型动态选择最优LLM进行纠错
  • 在702个错误代码上实现精确率提升3%,纠错时间减少15%
  • 适合编程教育与专业开发支持场景,可独立辅助初学者

基于大语言模型的在线问答系统正从娱乐性应用转向专业用途。本文提出一种结合环境强化学习(E-RL)的多智能体代码学习(Co-Learning)框架,帮助初学者自主纠正代码错误。该框架基于包含702个错误代码的原始数据集,利用LLM性能作为奖励或惩罚机制;通过当前智能体分析输入错误代码,并选择最合适的基于LLM的智能体,以实现最佳纠错准确率并缩短修正时间。实验结果显示,相较于无E-RL的方法,精确率提升3%,时间成本降低15%。源代码已开源:https://github.com/yuqian2003/Co_Learning。

原文摘要 · Abstract (English)

Online question-and-answer (Q\&A) systems based on the Large Language Model (LLM) have progressively diverged from recreational to professional use. This paper proposed a Multi-Agent framework with environmentally reinforcement learning (E-RL) for code correction called Code Learning (Co-Learning) community, assisting beginners to correct code errors independently. It evaluates the performance of multiple LLMs from an original dataset with 702 error codes, uses it as a reward or punishment criterion for E-RL; Analyzes input error codes by the current agent; selects the appropriate LLM-based agent to achieve optimal error correction accuracy and reduce correction time. Experiment results showed that 3\% improvement in Precision score and 15\% improvement in time cost as compared with no E-RL method respectively. Our source code is available at: https://github.com/yuqian2003/Co_Learning

代码纠错多智能体强化学习LLM应用

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。