software engineering

PROBE: Benchmarking Code Generation in Large Language Models

arXiv:2607.13820

summary

The paper presents PROBE, an extensible benchmark framework that evaluates large language models on code generation across functional correctness, solution proximity, and code quality for multiple languages and prompting strategies.

Abstract

Large Language Models (LLMs) are increasingly being used in everyday software engineering tasks, particularly in automated code generation. Despite their widespread adoption, these models remain far from perfect, making systematic and fair evaluation essential to understand their strengths and limitations. In the context of code generation, existing benchmarks are limited: they often target a single programming language and rely primarily on unit test outcomes, while overlooking other critical dimensions such as the overall quality of the generated code and its closeness to a valid solution. To address these gaps, we introduce PROBE, an extensible benchmark framework that, unlike prior work, establishes a systematic structure built on diverse and well-defined metrics, representative workloads, varied prompt templates, and a robust experimental procedure. In practice, the code generated by the LLMs is evaluated along three complementary dimensions: functional correctness, proximity to valid solutions, and code quality, enabling a comprehensive assessment of performance. We use PROBE to evaluate four open-source and two proprietary models under three prompting strategies across five programming languages. We further complement this analysis with a study of common errors in the code and provide concrete examples, offering clearer insight into where LLMs tend to struggle. Our findings show that, while LLMs achieve promising results, they struggle with harder problems and, in the case of smaller models, with programming languages that have fewer available resources for training, and they often fail due to fundamental and easily avoidable errors that underscore the unreliability of automatically generated code.

Accepted for publication in Empirical Software Engineering (Springer)

Topics & keywords

#code generation#large language models#benchmarking#software engineering#programming languagesPROBEfunctional correctnessprompt engineeringLLM evaluationcode quality metrics
PROBE: Benchmarking Code Generation in Large Language Models · wovepaper