HumanEval is the go-to code generation benchmark. Describe the task it gives the model and how it decides if the answer is correct.
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
HumanEval gives the model 164 Python function-completion tasks and checks correctness by running unit tests, reporting pass@k as the primary metric.
Imagine a cooking competition where the judge does not taste the food or care how it looks. Instead, the judge runs the dish through a machine that checks 'Does it have the right temperature? The right ingredients? The right texture?' If every check passes, the dish is correct. If any check fails, the dish is wrong. HumanEval works the same way with code. The model writes a Python function, and a set of automated tests checks whether the function produces the right outputs for every given input. No partial credit, no style points.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
5 min: describe the 164-problem function-completion setup, explain execution-based evaluation with unit tests, define pass@k with the unbiased estimator, discuss limitations (small set, simple problems, no style scoring), and name HumanEval+ and SWE-bench as extensions.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Assuming HumanEval measures code quality or style when it only checks functional correctness through unit test execution.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.