CodeJudgeBench: Benchmarking LLM-as-a-Judge for Coding Tasks

Hongchao Jiang, Yiming Chen, Yushi Cao, Hung-Yi Lee, Robby T. Tan

TL;DR

CodeJudgeBench is a new, large-scale benchmark designed to evaluate how effectively Large Language Models (LLMs) can act as judges for coding tasks like generation, repair, and unit testing. The study reveals that "thinking" models (reasoning-heavy LLMs) significantly outperform traditional models—with small 8B thinking models often beating 70B non-thinking giants—though all models remain surprisingly sensitive to the order in which code samples are presented.

What Problem Does This Paper Address?

As LLMs generate an ever-increasing volume of code, evaluating that code becomes a bottleneck. Human review is too slow, and traditional metrics like CodeBLEU are often too rigid or require human-written reference solutions. The "LLM-as-a-Judge" paradigm—where one model evaluates the output of another—is a promising scalable solution, but its effectiveness in specialized coding scenarios was largely unproven.

Existing benchmarks for LLM judges were often too small, focused only on simple code generation, or used outdated models. The authors address this gap by creating a rigorous, execution-free evaluation framework that tests a judge's ability to distinguish "good" from "bad" code across a broader spectrum of software engineering tasks.

Methods

The authors introduce CodeJudgeBench, which evaluates models across three critical tasks:

  1. Code Generation: Choosing the correct implementation for a problem statement.
  2. Code Repair: Identifying the correct fix for a buggy code snippet given an error message.
  3. Unit Test Generation: Distinguishing correct input-output pairs from incorrect ones.

The researchers benchmarked 26 different LLMs, categorizing them by their architecture (standard vs. "thinking" models) and their training focus (general, code-tuned, or judge-tuned). They also compared different prompting strategies:

  • Pair-wise Comparison: The judge looks at two responses and picks the winner.
  • Point-wise Scoring: The judge assigns a scalar score (e.g., 1-5) to a single response.
  • Response Pre-processing: Testing whether the judge performs better when seeing the full raw response versus just the extracted code.

Datasets

The primary contribution is CodeJudgeBench, which consists of 5,352 curated pairs.

  • Source Material: To prevent "data contamination" (where models might have seen the test questions during training), the authors used LiveCodeBench, which continually collects new problems from platforms like LeetCode and CodeForces.
  • Comparison: The paper notes that CodeJudgeBench is significantly more challenging than prior benchmarks like JudgeBench or RM-Bench. For instance, frontier models that achieve near-perfect scores on older benchmarks show substantially lower accuracy on CodeJudgeBench, proving it is a more effective "stress test" for modern AI.

Key Insights and Ideas

  • The "Thinking" Advantage: "Thinking models" (reasoning models that use long internal Chain-of-Thought) are vastly superior judges. They allocate more "compute-time" to analyze code logic, allowing them to catch subtle bugs that non-thinking models miss.
  • Efficiency over Scale: A relatively small thinking model, like Qwen3-8B, can outperform specially trained judge models that are nearly ten times its size (70B). This suggests that reasoning capability is more important for judging than raw parameter count.
  • The Fragility of Judgment: Even the best models exhibit position bias. Simply swapping the order of two code snippets (presenting "Code A" before "Code B" vs. vice versa) can swing accuracy by as much as 14%.
  • Context Matters: Judges perform better when they have access to the full, unprocessed response from the "programmer" model, including comments and reasoning, rather than just the naked code.
  • Pair-wise > Point-wise: Point-wise scoring is problematic because models frequently assign "ties" (roughly 50% of the time), making it difficult to rank competing solutions effectively.

Key Results

  • Top Performers: Gemini-2.5-Pro and Claude-4-Sonnet emerged as the strongest judges overall, achieving average accuracies in the 80% range.
  • Task Difficulty: Unit Test Generation proved to be the most difficult task for LLM judges, likely because it provides the least contextual information (only the problem statement and a test case). Code Repair was generally the easiest.
  • Open-Source vs. Closed-Source: While proprietary models lead the pack, open-source thinking models like QwQ-32B and DeepCoder-14B are highly competitive, often outperforming much larger non-thinking proprietary models.

Limitations and Future Work

Despite the progress, the authors acknowledge that the randomness and sensitivity of LLM judges remain a concern for high-stakes software engineering. A judge that changes its mind based on which code snippet it reads first isn't yet fully reliable.

Future work will focus on:

  • Expanding the benchmark to include more diverse software engineering tasks.
  • Developing techniques to mitigate position bias and improve the consistency of judgments.
  • Continuously updating the dataset with new coding problems to stay ahead of model training cutoffs.

Summary updated

BibTeX
@inproceedings{jiang2026codejudgebench,
  author = {Hongchao Jiang and Yiming Chen and Yushi Cao and Hung-Yi Lee and Robby T. Tan},
  title = {{CodeJudgeBench: Benchmarking LLM-as-a-Judge for Coding Tasks}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2026},
  doi = {10.18653/v1/2026.acl-long.888},
}
Figure