SafeLLM4SE: Statistical Evaluation and Reporting for LLM-based Software Engineering Systems
Organizations: University of Oviedo, Oviedo, Spain · Munster Technological University, Cork, Ireland
Abstract
Large language models (LLMs) are increasingly used for software engineering tasks, yet their stochastic behavior challenges the validity, reproducibility, and comparability of their evaluations. Conventional practices such as reporting a single output, an average score, best-of-N, or pass@k performance can obscure variability and estimation uncertainty, potentially leading to misleading conclusions about system reliability. This article presents SafeLLM4SE, a practical methodology and reporting standard for statistically principled evaluation of LLM-based software engineering systems. Rather than treating generated outputs as deterministic artifacts, SafeLLM4SE treats them as realizations of a stochastic process and distinguishes quality, stability, and estimation uncertainty. It combines adaptive sampling with confidence intervals, distribution-aware statistical comparisons, effect sizes, and a minimum reporting standard covering model configuration, reproducibility, evaluation procedures, and resource usage. SafeLLM4SE is also provided as an open-source software package available on PyPI, enabling researchers and practitioners to reproduce and extend the methodology. We illustrate its application by comparing two LLMs on HumanEval, a benchmark of programming problems assessed through functional tests.
Figures & tables
| Model | Single Output | Average (N=10) | Average (N=30) | Average (N=100) | SD (N=100) | 95% CI (N=100) | Pass@5 | Best-of-10 |
|---|---|---|---|---|---|---|---|---|
| A | 0.658 | 0.277 | 0.268 | 0.328 | 0.152 | [0.298,0.358] | 0.864 | 0.931 |
| B | 0.424 | 0.509 | 0.542 | 0.529 | 0.175 | [0.495, 0.563] | 0.903 | 0.962 |
| C | 0.425 | 0.360 | 0.438 | 0.540 | 0.344 | [0.473,0.607] | 0.948 | 0.981 |
| Category | Information to report | Purpose |
|---|---|---|
| Quality | Selected quality indicator(s) and estimated value . | Characterize the performance of the technique. |
| Stability | Selected stability indicator(s), such as standard deviation, coefficient of variation, or interquartile range. | Characterize variability across repeated executions. |
| Estimation uncertainty | CI for each primary performance indicator and confidence level. | Quantify the precision of the reported estimates. |
| Sampling | Number of executions, sampling procedure, minimum sample size, stopping criterion, and execution budget, if applicable. | Assess the adequacy and efficiency of the sampling procedure. |
| Model | Model name, model version or identifier, and provider. | Identify the system being evaluated and facilitate replication. |
| Inference configuration | Temperature and other inference parameters that may affect generation. | Specify the conditions under which outputs were generated. |
| Design | Significance test | Confidence interval (CI) | Effect size |
|---|---|---|---|
| Independent | Mann–Whitney U | Bootstrap CI for the difference | Cliff’s |
| Paired | Wilcoxon signed-rank | Paired bootstrap CI | Matched-pairs rank-biserial correlation |
| Category | Information | Gemini | Qwen-Coder |
|---|---|---|---|
| Quality | Mean benchmark success rate ( ) | 0.9335 | 0.8238 |
| Stability | Standard deviation of benchmark success rate | 0.0110 | 0.0204 |
| Estimation uncertainty | 95% CI for mean benchmark success rate | [0.9294, 0.9376] | [0.8188, 0.8287] |
| Sampling | ; target CI; budget; ; total generated solutions | 30; width of 95% CI ; unlimited; 30; 4,920 | 30; width of 95% CI ; unlimited; 67; 10,988 |
| Model | Model name, identifier, and provider | Gemini, gemini-3.1-flash-lite ; Gemini API v1beta | Qwen-Coder, qwen2.5-coder:7b ; Ollama v0.34.4 |
| Inference configuration | Temperature | 2.0 | 2.0 |
| Comparison | Result |
|---|---|
| Mean difference | |
| 95% bootstrap CI for the difference in mean success rate | |
| Mann–Whitney U test | , |
| Cliff’s |
LLM Evaluation
Large language model evaluation measures what models can do, how reliably they do it, and whether benchmark scores predict real-world performance.
See all 2,408 papers