Skip to main content
QUICK REVIEW

[Paper Review] The Fault in our Stars: Quality Assessment of Code Generation Benchmarks

Mohammed Latif Siddiq, Simantika Dristi|arXiv (Cornell University)|Apr 15, 2024
Model-Driven Software Engineering TechniquesComputer Science3 citations
TL;DR

This paper conducts the first comprehensive study of prompt quality in code generation benchmarks, analyzing 3,566 prompts across 9 benchmarks. It identifies widespread issues like grammatical errors, unclear intent, and poor documentation style, showing that fixing these improves Python code generation performance—though not significantly for Java—while also providing evidence of data contamination in GPT-3.5-Turbo and CodeGen-2.5 models.

ABSTRACT

Large Language Models (LLMs) are gaining popularity among software engineers. A crucial aspect of developing effective code generation LLMs is to evaluate these models using a robust benchmark. Evaluation benchmarks with quality issues can provide a false sense of performance. In this work, we conduct the first-of-its-kind study of the quality of prompts within benchmarks used to compare the performance of different code generation models. To conduct this study, we analyzed 3,566 prompts from 9 code generation benchmarks to identify quality issues in them. We also investigated whether fixing the identified quality issues in the benchmarks' prompts affects a model's performance. We also studied memorization issues of the evaluation dataset, which can put into question a benchmark's trustworthiness. We found that code generation evaluation benchmarks mainly focused on Python and coding exercises and had very limited contextual dependencies to challenge the model. These datasets and the developers' prompts suffer from quality issues like spelling and grammatical errors, unclear sentences to express developers' intent, and not using proper documentation style. Fixing all these issues in the benchmarks can lead to a better performance for Python code generation, but not a significant improvement was observed for Java code generation. We also found evidence that GPT-3.5-Turbo and CodeGen-2.5 models may have data contamination issues.

Motivation & Objective

  • To investigate the quality of prompts used in code generation benchmarks, which are critical for evaluating LLMs.
  • To identify common quality issues in prompts that may mislead or hinder code generation models.
  • To assess whether improving prompt quality leads to measurable performance gains in code generation.
  • To examine whether popular benchmarks suffer from test set contamination, undermining evaluation reliability.
  • To compare benchmark prompts with real-world developer prompts to assess representativeness and practical relevance.

Proposed method

  • Systematically analyzed 3,566 prompts from 9 code generation benchmarks, focusing on Python and Java.
  • Classified quality issues into three categories: formatting errors, ambiguous or incorrect behavioral specifications, and extraneous tokens (noise).
  • Applied automated correction techniques to fix spelling, grammar, and documentation style (e.g., standardizing docstrings and JavaDoc).
  • Re-evaluated model performance on both original and cleaned prompts using GPT-3.5-Turbo and CodeGen-2.5.
  • Conducted contamination analysis by checking if model outputs matched known solutions in benchmarks, using similarity metrics and retrieval-based checks.
  • Compared benchmark prompts with real-world developer prompts from ChatGPT interactions to assess realism and quality.

Experimental results

Research questions

  • RQ1RQ1: What types of quality issues are prevalent in prompts used in existing code generation benchmarks?
  • RQ2RQ2: How do these quality issues affect the performance of code generation models?
  • RQ3RQ3: To what extent does improving prompt quality (e.g., fixing grammar and documentation) enhance model performance?
  • RQ4RQ4: Is there empirical evidence of test set contamination in popular code generation benchmarks, particularly for GPT-3.5-Turbo and CodeGen-2.5?
  • RQ5RQ5: How do the quality issues in benchmark prompts compare to those in real-world developer prompts used with LLMs?

Key findings

  • 3,566 prompts from 9 benchmarks were analyzed, revealing widespread issues in formatting, clarity, and documentation style.
  • Fixing spelling, grammar, and standardizing docstrings led to measurable performance improvements in Python code generation, though gains were not significant for Java.
  • Evidence of test set contamination was found in both GPT-3.5-Turbo and CodeGen-2.5, suggesting these models may have memorized benchmark solutions.
  • The benchmarks showed limited contextual dependencies and were heavily skewed toward Python and simple coding exercises.
  • Benchmark prompts were found to be less clear and less professionally styled compared to real-world developer prompts used with ChatGPT.
  • The study highlights that current benchmarks may not reflect real-world development scenarios and could mislead model evaluation.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.