SGCR:一种基于规范的可信大语言模型代码审查框架
SGCR: A Specification-Grounded Framework for Trustworthy LLM Code Review
AI总结:
SGCR通过规范引导LLMs实现可信代码审查,其双路径架构在工业环境中提升了42%的开发者采纳率。
摘要:
利用大语言模型(LLMs)进行代码审查展现出巨大潜力,但其缺乏可靠性、情境感知能力和可控性阻碍了实际应用。为此,我们提出了规范引导的代码审查(SGCR)框架,该框架将LLMs与人工编写的规范相结合,以生成可信且相关的反馈。SGCR具有新颖的双路径架构:显式路径确保确定性地符合从这些规范中导出的预定义规则,而隐式路径则通过启发式方法发现和验证超出这些规则的问题。在HiThink Research的实时工业环境中部署,SGCR的建议实现了42%的开发者采纳率,比基线LLM(22%)提高了90.9%。我们的工作证明,规范引导是一种强大的范式,能够弥合LLMs生成能力与软件工程严格可靠性需求之间的差距。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。