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

Abstract

Evaluating Large Language Model (LLM) code agents on complex, project-level tasks is traditionally a resource-intensive process requiring expert human annotation. This paper presents PRDBench, a framework that leverages agents to build their own benchmarks. By employing an agent-driven data production pipeline with human-in-the-loop verification, PRDBench significantly reduces the cost and expertise required for dataset creation while providing a more comprehensive evaluation through unit tests, shell interactions, and file comparisons.

Introduction

The rapid advancement of code agents creates a "chicken and egg" problem: high-quality benchmarks are essential for evaluation, but their creation typically requires PhD-level experts to spend days writing documentation and test suites. As agents become more capable, the complexity of these "exams" increases, making manual creation unsustainable. Current benchmarks also suffer from the "Unit Test Trap," focusing on isolated code snippets rather than the end-to-end realities of software engineering, such as environment configuration and system integration.

The PRDBench Pipeline

To address the expertise bottleneck, the researchers developed an agent-driven data production pipeline. This framework shifts the human role from "creator" to "inspector," allowing undergraduate-level annotators to verify agent-generated content rather than writing code from scratch.

The five-step agent-driven data production pipeline for PRDBench.

The pipeline consists of five distinct steps:

  1. Initialization: An LLM (e.g., GPT-4) generates a Product Requirement Document (PRD) and a metric outline from a "seed task."
  2. Generation: A code agent creates a "scaffold" (file structure and interfaces) and expands the metrics into executable test artifacts using the Arrange-Act-Assert (AAA) pattern.
  3. Human Inspection: Annotators verify the alignment between the criteria and the PRD.
  4. Fix and Refinement: The agent iteratively corrects the scaffold or criteria based on human feedback.
  5. Remove Scaffold: The scaffold is deleted, leaving only the PRD and the evaluation suite. The test agent must then recreate the project from scratch.

Dataset and Evaluation

The resulting PRDBench dataset includes 50 real-world Python projects across 20 domains, such as Data Analysis, Information Security, and Artificial Intelligence. Evaluation is performed by EvalAgent, an "Agent-as-a-Judge" equipped with a suite of tools (shell interaction, file reading, and multimodal judgment) to assess performance across 1,262 scoring points. These points are categorized into Unit Tests, Shell Interactions, and File Comparisons, offering a holistic view of an agent's capabilities.

Experimental Results

The researchers evaluated several "Minimal" and "Commercial" agents. A key finding was the high reliability of the automated evaluation, with EvalAgent showing an 81.56% alignment with human graders.

Performance metrics and error rates for various code agents across development and debugging rounds.

In the "Development" round, GPT-5 and CodeX emerged as top performers, with pass rates of 55.81% and 56.23% respectively. Interestingly, the study revealed that coding and debugging are distinct skills. Some models performed well during initial development but struggled significantly in the "Debug" round, where they had to maintain code structure while fixing errors. Unit tests remained the most challenging category for agents to debug, requiring a deeper conceptual understanding of the test logic.

Conclusion

PRDBench demonstrates that agents can effectively participate in their own evaluation process, reducing annotation time to an average of 8 hours per project. While commercial agents with specialized tools generally outperform minimal ones, the primary bottleneck remains the underlying model's reasoning capabilities. Future work will focus on expanding the framework to multi-agent collaboration and additional programming languages.

Reference: Fu, L., et al. (2025). Automatically Benchmarking LLM Code Agents through Agent-driven Annotation and Evaluation. arXiv:2510.24358v1.

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