arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2601.04252cs.SEcs.CL
收藏

Sphinx:基于LLM的拉取请求审查的基准测试与建模

Sphinx: Benchmarking and Modeling for LLM-Driven Pull Request Review

University of Rochester(罗切斯特大学);Microsoft(微软公司)

Daoan Zhang, Shuo Zhang, Zijian Jin, Jiebo Luo, Shengyu Fu, Elsie Nallipogu

AI总结:

Sphinx通过结构化数据生成、检查表评估基准和CRPO训练范式,提升LLM在拉取请求审查中的性能和实用性。

摘要:

拉取请求(PR)审查对于确保软件质量至关重要,但自动化这一任务仍然具有挑战性,因为存在噪声监督、有限的上下文理解以及不充分的评估指标。我们提出了Sphinx,一个统一的框架,用于基于LLM的PR审查,通过三个关键组件解决这些限制:(1)一个结构化的数据生成管道,通过比较伪修改和合并的代码生成上下文丰富、语义基础的审查评论;(2)基于检查表的评估基准,通过结构化的覆盖可操作验证点来评估审查质量,超越了像BLEU这样的表面指标;(3)检查表奖励策略优化(CRPO),一种新的训练范式,利用基于规则的、可解释的奖励来使模型行为与现实审查实践对齐。广泛的实验表明,使用Sphinx训练的模型在审查完整性和精确度方面实现了最先进的性能,比专有和开源基线高出多达40%的检查表覆盖。共同,Sphinx使能够开发出不仅流畅,而且具有上下文意识、技术精确且在现实开发流程中可部署的PR审查模型。数据将在审查后发布。

英文摘要:

Pull request (PR) review is essential for ensuring software quality, yet automating this task remains challenging due to noisy supervision, limited contextual understanding, and inadequate evaluation metrics. We present Sphinx, a unified framework for LLM-based PR review that addresses these limitations through three key components: (1) a structured data generation pipeline that produces context-rich, semantically grounded review comments by comparing pseudo-modified and merged code; (2) a checklist-based evaluation benchmark that assesses review quality based on structured coverage of actionable verification points, moving beyond surface-level metrics like BLEU; and (3) Checklist Reward Policy Optimization (CRPO), a novel training paradigm that uses rule-based, interpretable rewards to align model behavior with real-world review practices. Extensive experiments show that models trained with Sphinx achieve state-of-the-art performance on review completeness and precision, outperforming both proprietary and open-source baselines by up to 40\% in checklist coverage. Together, Sphinx enables the development of PR review models that are not only fluent but also context-aware, technically precise, and practically deployable in real-world development workflows. The data will be released after review.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑