ChatPaper.aiChatPaper

从代码基础模型到智能体与应用:代码智能实践指南

From Code Foundation Models to Agents and Applications: A Practical Guide to Code Intelligence

November 23, 2025
作者: Jian Yang, Xianglong Liu, Weifeng Lv, Ken Deng, Shawn Guo, Lin Jing, Yizhi Li, Shark Liu, Xianzhen Luo, Yuyu Luo, Changzai Pan, Ensheng Shi, Yingshui Tan, Renshuai Tao, Jiajun Wu, Xianjie Wu, Zhenhe Wu, Daoguang Zan, Chenchen Zhang, Wei Zhang, He Zhu, Terry Yue Zhuo, Kerui Cao, Xianfu Cheng, Jun Dong, Shengjie Fang, Zhiwei Fei, Xiangyuan Guan, Qipeng Guo, Zhiguang Han, Joseph James, Tianqi Luo, Renyuan Li, Yuhang Li, Yiming Liang, Congnan Liu, Jiaheng Liu, Qian Liu, Ruitong Liu, Tyler Loakman, Xiangxin Meng, Chuang Peng, Tianhao Peng, Jiajun Shi, Mingjie Tang, Boyang Wang, Haowen Wang, Yunli Wang, Fanglin Xu, Zihan Xu, Fei Yuan, Ge Zhang, Jiayi Zhang, Xinhao Zhang, Wangchunshu Zhou, Hualei Zhu, King Zhu, Brown Dai, Aishan Liu, Zhoujun Li, Chenghua Lin, Tianyu Liu, Chao Peng, Kai Shen, Libo Qin, Shuangyong Song, Zizheng Zhan, Jiajun Zhang, Jie Zhang, Zhaoxiang Zhang, Bo Zheng
cs.AI

摘要

大型语言模型(LLMs)通过实现自然语言描述到功能代码的直接转换,从根本上变革了自动化软件开发领域,并借助GitHub Copilot(微软)、Cursor(Anysphere)、Trae(字节跳动)和Claude Code(Anthropic)等工具推动商业应用。该领域已从基于规则的系统演进至基于Transformer的架构,在HumanEval等基准测试中的成功率从个位数提升至95%以上。本文通过一系列分析与探测实验,对代码LLMs进行全面梳理并构建实践指南,系统考察从数据构建到后训练的完整模型生命周期,涵盖高级提示范式、代码预训练、监督微调、强化学习及自主编码智能体。我们深入分析通用LLMs(GPT-4、Claude、LLaMA)与代码专用LLMs(StarCoder、Code LLaMA、DeepSeek-Coder、QwenCoder)的代码能力,批判性审视其技术方案、设计决策与权衡取舍。进一步地,我们阐明了学术研究(如基准测试与任务设定)与真实场景部署(如软件相关代码任务)之间的研究实践鸿沟,涉及代码正确性、安全性、大型代码库的上下文感知及开发流程集成等问题,并将前沿研究方向映射至实际需求。最后,我们通过系列实验对代码预训练、监督微调与强化学习进行全景分析,涵盖缩放定律、框架选择、超参数敏感性、模型架构及数据集比较等维度。
English
Large language models (LLMs) have fundamentally transformed automated software development by enabling direct translation of natural language descriptions into functional code, driving commercial adoption through tools like Github Copilot (Microsoft), Cursor (Anysphere), Trae (ByteDance), and Claude Code (Anthropic). While the field has evolved dramatically from rule-based systems to Transformer-based architectures, achieving performance improvements from single-digit to over 95\% success rates on benchmarks like HumanEval. In this work, we provide a comprehensive synthesis and practical guide (a series of analytic and probing experiments) about code LLMs, systematically examining the complete model life cycle from data curation to post-training through advanced prompting paradigms, code pre-training, supervised fine-tuning, reinforcement learning, and autonomous coding agents. We analyze the code capability of the general LLMs (GPT-4, Claude, LLaMA) and code-specialized LLMs (StarCoder, Code LLaMA, DeepSeek-Coder, and QwenCoder), critically examining the techniques, design decisions, and trade-offs. Further, we articulate the research-practice gap between academic research (e.g., benchmarks and tasks) and real-world deployment (e.g., software-related code tasks), including code correctness, security, contextual awareness of large codebases, and integration with development workflows, and map promising research directions to practical needs. Last, we conduct a series of experiments to provide a comprehensive analysis of code pre-training, supervised fine-tuning, and reinforcement learning, covering scaling law, framework selection, hyperparameter sensitivity, model architectures, and dataset comparisons.
PDF1777December 3, 2025