Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generation

AI-generated keywords: Program Synthesis

AI-generated Key Points

The license of the paper does not allow us to build upon its content and the key points are generated using the paper metadata rather than the full article.

  • Program synthesis using Large Language Models (LLMs) to generate code based on user intent written in natural language is a topic of interest.
  • Evaluation of LLMs' performance in code synthesis has been limited by the quantity and quality of test-cases in existing datasets, raising concerns about functional correctness.
  • Jiawei Liu and colleagues propose EvalPlus, a benchmarking framework that rigorously evaluates the functional correctness of LLM-synthesized code.
  • EvalPlus uses an automatic input generation step to produce large amounts of new test inputs using both LLM-based and mutation-based input generators.
  • The authors extend the popular HUMANEVAL benchmark and build HUMANEVAL+ with 81x additionally generated tests.
  • Extensive evaluation across 14 popular LLMs demonstrates that HUMANEVAL+ is able to catch significant amounts of previously undetected wrong code synthesized by LLMs, reducing the pass@k by 15.1% on average!
  • Several incorrect ground-truth implementations were found in HUMANEVAL as well.
  • This research highlights the importance of rigorous testing when evaluating LLM-generated code and provides a framework for future evaluations to ensure that synthesized code is functionally correct.
Also access our AI generated: Comprehensive summary, Lay summary, Blog-like article; or ask questions about this paper to our AI assistant.

Authors: Jiawei Liu, Chunqiu Steven Xia, Yuyao Wang, Lingming Zhang

Abstract: Program synthesis has been long studied with recent approaches focused on directly using the power of Large Language Models (LLMs) to generate code according to user intent written in natural language. Code evaluation datasets, containing curated synthesis problems with input/output test-cases, are used to measure the performance of various LLMs on code synthesis. However, test-cases in these datasets can be limited in both quantity and quality for fully assessing the functional correctness of the generated code. Such limitation in the existing benchmarks begs the following question: In the era of LLMs, is the code generated really correct? To answer this, we propose EvalPlus -- a code synthesis benchmarking framework to rigorously evaluate the functional correctness of LLM-synthesized code. In short, EvalPlus takes in the base evaluation dataset and uses an automatic input generation step to produce and diversify large amounts of new test inputs using both LLM-based and mutation-based input generators to further validate the synthesized code. We extend the popular HUMANEVAL benchmark and build HUMANEVAL+ with 81x additionally generated tests. Our extensive evaluation across 14 popular LLMs demonstrates that HUMANEVAL+ is able to catch significant amounts of previously undetected wrong code synthesized by LLMs, reducing the pass@k by 15.1% on average! Moreover, we even found several incorrect ground-truth implementations in HUMANEVAL. Our work not only indicates that prior popular code synthesis evaluation results do not accurately reflect the true performance of LLMs for code synthesis but also opens up a new direction to improve programming benchmarks through automated test input generation.

Submitted to arXiv on 02 May. 2023

Ask questions about this paper to our AI assistant

You can also chat with multiple papers at once here.

The license of the paper does not allow us to build upon its content and the AI assistant only knows about the paper metadata rather than the full article.

AI assistant instructions?

Results of the summarizing process for the arXiv paper: 2305.01210v1

This paper's license doesn't allow us to build upon its content and the summarizing process is here made with the paper's metadata rather than the article.

Program synthesis has been a topic of interest for a long time, and recent approaches have focused on using Large Language Models (LLMs) to generate code based on user intent written in natural language. However, the evaluation of LLMs' performance in code synthesis has been limited by the quantity and quality of test-cases in existing datasets. This raises concerns about the functional correctness of the generated code. To address this issue, Jiawei Liu and colleagues propose EvalPlus, a benchmarking framework that rigorously evaluates the functional correctness of LLM-synthesized code. EvalPlus takes an existing evaluation dataset and uses an automatic input generation step to produce large amounts of new test inputs using both LLM-based and mutation-based input generators. The authors extend the popular HUMANEVAL benchmark and build HUMANEVAL+ with 81x additionally generated tests. Their extensive evaluation across 14 popular LLMs demonstrates that HUMANEVAL+ is able to catch significant amounts of previously undetected wrong code synthesized by LLMs, reducing the pass@k by 15.1% on average! Moreover, they even found several incorrect ground-truth implementations in HUMANEVAL. The authors' work not only indicates that prior popular code synthesis evaluation results do not accurately reflect the true performance of LLMs for code synthesis but also opens up a new direction to improve programming benchmarks through automated test input generation. This research highlights the importance of rigorous testing when evaluating LLM-generated code and provides a framework for future evaluations to ensure that synthesized code is functionally correct.
Created on 04 May. 2023

Assess the quality of the AI-generated content by voting

Score: 0

Why do we need votes?

Votes are used to determine whether we need to re-run our summarizing tools. If the count reaches -10, our tools can be restarted.

The previous summary was created more than a year ago and can be re-run (if necessary) by clicking on the Run button below.

The license of this specific paper does not allow us to build upon its content and the summarizing tools will be run using the paper metadata rather than the full article. However, it still does a good job, and you can also try our tools on papers with more open licenses.

Similar papers summarized with our AI tools

Navigate through even more similar papers through a

tree representation

Look for similar papers (in beta version)

By clicking on the button above, our algorithm will scan all papers in our database to find the closest based on the contents of the full papers and not just on metadata. Please note that it only works for papers that we have generated summaries for and you can rerun it from time to time to get a more accurate result while our database grows.

Disclaimer: The AI-based summarization tool and virtual assistant provided on this website may not always provide accurate and complete summaries or responses. We encourage you to carefully review and evaluate the generated content to ensure its quality and relevance to your needs.