Beyond Synthetic Benchmarks: Evaluating LLM Performance on Real-World Class-Level Code Generation
Not on the map. Why?
Abstract (arXiv)
Large language models (LLMs) have demonstrated strong performance on function-level code generation benchmarks, yet real-world software development increasingly demands class-level implementations that integrate multiple methods, attributes, and dependencies within authentic project contexts. This gap between benchmark performance and practical utility raises critical questions about LLMs' readiness for production code assistance, particularly regarding their ability to generalize across familiar and novel codebases. We introduce a benchmark derived from real-world open-source repositories, comprising classes divided into seen and unseen partitions to evaluate generalization under practical conditions. We systematically examine how input specification completeness and retrieval-augmented generation affect class-level correctness across multiple state-of-the-art LLMs. Our evaluation reveals a substantial performance gap: while LLMs achieve 84 to 89% correctness on synthetic benchmarks, they attain only 25 to 34% on real-world class tasks, with minimal distinction between familiar and novel codebases. Comprehensive documentation provides marginal improvements (1 to 3%), whereas retrieval augmentation yields greater gains (4 to 7%) by supplying concrete implementation patterns. Error analysis identifies AttributeError, TypeError, and AssertionError as dominant failure modes, with distinct patterns between synthetic and real-world scenarios. These findings provide actionable insights for enhancing context modelling, documentation strategies, and retrieval integration in production code assistance tools.
Key facts. Cited by 8 papers in the map (data through 7 Oct 2026). Builds on 27 of its 68 references that are in the map. First posted on arXiv 30 Oct 2025.
Builds on
27 of 68 references.
References · 27
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
- 2025gpt-oss-120b & gpt-oss-20b Model Cardcited by 1,258
- 2024Qwen2.5-Coder Technical Reportcited by 1,151
- 2021Measuring Coding Challenge Competence With APPScited by 879
- 2024A Survey on Large Language Models for Code Generationcited by 646
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
- 2024A Systematic Survey of Prompt Engineering in Large Language Models: Techniques and Applicationscited by 428
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
- 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 327
15 more
- 2024RepairAgent: An Autonomous, LLM-Based Agent for Program Repaircited by 225
- 2023ClassEval: A Manually-Crafted Benchmark for Evaluating LLMs on Class-level Code Generationcited by 166
- 2024CodeRAG-Bench: Can Retrieval Augment Code Generation?cited by 89
- 2024Bugs in Large Language Models Generated Code: An Empirical Studycited by 59
- 2022Pynguin: Automated Unit Test Generation for Pythoncited by 49
- 2024HumanEval Pro and MBPP Pro: Evaluating Large Language Models on Self-invoking Code Generationcited by 39
- 2024Prompting Techniques for Secure Code Generation: A Systematic Investigationcited by 33
- 2024Towards Understanding the Characteristics of Code Generation Errors Made by Large Language Modelscited by 28
- 2022CoCoSoDa: Effective Contrastive Learning for Code Searchcited by 21
- 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approachescited by 20
- 2025An Empirical Study of Retrieval-Augmented Code Generation: Challenges and Opportunitiescited by 17
- 2025GraphCodeAgent: Dual Graph-Guided LLM Agent for Retrieval-Augmented Repo-Level Code Generationcited by 17
- 2025CoDet-M4: Detecting Machine-Generated Code in Multi-Lingual, Multi-Generator and Multi-Domain Settingscited by 11
- 2025Prompt Engineering Guidelines for Using Large Language Models in Requirements Engineeringcited by 3
- 2025Self-Admitted GenAI Usage in Open-Source Softwarecited by 3
Built on by
Citing papers per year: 2026: 8.
8 papers.
- 2026ABC-Bench: Benchmarking Agentic Backend Coding in Real-World Developmentcited by 6
- 2026Compiled AI: Deterministic Code Generation for LLM-Based Workflow Automationcited by 3
- 2026ClassEval-Pro: A Cross-Domain Benchmark for Class-Level Code Generationcited by 2
- 2026VeriGraphi: A Multi-Agent Framework of Hierarchical RTL Generation for Large Hardware Designscited by 1
- 2026HybridCodeAuthorship: A Benchmark Dataset for Line-Level Code Authorship Detectioncited by 0
- 2026Repository-Level Solidity Code Generation with Large Language Models: From Prompting to Fine-Tuningcited by 0
- 2026Rethinking Code Performance Benchmarks for LLMscited by 0
- 2026Knowledge-Conditioned, Single-Pass LLM Synthesis of Executable Unity Game Scenes: A Compiler Error Census across 26 Goal Playable Conceptscited by 0
- 2026Knowledge-Conditioned, Single-Pass LLM Synthesis of Executable Unity Game Scenes: A Compiler Error Census across 26 Goal Playable Concepts11 Jul 2026
- 2026Rethinking Code Performance Benchmarks for LLMs8 Jul 2026
- 2026Repository-Level Solidity Code Generation with Large Language Models: From Prompting to Fine-Tuning18 Jun 2026
- 2026HybridCodeAuthorship: A Benchmark Dataset for Line-Level Code Authorship Detection10 Jun 2026
- 2026ClassEval-Pro: A Cross-Domain Benchmark for Class-Level Code Generation29 Apr 2026
- 2026VeriGraphi: A Multi-Agent Framework of Hierarchical RTL Generation for Large Hardware Designs16 Apr 2026
- 2026Compiled AI: Deterministic Code Generation for LLM-Based Workflow Automation6 Apr 2026
- 2026ABC-Bench: Benchmarking Agentic Backend Coding in Real-World Development16 Jan 2026
Similar, not cited
Close in wording, no citation either way
- 2025Holistic Evaluation of State-of-the-Art LLMs for Code Generation
- 2025Evaluating Large Language Models for Functional and Maintainable Code in Industrial Settings: A Case Study at ASML
- 2026CangjieBench: Benchmarking LLMs on a Low-Resource General-Purpose Programming Language
- 2026Narrowing the Complexity Gap in the Evaluation of Large Language Models ↗
- 2025Lifecycle-Aware code generation: Leveraging Software Engineering Phases in LLMs
- 2026CoRE: A Fine-Grained Code Reasoning Benchmark Beyond Output Prediction
- 2024DevEval: A Manually-Annotated Code Generation Benchmark Aligned with Real-World Code Repositories
- 2025LLM4VV: Evaluating Cutting-Edge LLMs for Generation and Evaluation of Directive-Based Parallel Programming Model Compiler Tests ↗