# HumanEval

> Canonical: https://skillalmanac.com/glossary/humaneval | Last verified: 2026-11-24 | Index status: not offered to search engines

HumanEval is a code-generation benchmark released with OpenAI's Codex paper: a model gets a function signature and docstring, writes the function, and the result is judged by whether it passes unit tests.

Also called: human eval benchmark, HumanEval benchmark, HumanEval dataset, HumanEval coding benchmark.

## In plain language

HumanEval is a set of small programming exercises, each described in a short note called a docstring. A model has to write the function, and the answer counts as right only if it actually runs and passes hidden checks. That is a fairer test than asking whether the code looks right. But the exercises are short and self-contained, nothing like changing a large existing project, and the set is public, so a model may have seen similar problems. A running tool also has to execute untrusted generated code, which needs a sandbox.

## Technical definition

HumanEval was introduced in 'Evaluating Large Language Models Trained on Code' (Chen et al., arXiv 2107.03374) as a benchmark of programs written from docstrings, judged by functional correctness. The paper also reports that drawing many samples per problem raises the chance that at least one passes. The openai/human-eval repository provides the evaluation harness: completions are saved as JSON Lines with a task_id and a completion, and each is marked passed, timed out or failed. Its README warns that the program exists to run untrusted model-generated code and urges using a security sandbox; the repository is marked deprecated and unmaintained.

## How it shows up when you use agents

HumanEval is an older, small coding test that still turns up in model announcements. It measures whether a model can write one function from a description. An agent in Claude Code or Codex does more: it reads files, runs commands and edits several places. So a HumanEval result tells you little about agent work. This page quotes no scores.

What breaks when this is misunderstood is over-reading a single number. The problems are short and public, and a model may have met similar ones in training. Another lesson is in the repository's own README, which says the harness runs untrusted model-generated code and should be run inside a security sandbox. The same care applies when an agent runs code it just wrote.

Next action: for your own checks, write tests first, let the model write the function, and run it in a [sandbox](/glossary/sandbox). See [LLM benchmark](/glossary/llm-benchmark) for contamination and saturation, and [Coding agent](/glossary/coding-agent) for what agents do beyond this test.

## Common confusions

- **HumanEval versus [SWE-bench](/glossary/swe-bench).** HumanEval is one function from a docstring; SWE-bench is a change inside a real repository.
- **Passing tests versus good code.** Functional correctness means the checks pass. It does not cover readability, security or fit with your codebase.
- **Single attempt versus many samples.** The paper reports that sampling many attempts per problem raises the success rate, so a result depends on how many attempts were allowed.
- **Maintained versus used.** The GitHub README marks the harness as deprecated and unmaintained, though the dataset is still referenced.

## Worked examples in this catalogue

### [llm-eval-test-sets](https://skillalmanac.com/skills/skill-almanac/llm-eval-test-sets)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A validated eval dataset for an LLM feature, with a checker for duplicates, missing graders, imbalance and leakage.

Why it exercises the concept: HumanEval pairs tasks with automatic graders. This skill helps you build the same pairing for your own cases and checks for leakage, a known risk with public sets.

### [skill-authoring-and-evals](https://skillalmanac.com/skills/skill-almanac/skill-authoring-and-evals)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A workflow that writes a SKILL.md from what a plain agent gets wrong, then proves it works with trigger and with-versus-without evals.

Why it exercises the concept: It uses the same idea as functional-correctness testing: run the work, check the outcome, compare with and without the change.

### [Best Claude skills, ranked by measured score](https://skillalmanac.com/learn/best-claude-skills-by-measured-score)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A ranking of catalogue skills that have a recorded efficacy verdict, with an explanation of what the score and verdict mean and how far to trust them.

Why it exercises the concept: It shows the caveats to apply to any benchmark number: small samples and the same model family running and grading.

## Related terms

- [LLM benchmark](https://skillalmanac.com/glossary/llm-benchmark.md)
- [Large language model (LLM)](https://skillalmanac.com/glossary/large-language-model.md)
- [Coding agent](https://skillalmanac.com/glossary/coding-agent.md)
- [Sandbox](https://skillalmanac.com/glossary/sandbox.md)
- [LiveCodeBench](https://skillalmanac.com/glossary/livecodebench.md)

## Sources

- [Evaluating Large Language Models Trained on Code](https://arxiv.org/abs/2107.03374), arXiv (Chen et al.) (accessed 2026-11-24)
- [openai/human-eval: Code for the paper Evaluating Large Language Models Trained on Code](https://github.com/openai/human-eval), GitHub (OpenAI) (accessed 2026-11-24)

Definitions are written by Skill Almanac from the sources above and checked against them on 2026-11-24. [Glossary index](https://skillalmanac.com/glossary.md).
