MHPP: Exploring the Capabilities and Limitations of Language Models Beyond Basic Code Generation

Jianbo Dai, Jianqiao Lu, Yunlong Feng, Guangtao Zeng, Rongju Ruan +4 more
5/19/2024
cs.CL

Official code: SparksofAGI/MHPP (35 stars, last commit 2025-09-14).

Abstract

Recent advancements in large language models (LLMs) have greatly improved code generation, specifically at the function level. For instance, GPT-4o has achieved a 91.0\% pass rate on HumanEval. However, this draws into question the adequacy of existing benchmarks in thoroughly assessing function-level code generation capabilities. Our study analyzed two common benchmarks, HumanEval and MBPP, and found that these might not thoroughly evaluate LLMs' code generation capacities due to limitations in quality, difficulty, and granularity. To resolve this, we introduce the Mostly Hard Python Problems (MHPP) dataset, consisting of 210 unique human-curated problems. By focusing on the combination of natural language and code reasoning, MHPP gauges LLMs' abilities to comprehend specifications and restrictions, engage in multi-step reasoning, and apply coding knowledge effectively. Initial evaluations of 26 LLMs using MHPP showed many high-performing models on HumanEval failed to achieve similar success on MHPP. Moreover, MHPP highlighted various previously undiscovered limitations within various LLMs, leading us to believe that it could pave the way for a better understanding of LLMs' capabilities and limitations. MHPP, evaluation pipeline, and leaderboard can be found in https://github.com/SparksofAGI/MHPP.

View on arXivView PDF

Code Implementations(1)

SparksofAGI/MHPPOfficial100%
350May 12, 20241 years ago

Similar Papers

Cite this paper

@article{dai2024mhpp,
  title  = {MHPP: Exploring the Capabilities and Limitations of Language Models Beyond Basic Code Generation},
  author = {Jianbo Dai and Jianqiao Lu and Yunlong Feng and Guangtao Zeng and Rongju Ruan and Ming Cheng and Dong Huang and Haochen Tan and Zhijiang Guo},
  year   = {2024},
  eprint = {2405.11430},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2405.11430v3}
}

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/2405.11430.svg)](https://codeofpaper.com/paper/2405.11430)

Discussion