Automating code review with Large Language Models (LLMs) shows immense promise, yet practical adoption is hampered by their lack of reliability, context-awareness, and control. To address this, we propose Specification-Grounded Code Review (SGCR), a framework that grounds LLMs in human-authored specifications to produce trustworthy and relevant feedback. SGCR features a novel dual-pathway architecture: an explicit path ensures deterministic compliance with predefined rules derived from these specifications, while an implicit path heuristically discovers and verifies issues beyond those rules. Deployed in a live industrial environment at HiThink Research, SGCR's suggestions achieved a 42% developer adoption rate-a 90.9% relative improvement over a baseline LLM (22%). Our work demonstrates that specification-grounding is a powerful paradigm for bridging the gap between the generative power of LLMs and the rigorous reliability demands of software engineering.


翻译:利用大语言模型(LLMs)自动化代码审查展现出巨大潜力,但其可靠性不足、缺乏上下文感知及可控性差等问题阻碍了实际应用。为解决这一难题,我们提出了基于规范的代码审查框架(Specification-Grounded Code Review, SGCR),该框架将大语言模型锚定于人工编写的规范之上,以产生可靠且相关的反馈。SGCR采用一种新颖的双路径架构:显式路径确保对源自规范预定义规则的确定性遵循,而隐式路径则启发式地发现并验证超出这些规则的问题。在HiThink Research的实际工业环境中部署后,SGCR的建议获得了42%的开发者采纳率——相较于基线大语言模型(22%)实现了90.9%的相对提升。我们的工作表明,基于规范锚定是一种强大的范式,能够弥合大语言模型的生成能力与软件工程严格可靠性要求之间的鸿沟。

0
下载
关闭预览

相关内容

代码(Code)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
【斯坦福博士论文】大语言模型的AI辅助评估
专知会员服务
31+阅读 · 2025年3月30日
「大型语言模型评测」综述
专知会员服务
70+阅读 · 2024年3月30日
天大最新《大型语言模型评估》全面综述,111页pdf
专知会员服务
88+阅读 · 2023年10月31日
推荐|上交大推出Texygen:文本生成模型的基准测试平台
TextInfoExp:自然语言处理相关实验(基于sougou数据集)
全球人工智能
12+阅读 · 2017年11月12日
推荐|caffe-orc主流ocr算法:CNN+BLSTM+CTC架构实现!
全球人工智能
19+阅读 · 2017年10月29日
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
VIP会员
相关VIP内容
【斯坦福博士论文】大语言模型的AI辅助评估
专知会员服务
31+阅读 · 2025年3月30日
「大型语言模型评测」综述
专知会员服务
70+阅读 · 2024年3月30日
天大最新《大型语言模型评估》全面综述,111页pdf
专知会员服务
88+阅读 · 2023年10月31日
相关基金
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员