An LLM-as-Judge Metric for Bridging the Gap with Human Evaluation in SE Tasks

Xin Zhou, Kisub Kim, Ting Zhang, Martin Weyssow, Luís F. Gomes, Guang Yang, David LoarXiv 2025 · DOI

Introduction

Evaluating the output of Large Language Models (LLMs) in software engineering (SE) presents a significant challenge. While human evaluation is the gold standard for accuracy, it is inherently unscalable and slow. Conversely, traditional automated metrics such as BLEU or CodeBLEU offer speed and scalability but often fail to capture functional correctness, frequently penalizing semantically correct code that differs syntactically from a reference solution.

To address this "Goldilocks" problem, researchers have introduced SE-Jury, an automated evaluation metric that employs an ensemble of LLMs. By utilizing diverse reasoning strategies and dynamic team selection, SE-Jury aims to bridge the gap between automated tools and human expert judgment.

The SE-Jury Framework

SE-Jury is inspired by legal tribunals, where experts from various backgrounds deliberate to reach a consensus. The framework operates through a multi-stage process: data generation, strategy application, dynamic teaming, and final score generation.

Overview of the SE-Jury framework, illustrating the stages from data generation to final correctness score generation.

The process begins with the input query and the generated software artifact. SE-Jury then applies a set of diverse evaluation strategies to assess the artifact's quality.

Diverse Evaluation Strategies

A core innovation of SE-Jury is the use of five distinct reasoning strategies, each designed to capture different facets of code correctness:

  1. S1 (Direct Assess): A baseline strategy where the LLM provides a straightforward grade.
  2. S2 (Direct Assess and Rethink): The LLM first grades the code and is then prompted to critically re-evaluate its own reasoning, adjusting the score if necessary.
  3. S3 (Equivalence Assess): The LLM compares the generated code against a reference solution to determine functional equivalence.
  4. S4 (Analyze Reference and Assess): The LLM identifies key properties of a correct solution from the reference and verifies their presence in the generated code.
  5. S5 (Generate Tests and Assess): The LLM creates a test suite based on requirements and simulates the code's performance against these tests.
Example prompt for Strategy 2 (S2), showing the self-reflection mechanism used to refine initial assessments.

The "Rethink" step in S2 is particularly noteworthy, as it forces the model to validate its initial logic, often uncovering subtle errors or hallucinations.

Dynamic Team Formation and Scoring

Recognizing that not all strategies are equally effective for every task (e.g., test generation is less applicable to code summarization), SE-Jury employs a dynamic team selection mechanism. Using a small sample of human-annotated data (typically 20 examples), the system identifies the combination of strategies that best correlates with human judgment for the specific dataset.

Once the "best team" is formed, the individual scores from each judge are ensembled—usually through averaging—to produce a final correctness score on a standardized 0–100 scale. This dynamic approach not only improves accuracy but also reduces computational costs by approximately 50% compared to using all strategies for every task.

Experimental Results

SE-Jury was evaluated across benchmarks for code generation (CoNaLa, Card2Code), automated program repair (APR-Assess), and code summarization (Summary-Assess). Key findings include:

  • Superior Correlation: SE-Jury demonstrated a 29.6% to 140.8% improvement in correlation with human judgment compared to existing metrics like ICE-Score and CodeJudge.
  • Human-Level Agreement: In tasks such as program repair, the agreement between SE-Jury and human annotators approached the level of agreement found between different human experts.
  • Robustness: The ensemble approach effectively mitigated the brittleness of single-prompt LLM-as-judge methods.

Conclusion

SE-Jury represents a significant advancement in automated SE evaluation. By leveraging the collective reasoning of an LLM ensemble and dynamically tailoring the evaluation "jury" to the task at hand, it provides a scalable metric that closely mirrors human intuition. Future work will focus on narrowing the remaining gap in subjective tasks like code summarization and expanding the metric to evaluate non-functional properties such as security and readability.

Summary updated

BibTeX
@misc{zhou2025llm,
  author = {Xin Zhou and Kisub Kim and Ting Zhang and Martin Weyssow and Luís F. Gomes and Guang Yang and David Lo},
  title = {{An LLM-as-Judge Metric for Bridging the Gap with Human Evaluation in SE Tasks}},
  year = {2025},
  eprint = {2505.20854},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.20854},
}
Figure