Natural2Code
Progress Over Time
Interactive timeline showing model performance evolution on Natural2Code
Natural2Code Leaderboard
| Context | Cost | License | ||||
|---|---|---|---|---|---|---|
| 1 | Google | — | — | — | ||
| 2 | Google | — | — | — | ||
| 3 | Google | 27B | — | — | ||
| 4 | Google | 12B | — | — | ||
| 5 | Google | — | — | — | ||
| 6 | Google | 8B | — | — | ||
| 7 | Google | 4B | — | — | ||
| 8 | Google | 1B | — | — |
What is 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.
Natural2Code is a text benchmark evaluating models on reasoning and general tasks. LLM Stats tracks 8 models on this benchmark, scored on a 0–1 scale. The current average is 0.8, with the leader at 0.9.
Compare leaders on the best AI for reasoning and best AI for general leaderboards.
Current leaders
Gemini 2.0 Flash from Google currently leads the Natural2Code leaderboard with a score of 0.929 across 8 evaluated AI models.
Source paper
- Title
- NaturalCodeBench: Examining Coding Performance Mismatch on HumanEval and Natural User Prompts
- Authors
- Shudan Zhang, Hanlin Zhao, Xiao Liu, Qinkai Zheng, and 5 others
- Published
- arXiv
- 2405.04520
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.
FAQ
Common questions about the Natural2Code benchmark and leaderboard.