Table of Contents
Fetching ...

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

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

TL;DR

PR review automation faces data quality and evaluation challenges; Sphinx tackles these with a grounded data pipeline, a checklist-based benchmark, and CRPO to align training with real-world review practices. The approach yields state-of-the-art checklist coverage and robust, context-aware reviews across multiple languages. Extensive experiments and ablations demonstrate the value of checklist-grounded rewards and length regularization over free-form critiques. The work enables practical, high-quality PR reviews suitable for real-world development workflows.

Abstract

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.

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

TL;DR

PR review automation faces data quality and evaluation challenges; Sphinx tackles these with a grounded data pipeline, a checklist-based benchmark, and CRPO to align training with real-world review practices. The approach yields state-of-the-art checklist coverage and robust, context-aware reviews across multiple languages. Extensive experiments and ablations demonstrate the value of checklist-grounded rewards and length regularization over free-form critiques. The work enables practical, high-quality PR reviews suitable for real-world development workflows.

Abstract

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.
Paper Structure (32 sections, 3 equations, 6 figures, 3 tables)

This paper contains 32 sections, 3 equations, 6 figures, 3 tables.

Figures (6)

  • Figure 1: Overview of the PR review workflow, illustrating the transition from original code through generated solutions to final merged code, supported by a structured data generation and model evaluation pipeline.
  • Figure 2: Data statistics of the Sphnix dataset and benchmark used for model training and evaluation. Details are in the Appendix.
  • Figure 3: Reward(Left)/Response Length(Right) variation over steps.
  • Figure 4: Data statistics of the Sphnix dataset and benchmark used for model training and evaluation. Details are in the Appendix.
  • Figure 5: Rating Distributions
  • ...and 1 more figures