Abstract
LongBench is the first comprehensive, bilingual (English and Chinese) benchmark designed to rigorously evaluate how Large Language Models (LLMs) handle long contexts. By moving beyond simple "needle-in-a-haystack" tests, it provides a multi-task suite that reveals a significant performance gap: even top-tier models like GPT-3.5-Turbo-16k struggle as context lengths scale toward their theoretical limits.
Introduction
In the current LLM landscape, context window sizes are expanding rapidly—from 2k tokens to 128k and beyond. However, a large window does not necessarily equate to effective reasoning over the information within it. Most existing evaluations rely on perplexity or simple synthetic tasks that fail to mirror real-world complexities like legal analysis or multi-document summarization. LongBench addresses this by providing a standardized, multi-task benchmark to test whether models can synthesize information across thousands of words in both English and Chinese.
Benchmark Composition
LongBench incorporates 21 datasets (14 English, 7 Chinese) covering six major task categories: Single-Doc QA, Multi-Doc QA, Summarization, Few-shot Learning, Synthetic Tasks, and Code Completion. The average length of English instances is approximately 6,700 words, while Chinese instances average 13,300 characters.
Methodology
To ensure a fair and rigorous evaluation, the authors implemented several key methodological choices:
- Standardization: All datasets were converted into a unified (Input, Context, Answer) format for automated, reproducible evaluation.
- Middle Truncation: When input exceeds a model's capacity, the middle of the text is truncated. This preserves the beginning (instructions) and the end (the specific question), which are often most critical.
- LongBench-E: A specialized subset with an even distribution of context lengths (0-4k, 4k-8k, and 8k+) to isolate performance degradation.
- Evaluation Metrics: Task-specific metrics such as F1-score, ROUGE-L, and Edit Similarity were utilized.
Key Insights and Results
The evaluation of various state-of-the-art models revealed several critical findings regarding long-context capabilities.
The "Long-Context Tax"
Even the highest-performing models exhibit a "significant decline" in performance as context length increases. For instance, GPT-3.5-Turbo-16k experienced a 17% drop in accuracy when moving from the 0-4k range to the 8k+ range. This suggests that current models struggle to maintain focus and reasoning quality over extended sequences.
Model Performance
- Commercial Dominance: GPT-3.5-Turbo-16k outperformed all tested open-source models, though it still faced challenges with the longest sequences.
- Open-Source Progress: Among open-source models, ChatGLM2-6B-32k and LongChat-v1.5-7B-32k emerged as top performers. ChatGLM2-6B-32k, in particular, achieved a 62% relative improvement over its base version, demonstrating the efficacy of supervised fine-tuning on long sequences.
- Retrieval vs. Native Context: While Retrieval-Augmented Generation (RAG) can assist models with weak native long-context abilities, it can actually hinder models that possess native capabilities by discarding nuanced, distributed information.
Limitations and Future Directions
The authors identify several hurdles for future research:
- Metric Reliability: Standard metrics like ROUGE-L may not fully capture the quality of long-form generation.
- Instruction Following: Model scores are often "coupled" with their ability to follow specific output formats; a failure in instruction following can mask true context understanding.
- Reasoning over Retrieval: Future benchmarks should focus on tasks requiring reasoning over multiple scattered facts rather than simple fact retrieval.
Summary updated