CodeApex: A Bilingual Programming Evaluation Benchmark for Large Language Models

Lingyue Fu, Huacan Chai, Shuang Luo, Kounianhua Du, Weiming Zhang +11 more
9/5/2023
15 citations
cs.CLcs.AI
benchmark-dataset

Official code: APEXLAB/CodeApex (51 stars, Python, last commit 2023-09-06). Most starred: microsoftarchive/promptbench, a community implementation (2,816 stars, Python, MIT, last commit 2026-02-20, 55× the official stars). 1 more implementation below.

Abstract

With the emergence of Large Language Models (LLMs), there has been a significant improvement in the programming capabilities of models, attracting growing attention from researchers. Evaluating the programming capabilities of LLMs is crucial as it reflects the multifaceted abilities of LLMs, and it has numerous downstream applications.

Show full abstract

In this paper, we propose CodeApex, a bilingual benchmark dataset focusing on the programming comprehension, code generation, and code correction abilities of LLMs. Programming comprehension task tests LLMs on multiple-choice exam questions covering conceptual understanding, commonsense reasoning, and multi-hop reasoning. The code generation task evaluates LLMs through completing C++ functions based on provided descriptions and prototypes. The code correction task asks LLMs to fix real-world erroneous code segments with different error messages. We evaluate 12 widely used LLMs, including both general-purpose and specialized models. GPT-4 exhibits the best programming capabilities, achieving approximate accuracy of 69%, 54%, and 66% on the three tasks, respectively. Compared to human performance, there is still significant room for improvement in LLM programming. We hope that CodeApex can serve as a reference for evaluating the coding capabilities of LLMs, further promoting their development and growth.

View on arXivView PDF

Code Implementations(2)

Code implementations of this paper
RepositoryTypeStarsLanguageLicenseLast commit
APEXLAB/CodeApexOfficial51Python–2023-09-06
microsoftarchive/promptbenchCommunity2,816PythonMIT2026-02-20
APEXLAB/CodeApexOfficial100%
511PythonSep 4, 20233 years ago
MIT

A unified evaluation framework for large language models

2,816227PythonJun 13, 20239 months agoMIT
adversarial-attacksbenchmarkchatgptevaluationlarge-language-models+3 more

Similar Papers

Cite this paper

@article{fu2023codeapex,
  title  = {CodeApex: A Bilingual Programming Evaluation Benchmark for Large Language Models},
  author = {Lingyue Fu and Huacan Chai and Shuang Luo and Kounianhua Du and Weiming Zhang and Longteng Fan and Jiayi Lei and Renting Rui and Jianghao Lin and Yuchen Fang and Yifan Liu and Jingkuan Wang and Siyuan Qi and Kangning Zhang and Weinan Zhang and Yong Yu},
  year   = {2023},
  eprint = {2309.01940},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2309.01940v4}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2309.01940.svg)](https://codeofpaper.com/paper/2309.01940)

Discussion