CorpusQA: A 10 Million Token Benchmark for Corpus-Level Analysis and Reasoning
Zhiyuan Lu, Chenliang Li, Yingcheng Shi, Weizhou Shen, Ming Yan, Fei Huang
TL;DR
CorpusQA targets corpus-level reasoning by evaluating how models reason over large, dispersed document repositories. It introduces a six-stage data-generation pipeline that produces guaranteed-ground-truth long-context QA pairs by first structuring data, generating diverse queries, and deriving answers via NL2SQL on a global data table, then re-presenting unstructured documents as the final context. Experiments show standard LLMs struggle as context grows, RAG systems fail under heavy dispersion, and memory-augmented agents offer the most robust path forward. The study also demonstrates that training on synthesized data improves long-context reasoning and can generalize to other corpus-scale benchmarks, underscoring the need for architectures that perform global information synthesis rather than merely expanding context windows.
Abstract
While large language models now handle million-token contexts, their capacity for reasoning across entire document repositories remains largely untested. Existing benchmarks are inadequate, as they are mostly limited to single long texts or rely on a "sparse retrieval" assumption-that answers can be derived from a few relevant chunks. This assumption fails for true corpus-level analysis, where evidence is highly dispersed across hundreds of documents and answers require global integration, comparison, and statistical aggregation. To address this critical gap, we introduce CorpusQA, a new benchmark scaling up to 10 million tokens, generated via a novel data synthesis framework. By decoupling reasoning from textual representation, this framework creates complex, computation-intensive queries with programmatically guaranteed ground-truth answers, challenging systems to perform holistic reasoning over vast, unstructured text without relying on fallible human annotation. We further demonstrate the utility of our framework beyond evaluation, showing that fine-tuning on our synthesized data effectively enhances an LLM's general long-context reasoning capabilities. Extensive experiments reveal that even state-of-the-art long-context LLMs struggle as input length increases, and standard retrieval-augmented generation systems collapse entirely. Our findings indicate that memory-augmented agentic architectures offer a more robust alternative, suggesting a critical shift is needed from simply extending context windows to developing advanced architectures for global information synthesis.
