arXiv:2511.03925cs.SEcs.AI2025-11被引 2

RAMP用协作智能体实现轻量级Ruby程序自动修复,效果优于现有方法。

Collaborative Agents for Automated Program Repair in Ruby

  • 多智能体协作生成测试、反思错误并迭代修正代码。
  • 在XCodeEval上达67%的pass@1,5轮内收敛且对编译/运行时错误有效。
  • 无需大模型微调或多语言数据,适合低资源语言调试研究者。

自动化程序修复(APR)随着大语言模型(LLMs)的发展迅速进步,但现有方法大多计算成本高,且局限于少数编程语言。尽管Ruby在网页开发中广泛使用,开发者常面临持续挑战,但在APR研究中仍被忽视。本文提出RAMP,一种针对Ruby的轻量级框架,将程序修复建模为反馈驱动的迭代过程。RAMP采用一组协作智能体,生成针对性测试,反思错误,并不断优化候选修复方案直至找到正确解。与以往方法不同,RAMP不依赖大型多语言修复数据库或昂贵微调,而是通过轻量级提示和测试驱动反馈直接作用于Ruby代码。在XCodeEval基准上的评估显示,RAMP在Ruby上的pass@1达到67%,优于先前方法。RAMP在五次迭代内快速收敛,消融实验确认测试生成和自我反思是性能关键。进一步分析表明,RAMP在修复错误答案、编译错误和运行时错误方面尤为有效。本工作为多智能体修复策略提供了新见解,并为将基于LLM的调试工具扩展至研究不足的语言奠定了基础。

原文摘要 · Abstract (English)

Automated Program Repair (APR) has advanced rapidly with Large Language Models (LLMs), but most existing methods remain computationally expensive, and focused on a small set of languages. Ruby, despite its widespread use in web development and the persistent challenges faced by its developers, has received little attention in APR research. In this paper, we introduce RAMP, a novel lightweight framework that formulates program repair as a feedback-driven, iterative process for Ruby. RAMP employs a team of collaborative agents that generate targeted tests, reflect on errors, and refine candidate fixes until a correct solution is found. Unlike prior approaches, RAMP is designed to avoid reliance on large multilingual repair databases or costly fine-tuning, instead operating directly on Ruby through lightweight prompting and test-driven feedback. Evaluation on the XCodeEval benchmark shows that RAMP achieves a pass@1 of 67% on Ruby, outper-forming prior approaches. RAMP converges quickly within five iterations, and ablation studies confirm that test generation and self-reflection are key drivers of its performance. Further analysis shows that RAMP is particularly effective at repairing wrong answers, compilation errors, and runtime errors. Our approach provides new insights into multi-agent repair strategies, and establishes a foundation for extending LLM-based debugging tools to under-studied languages.

程序修复多智能体RubyLLM

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