NaturalCodeBench
Models solve 402 Python and Java problems taken from real user queries to online coding services in 6 domains. Semi-automatically built tests check each solution.
Prompts come in Chinese and English versions. Labs report a total over both.
- Made by
- Tsinghua University and Zhipu AI (THUDM)
- Released
- May 2024
- Kind
- Function-level problems
- Level
- University
- Scored
- Checked automatically
- Answers
- Code
- Strongest model tested
- Claude 3 Opus #172 on the capability index
- Last in a launch post
- July 2025, dropped before it saturated
- Last model added
- August 2025
- Scores refreshed
- November 12th, 2026
In the authors’ words
Large language models (LLMs) have manifested strong ability to generate codes for productive activities. However, current benchmarks for code synthesis, such as HumanEval, MBPP, and DS-1000, are predominantly oriented towards introductory tasks on algorithm and data science, insufficiently satisfying challenging requirements prevalent in real-world coding. To fill this gap, we propose NaturalCodeBench (NCB), a challenging code benchmark designed to mirror the complexity and variety of scenarios in real coding tasks. NCB comprises 402 high-quality problems in Python and Java, meticulously selected from natural user queries from online coding services, covering 6 different domains. Noting the extraordinary difficulty in creating testing cases for real-world queries, we also introduce a semi-automated pipeline to enhance the efficiency of test case construction. Comparing with manual solutions, it achieves an efficiency increase of more than 4 times. Our systematic experiments on 39 LLMs find that performance gaps on NCB between models with close HumanEval scores could still be significant, indicating a lack of focus on practical code synthesis scenarios or over-specified optimization on HumanEval. On the other hand, even the best-performing GPT-4 is still far from satisfying on NCB. The evaluation toolkit and development set are available at https://github.com/THUDM/NaturalCodeBench.
GPT-4 (snapshot unspecified) tops the leaderboard with 52.8%
Best score per entry from the benchmark's own leaderboard, read on November 12th, 2026. Where a model ran with several settings or harnesses, we keep its best. Names in gray aren't in our model list: fine-tunes, agent systems, products and older models. They don't count toward leaders. The best model we track is Claude 3 Opus, at 48.3%.
Seed-Coder-8B-Instruct leads with 49.6%, claims included
Best score per model from every source, including labs’ own numbers and claims Epoch AI collected from reports and papers. Labs pick their own settings, so a claim can beat an independent run of the same model.
The newest model with a score here came out in April 2024, and nobody has tested a newer one. Among the 20 highest-ranked models on the capability index, these have no score yet:
- Claude Fable 5.2
-
Gemini 4 Carbon
- GPT-6 Astra
- Claude Opus 5.5
- and 16 more
- 52.8 GPT-4 (snapshot unspecified)
- 52.5 GPT-4-Turbo-0125
- 51.5 GPT-4-Turbo-1106
- 48.3 Claude 3 Opus
- 43.9 ChatGLM-4
- 43.0 Deepseek-Coder-Instruct 33B
- 42.3 Gemini-1.5-Pro (snapshot unspecified)
- 40.7 GPT-3.5-Turbo (snapshot unspecified)
- 38.9 Claude 3 Sonnet
- 37.1 Llama-3-Instruct 70B
- 36.2 Claude 3 Haiku
- 35.1 Deepseek-Coder-Instruct 6.7B
- 34.4 Claude 2.1
- 33.2 Deepseek-Chat 67B
- 32.6 Codellama-Instruct 70B
- 32.3 Phind-Codellama 34B
- 32.2
Qwen1.5-110B
- 31.9 CodeGeeX3
- 27.9 Qwen-Chat 72B
- 24.8 WizardCoder 34B
- 24.7 Llama-3-Instruct 8B
- 23.9 Deepseek-Coder-Instruct 1.3B
- 22.7 WizardCoder 15B
- 21.8 Codellama-Instruct 34B
- 20.8 Codellama-Instruct 13B
- 18.4 Codellama-Instruct 7B
- 13.2 StarCoder 15.5B
- 13.0 Qwen-Chat 7B
- 12.0 Mistral-Instruct 7B
- 10.9 Deepseek-Chat 7B
- 6.90 CodeGen2 16B
- 5.00 CodeGen2 7B
- 4.20 Phi 2.7B
- 3.90 CodeGen 16B
- 1.50 CodeGen 2B
- 1.50 CodeGen 6B
- 1.20 Phi 1.3B
- 0.80 CodeGen2 3.7B
- 0.0 CodeGen2 1B
- 1 GPT-4 (snapshot unspecified) 52.8%
- 2 GPT-4-Turbo-0125 52.5%
- 3 GPT-4-Turbo-1106 51.5%
- 4 Claude 3 Opus 48.3%
- 5 ChatGLM-4 43.9%
- 6 Deepseek-Coder-Instruct 33B 43%
- 7 Gemini-1.5-Pro (snapshot unspecified) 42.3%
- 8 GPT-3.5-Turbo (snapshot unspecified) 40.7%
- 9 Claude 3 Sonnet 38.9%
- 10 Llama-3-Instruct 70B 37.1%
- 11 Claude 3 Haiku 36.2%
- 12 Deepseek-Coder-Instruct 6.7B 35.1%
- 13 Claude 2.1 34.4%
- 14 Deepseek-Chat 67B 33.2%
- 15 Codellama-Instruct 70B 32.6%
- 16 Phind-Codellama 34B 32.3%
- 17
Qwen1.5-110B 32.2%
- 18 CodeGeeX3 31.9%
- 19 Qwen-Chat 72B 27.9%
- 20 WizardCoder 34B 24.8%
- 21 Llama-3-Instruct 8B 24.7%
- 22 Deepseek-Coder-Instruct 1.3B 23.9%
- 23 WizardCoder 15B 22.7%
- 24 Codellama-Instruct 34B 21.8%
- 25 Codellama-Instruct 13B 20.8%
- 26 Codellama-Instruct 7B 18.4%
- 27 StarCoder 15.5B 13.2%
- 28 Qwen-Chat 7B 13%
- 29 Mistral-Instruct 7B 12%
- 30 Deepseek-Chat 7B 10.9%
- 31 CodeGen2 16B 6.90%
- 32 CodeGen2 7B 5.00%
- 33 Phi 2.7B 4.20%
- 34 CodeGen 16B 3.90%
- 35 CodeGen 2B 1.50%
- 36 CodeGen 6B 1.50%
- 37 Phi 1.3B 1.20%
- 38 CodeGen2 3.7B 0.80%
- 39 CodeGen2 1B 0%
Source: Official NaturalCodeBench leaderboard
- 1
Seed-Coder-8B-Instruct 49.6%
- 2 Claude 3 Opus 48.3%
- 3
Seed Diffusion Preview 42.2%
- 4 Claude 3 Sonnet 38.9%
- 5 Claude 3 Haiku 36.2%
- 6 Claude 2.1 34.4%
- 7
Qwen1.5-110B 32.2%
Sources: Labs’ model cards and official NaturalCodeBench leaderboard
| # | Entry | Score | Setting | Date | Source |
|---|---|---|---|---|---|
| 1 | GPT-4 (snapshot unspecified) | 52.8% | Official leaderboard | ||
| 2 | GPT-4-Turbo-0125 | 52.5% | Official leaderboard | ||
| 3 | GPT-4-Turbo-1106 | 51.5% | Official leaderboard | ||
| 4 | Claude 3 Opus | 48.3% | Feb 2024 | Official leaderboard | |
| 5 | ChatGLM-4 | 43.9% | Official leaderboard | ||
| 6 | Deepseek-Coder-Instruct 33B | 43% | Official leaderboard | ||
| 7 | Gemini-1.5-Pro (snapshot unspecified) | 42.3% | Official leaderboard | ||
| 8 | GPT-3.5-Turbo (snapshot unspecified) | 40.7% | Official leaderboard | ||
| 9 | Claude 3 Sonnet | 38.9% | Feb 2024 | Official leaderboard | |
| 10 | Llama-3-Instruct 70B | 37.1% | Official leaderboard | ||
| 11 | Claude 3 Haiku | 36.2% | Mar 2024 | Official leaderboard | |
| 12 | Deepseek-Coder-Instruct 6.7B | 35.1% | Official leaderboard | ||
| 13 | Claude 2.1 | 34.4% | Nov 2023 | Official leaderboard | |
| 14 | Deepseek-Chat 67B | 33.2% | Official leaderboard | ||
| 15 | Codellama-Instruct 70B | 32.6% | Official leaderboard | ||
| 16 | Phind-Codellama 34B | 32.3% | Official leaderboard | ||
| 17 | | 32.2% | Apr 2024 | Official leaderboard | |
| 18 | CodeGeeX3 | 31.9% | Official leaderboard | ||
| 19 | Qwen-Chat 72B | 27.9% | Official leaderboard | ||
| 20 | WizardCoder 34B | 24.8% | Official leaderboard | ||
| 21 | Llama-3-Instruct 8B | 24.7% | Official leaderboard | ||
| 22 | Deepseek-Coder-Instruct 1.3B | 23.9% | Official leaderboard | ||
| 23 | WizardCoder 15B | 22.7% | Official leaderboard | ||
| 24 | Codellama-Instruct 34B | 21.8% | Official leaderboard | ||
| 25 | Codellama-Instruct 13B | 20.8% | Official leaderboard | ||
| 26 | Codellama-Instruct 7B | 18.4% | Official leaderboard | ||
| 27 | StarCoder 15.5B | 13.2% | Official leaderboard | ||
| 28 | Qwen-Chat 7B | 13% | Official leaderboard | ||
| 29 | Mistral-Instruct 7B | 12% | Official leaderboard | ||
| 30 | Deepseek-Chat 7B | 10.9% | Official leaderboard | ||
| 31 | CodeGen2 16B | 6.90% | Official leaderboard | ||
| 32 | CodeGen2 7B | 5.00% | Official leaderboard | ||
| 33 | Phi 2.7B | 4.20% | Official leaderboard | ||
| 34 | CodeGen 16B | 3.90% | Official leaderboard | ||
| 35 | CodeGen 2B | 1.50% | Official leaderboard | ||
| 36 | CodeGen 6B | 1.50% | Official leaderboard | ||
| 37 | Phi 1.3B | 1.20% | Official leaderboard | ||
| 38 | CodeGen2 3.7B | 0.80% | Official leaderboard | ||
| 39 | CodeGen2 1B | 0% | Official leaderboard |
| # | Model | Score | Setting | Date | Source |
|---|---|---|---|---|---|
| 1 | | 49.6% | Jun 2025 | Lab model card | |
| 2 | Claude 3 Opus | 48.3% | Feb 2024 | Official leaderboard | |
| 3 | | 42.2% | Jul 2025 | Lab model card | |
| 4 | Claude 3 Sonnet | 38.9% | Feb 2024 | Official leaderboard | |
| 5 | Claude 3 Haiku | 36.2% | Mar 2024 | Official leaderboard | |
| 6 | Claude 2.1 | 34.4% | Nov 2023 | Official leaderboard | |
| 7 | | 32.2% | Apr 2024 | Official leaderboard |
Labs report scores for 2 models in their cards. Switch the scores above to rank them together.
Number one over time 2 models have held number one with claims included since its release in May 2024
Lab claims count from the day the card came out, independent runs from the model’s release. We draw one row each for the benchmark’s own leaderboard and what labs claim in their cards.
Sources: Official NaturalCodeBench leaderboard and labs’ model cards
Scores over time
All the scores we have, one dot each, so a model tested at several settings appears more than once.
Sources: Official NaturalCodeBench leaderboard and labs’ model cards
No launch post has listed it since July 2025
Launch posts from every lab that has listed it, one tick per post. Tall colored ticks include it, and short gray ones leave it out.
| Date | Launch post | Score | As the post writes it |
|---|---|---|---|
| Jul 31, 2025 | 42.2 | NaturalCodeBench Total |
2 system cards report it, from 1 lab
Besides launch posts, we read the system cards, model cards and technical reports labs publish with a release. They report far more, including safety and frontier-risk tests.
| Date | Document | Score | As the document writes it | Section |
|---|---|---|---|---|
| Aug 4, 2025 | | 42.2 | NaturalCodeBench Total, NCB (zh) 45.8, NCB (en) 38.6 (Table 3) | Capabilities |
| Jun 4, 2025 | | 49.6 | NaturalCodeBench Total (Table 9). NCB (zh) 50.7, NCB (en) 48.6 | Capabilities |
More in Coding
- SWE-bench Verified In use 500 human-validated GitHub issues from 12 Python repos. Agent writes a patch that must pass hidden tests. Claude Opus 4.7 83.5%
- LiveCodeBench v6 In use Competitive programming problems collected after model cutoffs from LeetCode, AtCoder, Codeforces. Scored pass@1 on hidden tests.
DeepSeek-V4-Pro 93.5%
- SWE-bench Multilingual In use 300 GitHub-issue tasks across nine programming languages in SWE-bench format. Patch graded by repository tests. Claude Fable 5.2 96.6%
- DeepSWE In use 113 original long-horizon engineering tasks across 91 repos and five languages, written from scratch. Hand-written verifiers accept alternative solutions. GPT-6 Astra 74.1%
- SciCode In use Scientist-curated research coding problems split into subproblems across natural sciences. Code checked against test cases.
Seed2.1 Pro 59.8%
- Codeforces rating In use Model solves recent Codeforces contest problems. An Elo-style rating is computed from simulated contest performance.
DeepSeek V4.1 Flash 3,471