Skip to main content
QUICK REVIEW

[Paper Review] BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructions

Terry Yue Zhuo, Minh Chien Vu|arXiv (Cornell University)|Jun 22, 2024
Model-Driven Software Engineering TechniquesComputer Science15 citations
TL;DR

BigCodeBench benchmarks LLM-based code generation across 139 libraries and 7 domains with complex, tool-using instructions, evaluating 60 LLMs and revealing substantial gaps to human performance (up to 60% Pass@1 on Complete; <50% on Instruct).

ABSTRACT

Task automation has been greatly empowered by the recent advances in Large Language Models (LLMs) via Python code, where the tasks ranging from software engineering development to general-purpose reasoning. While current benchmarks have shown that LLMs can solve tasks using programs like human developers, the majority of their evaluations are limited to short and self-contained algorithmic tasks or standalone function calls. Solving challenging and practical tasks requires the capability of utilizing diverse function calls as tools to efficiently implement functionalities like data analysis and web development. In addition, using multiple tools to solve a task needs compositional reasoning by accurately understanding complex instructions. Fulfilling both of these characteristics can pose a great challenge for LLMs.To assess how well LLMs can solve challenging and practical tasks via programs, we introduce BigCodeBench, a benchmark that challenges LLMs to invoke multiple function calls as tools from 139 libraries and 7 domains for 1,140 fine-grained tasks. To evaluate LLMs rigorously, each task encompasses 5.6 test cases with an average branch coverage of 99%. In addition, we propose a natural-language-oriented variant of BigCodeBench, BigCodeBench-Instruct, that automatically transforms the original docstrings into short instructions only with essential information. Our extensive evaluation of 60 LLMs shows that LLMs are not yet capable of following complex instructions to use function calls precisely, with scores up to 60%, significantly lower than the human performance of 97%. The results underscore the need for further advancements in this area.

Motivation & Objective

  • Motivate evaluation of LLMs on challenging, real-world programming tasks beyond short algorithmic problems.
  • Assess the ability of LLMs to invoke diverse libraries (tools) and follow complex, compositional instructions.
  • Provide two benchmark variants: BigCodeBench-Complete (structured docstrings) and BigCodeBench-Instruct (NL-oriented instructions).
  • Demonstrate correlations with existing benchmarks and identify gaps where current models underperform humans.

Proposed method

  • Construct a large, high-quality execution-based benchmark via human–LLM collaboration across data synthesis, refactoring, testing, and curation.
  • Source tasks using seed examples and enrich them with diverse libraries (139 libraries, 7 domains).
  • Refactor synthesized programs and generate rigorous test cases using a Code Interpreter-enabled GPT-4 session with human-in-the-loop guidance.
  • Apply three-fold human curation (examination, pre-evaluation, cross-checking) to ensure task difficulty and determinism of tests.
  • Transform tasks into an NL-oriented variant (BigCodeBench-Instruct) by converting docstrings prompts into concise instructions.
  • Evaluate LLMs with Pass@K metrics in zero-shot settings, including calibrated analyses to account for missing context.
Figure 1: Programming tasks in BigCodeBench are structured with complex instructions in the docstrings, annotated by experts. The behavior of the solution is evaluated against a class of rigorous test cases with the proper environment setup.
Figure 1: Programming tasks in BigCodeBench are structured with complex instructions in the docstrings, annotated by experts. The behavior of the solution is evaluated against a class of rigorous test cases with the proper environment setup.

Experimental results

Research questions

  • RQ1Can LLMs solve challenging and practical programming tasks requiring diverse tool usage and complex instructions?
  • RQ2How does instruction tuning affect LLMs' ability to follow complex constraints and use tools across domains?
  • RQ3What is the relationship between model size, instruction tuning, and performance on open-ended, multi-library code-generation tasks?

Key findings

  • 60 state-of-the-art LLMs were evaluated on BigCodeBench-Complete and 35 instruction-tuned LLMs on BigCodeBench-Instruct.
  • The best model (GPT-4o) achieved up to 60% Pass@1 on BigCodeBench-Complete and less than 50% on BigCodeBench-Instruct.
  • Calibrated results reveal a strong alignment between Complete and Instruct rankings (Pearson r = 0.982).
  • Instruction-tuned models improve the ability to follow complex constraints, with mean calibrated Pass@1 higher than base models (e.g., 40.7% vs 35.7% for certain comparisons).
  • Models often omit essential import statements in long-context prompts, impacting task success, and domain specialization affects tool-use performance.
  • BigCodeBench shows strong correlations with HumanEval+ and LiveCodeBench, indicating alignment with mainstream benchmarks while revealing unique evaluation aspects.
Figure 2: Each programming task in BigCodeBench is created through a three-stage construction process. The task quality is controlled by the human-LLM collaboration.
Figure 2: Each programming task in BigCodeBench is created through a three-stage construction process. The task quality is controlled by the human-LLM collaboration.

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.