Automatically Benchmarking LLM Code Agents through Agent-Driven Annotation and Evaluation

Lingyue Fu, Bolun Zhang, Hao Guan, Yaoming Zhu, Lin Qiu, Weiwen Liu, Xuezhi Cao, Xunliang Cai, Weinan Zhang, Yong Yu · DOI

TL;DR

Evaluating repository-level AI code agents is currently bottlenecked by the high cost of human annotation and the inaccuracy of general LLM judges. This paper introduces PRDBench, a benchmark of 50 real-world Python projects generated efficiently via an agent-driven pipeline, and PRDJudge, a specialized, fine-tuned evaluation agent that achieves over 90% alignment with human grading standards.

What Problem Does This Paper Address?

AI code agents are rapidly evolving from writing single functions to building entire software repositories from scratch. However, evaluating these agents at a project level presents two major challenges:

  1. Prohibitive Annotation Costs: Creating high-quality, diverse, project-level evaluation datasets requires extensive domain expertise. Existing benchmarks often rely on manual curation by PhD-level experts, severely limiting dataset scale and domain diversity.
  2. Rigid or Inaccurate Evaluation: Traditional unit tests force agents to match exact function signatures, punishing valid alternative implementations. Conversely, recent "Agent-as-a-Judge" paradigms use general LLMs with In-Context Learning (ICL), but these models frequently hallucinate or misalign with human standards when parsing complex execution logs and file differences.

Methods

The authors tackle these challenges with a two-pronged approach: an automated data production pipeline and a specialized, fine-tuned evaluation model.

Agent-Driven Data Production

Instead of manual curation, the authors leverage state-of-the-art code agents under human supervision to build the benchmark.

  1. Initialization: An agent generates a structured Product Requirement Document (PRD) and an executable metric outline based on the Arrange-Act-Assert (AAA) testing methodology.
  2. Scaffold Generation: The agent generates the initial code scaffolding and a precise criteria scheme.
  3. Human-in-the-Loop: Human annotators (requiring only undergraduate-level CS knowledge) inspect the interfaces and provide feedback.
  4. Scaffold Removal: Once refined through at least 5 iterations, the scaffolding is removed, leaving only the PRD and test artifacts. This forces evaluated agents to code entirely from scratch.
Figure 1: Overview of the PRDBench data production workflow. Step1: PRD and Test Plan Initialization; Step 2: Code Scaffold and Criteria Scheme Generation; Step 3: Human Inspection; Step 4: Agent-based Fix and Refinement; Step 5: Remove scaffold.

PRDJudge: A Specialized Evaluation Agent

To replace unreliable general LLM judges, the authors fine-tuned a Qwen3-Coder-30B model on 911 high-quality evaluation trajectories. PRDJudge is equipped with six core tools—including file manipulation, shell interaction, and a multimodal interface (deal_graph) powered by GPT-4o to validate visual plots and user interfaces.

Figure 5: Overview of PRDJudge. PRDJudge executes tests based on the criteria scheme using various tools, compares outputs (files or results) with expected outputs, and generates a report for the submitted code.

Datasets

The resulting dataset, PRDBench, consists of 50 real-world Python projects spanning 20 distinct subdomains (e.g., Data Analysis, Web Security, and Game Development).

Figure 3: Domain distribution of PRDBench.

PRDBench includes a total of 1,258 evaluation metrics split into three categories:

  • Unit Tests (408 metrics): Verifies functional correctness of individual components.
  • Shell Interactions (732 metrics): Executes predefined shell commands to check system-level operations and command-line interfaces.
  • File Comparisons (118 metrics): Compares generated artifacts against reference solutions for content, format, and organization.

Compared to existing benchmarks, PRDBench balances project-level complexity with flexible, multi-faceted evaluation metrics:

Comparison of PRDBench with Existing Benchmarks

Key Insights and Ideas

  • Domain Specialization Beats Raw Scale: A smaller, fine-tuned 30B model (PRDJudge) consistently outperforms massive proprietary models (like GPT-5.2 and Claude-4.5) at code evaluation. Specialization allows the model to internalize a deterministic mapping from PRDs to code execution.
  • "Explore-then-Evaluate" Workflow: Trajectory analysis revealed that PRDJudge naturally adopts a disciplined approach—mapping the workspace and reading documentation before running tests. In contrast, general LLMs often exhibit a "blind action" pattern, spamming trial-and-error commands without truly understanding the codebase.
  • Divergent Agent Archetypes: While frontier foundation models dictate the ceiling for zero-shot code generation, commercial frameworks (like Claude Code) excel at iterative debugging. They use highly constrained tool guardrails that prioritize stable, incremental adjustments over massive code rewrites.

Key Results

  • High Human Alignment: PRDJudge achieved a 91.75% In-Domain and 92.69% Out-of-Domain Human Alignment Rate (HAR), approaching the human inter-annotator agreement upper bound (95.83%) and outperforming Claude-4.5 (88.10%).
  • Computational Efficiency: PRDJudge significantly reduced token consumption and achieved the lowest average inference time per metric evaluation (107.85 seconds) compared to general LLM baselines.
  • Agent Performance: When evaluating state-of-the-art agents on PRDBench, Claude Code achieved the highest overall pass rate after debugging (70.25%), while unconstrained minimal agents often suffered from performance regressions during long-context debugging.

Limitations and Future Work

The primary limitation arises when evaluating agents in a completely unconstrained Free Development mode (building without a fixed interface). In this setting, PRDJudge must dynamically rewrite its test scripts to adapt to the agent's unique code structure. This dual requirement introduces evaluation noise, making it difficult to separate an agent's logic errors from the judge's interface-mapping failures.

Future work will focus on enhancing PRDJudge's dynamic interface-mapping capabilities to enable reliable automated evaluation in fully unconstrained environments.

Summary updated

BibTeX
@misc{fu2025automatically,
  author = {Lingyue Fu and Bolun Zhang and Hao Guan and Yaoming Zhu and Lin Qiu and Weiwen Liu and Xuezhi Cao and Xunliang Cai and Weinan Zhang and Yong Yu},
  title = {{Automatically Benchmarking LLM Code Agents through Agent-Driven Annotation and Evaluation}},
  year = {2025},
  eprint = {2510.24358},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.24358},
}
Figure