Benchmarks · Coding & software engineering
HumanEval
also: Codex HumanEval
Can a model write a correct, working Python function from a natural-language docstring alone?
OpenAIReleased 7 July 2021Saturated
HumanEval asks a narrow, precise question: given nothing but a function signature and an English description of what it should do, can a model write Python code that actually works? OpenAI introduced it alongside Codex in 2021 as a deliberate departure from earlier code-generation tests, which typically scored output by how closely it resembled a reference solution. HumanEval instead ran the generated code against hidden unit tests — a program either passed or it didn’t, regardless of how it got there.
The original 164-problem set was small by later standards but demanding in 2021: Codex solved 28.8% of problems on a single attempt, and the paper’s finding that sampling 100 attempts and keeping any passing one lifted that to 70.2% shaped how code models were evaluated for years afterward. As general-purpose language models absorbed more code in pretraining, HumanEval scores climbed fast — Claude 2 reached 71.2% in mid-2023, and Claude 3 Opus reported 84.9% less than a year later.
That trajectory is also why HumanEval’s usefulness declined. Its 164 problems and reference solutions have been public and widely mirrored since 2021, making contamination — models having effectively seen the answers during training — a standing concern once scores pushed into the 90s. The benchmark still appears in release reports as a familiar reference point, but the field’s attention has shifted to larger, harder or more contamination-resistant tests of coding ability, from MBPP and BigCodeBench to LiveCodeBench and SWE-bench.
The set
164 hand-written programming problems, each a function signature plus an English docstring describing the task. A solution is scored not by resembling a reference answer but by whether it passes a held-out set of unit tests — the pass@k metric reports the chance that at least one of k sampled completions passes.
Example
Problem HumanEval/0, verbatim: 'def has_close_elements(numbers: List[float], threshold: float) -> bool: Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3) True' — the model must generate the function body, graded only by unit tests hidden from it.github.com
Where it stands
Frontier models now report scores in the low-to-high 90s; because the problems and solutions have circulated on the open web for years, the field treats HumanEval as likely present in pretraining data and largely superseded by harder, contamination-resistant successors such as LiveCodeBench and SWE-bench.
How the top score changed hands
In the timeline · 16 entries
AI2 releases Olmo 3 open frontier model family
AI2 released Olmo 3 (7B, 32B), including a fully open 32B reasoning model, releasing every stage of the model flow from data to deployment.
Open weights & ecosystem · Models & capabilities
Alibaba releases Qwen2.5 model family
Alibaba's release spanned seven sizes from 0.5B to 72B parameters, plus dedicated coding and maths variants, trained on 18 trillion tokens.
Open weights & ecosystem · Models & capabilities
Claude 3.5 Sonnet and Artifacts change how people use chatbots
Priced and sped like Anthropic's mid-tier model, it scored 64% on the company's internal agentic-coding evaluation against 38% for the outgoing flagship.
Models & capabilities
DeepSeek releases DeepSeek-Coder-V2
The 236B-parameter mixture-of-experts model scored 90.2% on HumanEval, edging out GPT-4-Turbo's 88.2%, while running with only 21B parameters active per token.
Open weights & ecosystem · Models & capabilities
LiveCodeBench paper published
Testing 52 models against problems tagged by publication date, the authors found evidence that some scored higher on problems predating their training cutoff.
Benchmarks & progress
Anthropic's Claude 3 takes the frontier from GPT-4
The first time a lab other than OpenAI held the top spot on headline benchmarks, and the start of the small/medium/large release pattern.
Models & capabilities · Labs & people
DeepSeek releases DeepSeek LLM 67B
DeepSeek's first general-purpose open-weight LLM family, 7B and 67B, trained on 2 trillion English/Chinese tokens.
Open weights & ecosystem · Models & capabilities
DeepSeek releases DeepSeek Coder
The 33B version outperformed CodeLlama-34B on coding benchmarks and, once instruction-tuned, beat GPT-3.5-turbo on HumanEval — DeepSeek's first public model release.
Open weights & ecosystem · Models & capabilities
SWE-bench paper published
Built from 2,294 real GitHub issues across 12 Python repositories, the benchmark proved so hard that the best model of the day, Claude 2, solved under 2%.
Benchmarks & progress
Meta releases Code Llama
Released in four sizes up to 70B parameters under Llama 2's licence, the largest variant reportedly matched ChatGPT on the HumanEval coding benchmark.
Open weights & ecosystem
Alibaba open-sources Qwen-7B
The 7-billion-parameter model, pretrained on over 2.2 trillion tokens, was released alongside a chat-tuned variant and pitched against Meta's Llama on benchmark scores.
Open weights & ecosystem · Models & capabilities
Anthropic releases Claude 2
A 100,000-token context window and a jump to 71.2% on the Codex HumanEval coding test, alongside a consumer web app opened to the US and UK.
Models & capabilities
Hugging Face releases StarCoder
The BigCode project released StarCoder, a 15B open code model trained on permissively-licensed repositories, with an OpenRAIL licence.
Open weights & ecosystem · Models & capabilities
OpenAI publishes Codex, an LLM trained on code powering GitHub Copilot
A GPT-3 descendant fine-tuned on public GitHub code solved 28.8% of a new benchmark's problems on the first try, rising to 70.2% with repeated sampling.
Models & capabilities
OpenAI publishes Codex and the HumanEval benchmark
Codex solved 28.8% of HumanEval's Python problems on a single attempt and 70.2% when allowed 100 samples per problem, against 0% for base GPT-3.
Models & capabilities · Benchmarks & progress
GitHub launches Copilot in technical preview
An OpenAI model trained on public code began suggesting whole functions inside the editor — the first mass-market use of a large language model.
Models & capabilities · Culture & impact