MARS:用于竞赛编程的多专家大语言模型中继系统
MARS: Multi-Specialist LLM Relay System for Competitive Programming
浏览论文内容
中文总结 AI 辅助
MARS是用于竞赛编程的多专家LLM中继框架,通过检索选择算法领域专家组成流水线,在CodeContests测试集上以更低成本和方差达到0.624±0.006的通过率,缩小了与CodeSIM的差距。
中文摘要 AI 辅助
大型语言模型在代码生成方面表现出色,但竞赛编程暴露出一个持续存在的失败模式:现有的多智能体流水线将工作分配给通用的规划器、编码员和调试员角色,并将算法技术的选择完全交给主干模型。我们提出了MARS(Multi-Agent Relay of Specialized LLMs,即多专家大语言模型多智能体中继系统),这是一个仅需提示的框架,其中每个智能体都是主题专家——涵盖动态规划、图论、字符串、几何等领域——这些专家通过基于算法理论语料库的检索增强生成(RAG)进行支撑。给定一个问题,检索模块会选择一个由相关专家组成的小型团队;一个启动智能体编写初始C++17解决方案,后续每一轮都会在沙箱中针对公开示例运行候选方案,让当前专家保留、修复或转交草稿,并将结构化数据包转发给下一位专家。最后,一个基础设施修复阶段会对样板代码进行标准化处理。在CodeContests测试集上,使用Gemma 4模型时,MARS的通过率达到0.624±0.006,每个任务平均需要2.3个流水线阶段(比直接提示方法增加了14.4个百分点),以低3.3倍的挂钟时间成本大幅缩小了与CodeSIM(0.731)之间的差距,且每个任务的令牌消耗方差显著更小。源代码可在GitHub获取:this https URL。
英文摘要
Large Language Models excel at code generation, yet competitive programming exposes a persistent failure mode: existing multi-agent pipelines distribute work over generic planner, coder, and debugger roles and delegate the choice of algorithmic technique to the backbone alone. We present MARS (Multi-Agent Relay of Specialized LLMs), a prompt-only framework in which each agent is a topic specialist---dynamic programming, graphs, strings, geometry, and so on---grounded by retrieval-augmented generation over an algorithm-theory corpus. Given a problem, retrieval selects a small team of relevant specialists; a starter writes an initial C++17 solution, and each subsequent turn runs the candidate against public examples in a sandbox, lets the active specialist keep, repair, or hand off the draft, and forwards a structured packet to the next specialist. A single infrastructure-fixer pass normalizes boilerplate at the end. On the CodeContests test split with Gemma 4, MARS reaches $0.624 \pm 0.006$ pass rate at $2.3$ recorded pipeline stages per task ($+14.4$ percentage points over direct prompting), closing most of the gap to CodeSIM ($0.731$) at $3.3{\times}$ lower wall-clock cost and substantially smaller variance in per-task token spend. The source code is available on GitHub: https://github.com/fckand/mars.
发表机构
- MIRAI
- London Institute for Mathematical Sciences(伦敦数学科学研究院)
- AXXX
机构由 AI 辅助整理,请以论文原文为准。