BigCodeBench

On this page 7

BigCodeBench is a code generation benchmark that measures how well large language models solve practical, library-heavy Python programming tasks, each verified by executing unit tests. In AI for coding, it was introduced in 2024 by researchers from the BigCode community to address a weakness of earlier benchmarks: short, self-contained puzzles that say little about real software work with many APIs.

The benchmark contains 1,140 function-level tasks that together call functions from 139 libraries across seven domains, from data analysis and visualization to networking and cryptography. A model passes a task only when its code runs and satisfies every test, so the score reflects functional correctness rather than textual similarity.

How BigCodeBench tasks are built and scored

Each task gives the model a function signature with a detailed docstring or an equivalent natural-language instruction, and the model must write the function body. The authors created the tasks through a human and LLM collaboration: a model drafted programs from seed examples, and expert annotators refined them, wrote tests and removed ambiguity.

Tests run in an isolated execution sandbox with the required packages installed. Every task has on average about 5.6 test cases and reaches roughly 99 percent branch coverage, which makes accidental passes far less likely than in benchmarks with one or two assertions. Tests frequently use mocking, so code that touches files, networks or system time can be checked deterministically.

The main metric is pass@1 under greedy decoding: the share of tasks solved by a single generated answer. The leaderboard also reports a calibrated pass@1, which restores missing import statements and boilerplate that models sometimes omit, separating reasoning failures from trivial formatting errors.

Splits, subsets and task domains

BigCodeBench is evaluated in two prompt styles and has a harder subset, summarized in the table below.

VariantPrompt given to the modelWhat it tests
CompleteSignature plus full docstring with examplesCode completion from structured specifications
InstructShorter natural-language instructionFollowing conversational requests without a docstring
Hard subsetAbout 148 selected difficult tasksFast evaluation on demanding, realistic problems
Full setAll 1,140 tasksBroad coverage across domains and libraries
Main variants of the benchmark

The task domains reflect what working developers actually do. Standard library and data science packages such as pandas, NumPy and Matplotlib appear most often, while smaller groups of tasks require cryptography, HTTP requests or operating system calls.

DomainTypical librariesExample task
ComputationNumPy, SciPy, pandasNormalize columns and compute statistics
VisualizationMatplotlib, seabornPlot a histogram and return the axes
Systemos, subprocess, shutilArchive files matching a pattern
Networkrequests, socketFetch a page and parse links
Cryptographyhashlib, cryptographySign data and verify a signature
Timedatetime, pytzConvert timestamps between time zones
Task domains and typical libraries

How BigCodeBench differs from other coding benchmarks

BigCodeBench sits between algorithmic puzzle benchmarks and repository-level agent benchmarks. It keeps the simplicity of a single function but adds the compositional difficulty of combining several APIs correctly.

BenchmarkTask scopeMain skill measured
HumanEval164 short Python functionsBasic algorithmic reasoning
MBPPAbout 1,000 entry-level problemsSimple programming from descriptions
BigCodeBench1,140 library-heavy functionsUsing many APIs together correctly
LiveCodeBenchRecent contest problemsReasoning on contamination-resistant tasks
SWE-benchReal repository issuesEditing existing codebases as an agent
Terminal-BenchCommand-line environmentsMulti-step agentic work in a shell
BigCodeBench compared with related benchmarks

Because HumanEval and MBPP scores of frontier models approach their saturation ceiling, they no longer separate strong systems well. On BigCodeBench, the best models at release solved roughly 60 percent of Complete tasks, while the authors estimated human performance near 97 percent, leaving clear room for progress.

Running BigCodeBench in practice

The benchmark ships as an open-source evaluation harness with a public dataset, so any team can reproduce leaderboard numbers. A typical run has two stages: the model generates solutions for every task, and the harness then executes those solutions in a container with the pinned library versions and a time limit per task.

Settings strongly affect results, so reported scores should state them. The table lists the parameters that most often explain differences between published numbers.

SettingCommon choiceEffect on the score
Decoding strategyGreedy, temperature 0Makes pass@1 reproducible
Sample countOne for pass@1, more for pass@5Higher k raises the reported rate
CalibrationOn for leaderboard comparisonsPrevents losses from missing imports
Prompt templateModel’s own chat formatWrong templates can cost many points
Time limitFixed seconds per taskSlow but correct code may fail
Evaluation settings that change scores

Teams evaluating models for internal use often run only the Hard subset first, because it costs far less compute while preserving most of the ranking between models, and they run the full set only for the final candidates.

Interpreting results and known limitations

Scores are most informative when compared within the same split and metric. Instruct scores are typically several points lower than Complete scores for the same model, because short instructions omit details that a docstring would specify.

  • Python only: the benchmark does not measure other languages or build systems.
  • Function scope: it does not test navigating a large repository or multi-file edits.
  • Contamination risk: public tasks may leak into training data over time.
  • Library versions: results depend on the pinned package versions in the sandbox.
  • Specification noise: a few tasks contain ambiguous expectations that penalize valid solutions.

Practitioners therefore treat BigCodeBench as one signal among several, combined with agentic benchmarks and in-house evaluations on their own code, rather than as a single verdict on a coding assistant.

In everyday language

BigCodeBench is an exam for AI models that write code. It contains more than a thousand small programming jobs. Each job asks for one useful piece of a program, such as reading a file or drawing a chart.

The answers are not graded by reading them. They are run against automatic tests. If the code works, the model gets the point. Older exams were like simple math drills. BigCodeBench is closer to real office work, where a programmer must combine many ready-made tools.

Seen in the real world

An engineering team at a financial software company must choose a code model for an internal assistant that runs on its own servers. It shortlists three open-weight models of similar size and runs the BigCodeBench Hard subset in the official sandbox, using both the Complete and Instruct splits.

One model scores well on HumanEval but drops sharply on Instruct tasks involving pandas and datetime handling, which match the team’s daily work. Another keeps a steady lead of about eight points on both splits. The team confirms the result with fifty tasks taken from its own codebase, sees the same ranking, and deploys the second model. Developers later report fewer broken data transformations in suggested code.