Natural2Code

NaturalCodeBench (NCB) is a challenging code benchmark designed to mirror the complexity and variety of real-world coding tasks. It comprises 402 high-quality problems in Python and Java, selected from natural user queries from online coding services, covering 6 different domains.

Gemini 2.0 Flash from Google currently leads the Natural2Code leaderboard with a score of 0.929 across 8 evaluated AI models.

Paper
About this benchmark

What Natural2Code measures

Natural2Code is a text benchmark that evaluates large language models on reasoning and general tasks. LLM Stats tracks 8 models on this benchmark, with a maximum possible score of 1. Current average across reported models is 0.8, with the leader reaching 0.9.

Compare leaders on the best AI for reasoning and best AI for general leaderboards.

Publication

Paper
NaturalCodeBench: Examining Coding Performance Mismatch on HumanEval and Natural User Prompts
Authors
Shudan Zhang, Hanlin Zhao, Xiao Liu, Qinkai Zheng, and 5 others
Published

Abstract

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.

GoogleGemini 2.0 Flash leads with 92.9%, followed by GoogleGemini 1.5 Pro at 85.4% and GoogleGemma 3 27B at 84.5%.

Progress Over Time

Interactive timeline showing model performance evolution on Natural2Code

State-of-the-art frontier
Open
Proprietary

Natural2Code Leaderboard

8 models
ContextCostLicense
1
2
327B
412B
5
68B
74B
81B
Notice missing or incorrect data?

FAQ

Common questions about Natural2Code.

What is the Natural2Code benchmark?

NaturalCodeBench (NCB) is a challenging code benchmark designed to mirror the complexity and variety of real-world coding tasks. It comprises 402 high-quality problems in Python and Java, selected from natural user queries from online coding services, covering 6 different domains.

What is the Natural2Code leaderboard?

The Natural2Code leaderboard ranks 8 AI models based on their performance on this benchmark. Currently, Gemini 2.0 Flash by Google leads with a score of 0.929. The average score across all models is 0.781.

What is the highest Natural2Code score?

The highest Natural2Code score is 0.929, achieved by Gemini 2.0 Flash from Google.

How many models are evaluated on Natural2Code?

8 models have been evaluated on the Natural2Code benchmark, with 0 verified results and 8 self-reported results.

Where can I find the Natural2Code paper?

The Natural2Code paper is available at https://arxiv.org/abs/2405.04520. The paper details the methodology, dataset construction, and evaluation criteria.

What categories does Natural2Code cover?

Natural2Code is categorized under reasoning and general. The benchmark evaluates text models.

What is the best open-source model on Natural2Code?

Gemma 3 27B by Google is the top-ranked open-source model on Natural2Code, with a score of 0.845 (rank #3).

How recent are the Natural2Code leaderboard results?

The Natural2Code leaderboard was last updated in June 2026 and currently includes 8 evaluated models.

More evaluations to explore

Related benchmarks in the same category

View all reasoning
GPQA

A challenging dataset of 448 multiple-choice questions written by domain experts in biology, physics, and chemistry. Questions are Google-proof and extremely difficult, with PhD experts reaching 65% accuracy.

reasoning
224 models
MMLU-Pro

A more robust and challenging multi-task language understanding benchmark that extends MMLU by expanding multiple-choice options from 4 to 10, eliminating trivial questions, and focusing on reasoning-intensive tasks. Features over 12,000 curated questions across 14 domains and causes a 16-33% accuracy drop compared to original MMLU.

reasoning
127 models
AIME 2025

All 30 problems from the 2025 American Invitational Mathematics Examination (AIME I and AIME II), testing olympiad-level mathematical reasoning with integer answers from 000-999. Used as an AI benchmark to evaluate large language models' ability to solve complex mathematical problems requiring multi-step logical deductions and structured symbolic reasoning.

reasoning
114 models
MMLU

Massive Multitask Language Understanding benchmark testing knowledge across 57 diverse subjects including STEM, humanities, social sciences, and professional domains

reasoning
100 models
SWE-Bench Verified

A verified subset of 500 software engineering problems from real GitHub issues, validated by human annotators for evaluating language models' ability to resolve real-world coding issues by generating patches for Python codebases.

reasoning
100 models
Humanity's Last Exam

Humanity's Last Exam (HLE) is a multi-modal academic benchmark with 2,500 questions across mathematics, humanities, and natural sciences, designed to test LLM capabilities at the frontier of human knowledge with unambiguous, verifiable solutions

reasoningmultimodal
82 models