LongCodeBench

LongCodeBench evaluates the code understanding and comprehension abilities of large language models at very long context windows, scaling up to 1M tokens. It tests whether models can reason about extensive codebases provided in a single prompt by answering multiple-choice questions about the code.

Nova 2 Lite from Amazon currently leads the LongCodeBench leaderboard with a score of 0.840 across 2 evaluated AI models.

Paper
About this benchmark

What LongCodeBench measures

LongCodeBench is a text benchmark that evaluates large language models on long context, reasoning, and coding tasks. LLM Stats tracks 2 models on this benchmark, with a maximum possible score of 1. Current average across reported models is 0.8, with the leader reaching 0.8.

Compare leaders on the best AI for long context, best AI for reasoning and best AI for coding leaderboards.

Publication

Paper
LongCodeBench: Evaluating Coding LLMs at 1M Context Windows
Authors
Stefano Rando, Luca Romani, Alessio Sampieri, Luca Franco, and 4 others
Published

Abstract

Context lengths for models have grown rapidly, from thousands to millions of tokens in just a few years. The extreme context sizes of modern long-context models have made it difficult to construct realistic long-context benchmarks -- not only due to the cost of collecting million-context tasks but also in identifying realistic scenarios that require significant contexts. We identify code comprehension and repair as a natural testbed and challenge task for long-context models and introduce LongCodeBench (LCB), a benchmark to test LLM coding abilities in long-context scenarios. Our benchmark tests both the comprehension and repair capabilities of LCLMs in realistic and important settings by drawing from real-world GitHub issues and constructing QA (LongCodeQA) and bug fixing (LongSWE-Bench) tasks. We carefully stratify the complexity of our benchmark, enabling us to evaluate models across different scales -- ranging from Qwen2.5 14B Instruct to Google's flagship Gemini model. We find that long-context remains a weakness for all models, with performance drops such as from 29% to 3% for Claude 3.5 Sonnet, or from 70.2% to 40% for Qwen2.5. The LCB dataset is available publicly at https://huggingface.co/datasets/Steefano/LCB and the codebase to replicate the work on this paper at https://github.com/Zteefano/long-code-bench.

AmazonNova 2 Lite leads with 84.0%, followed by AmazonNova 2 Pro at 84.0%.

Progress Over Time

Interactive timeline showing model performance evolution on LongCodeBench

State-of-the-art frontier
Open
Proprietary

LongCodeBench Leaderboard

2 models
ContextCostLicense
11.0M$0.30 / $2.50
1
Notice missing or incorrect data?

FAQ

Common questions about LongCodeBench.

What is the LongCodeBench benchmark?

LongCodeBench evaluates the code understanding and comprehension abilities of large language models at very long context windows, scaling up to 1M tokens. It tests whether models can reason about extensive codebases provided in a single prompt by answering multiple-choice questions about the code.

What is the LongCodeBench leaderboard?

The LongCodeBench leaderboard ranks 2 AI models based on their performance on this benchmark. Currently, Nova 2 Lite by Amazon leads with a score of 0.840. The average score across all models is 0.840.

What is the highest LongCodeBench score?

The highest LongCodeBench score is 0.840, achieved by Nova 2 Lite from Amazon.

How many models are evaluated on LongCodeBench?

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

Where can I find the LongCodeBench paper?

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

What categories does LongCodeBench cover?

LongCodeBench is categorized under long context, reasoning, and coding. The benchmark evaluates text models.

Which model offers the best value on LongCodeBench?

Among models scoring within 10% of the leader, Nova 2 Lite from Amazon is the cheapest, at $0.30 per million input tokens with a score of 0.840.

How recent are the LongCodeBench leaderboard results?

The LongCodeBench leaderboard was last updated in June 2026 and currently includes 2 evaluated models.

More evaluations to explore

Related benchmarks in the same category

View all long context
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
220 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
124 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
113 models
MMLU

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

reasoning
99 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
97 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
78 models