TL;DR
This paper introduces HAMLET, a novel, automated framework for evaluating how well Large Language Models (LLMs) understand long texts like books. HAMLET breaks down information into a hierarchical structure (root, branch, leaf) and uses query-focused summarization to test LLMs' ability to recall details at different levels. It achieves over 90% agreement with human experts while being 25x cheaper, revealing that LLMs struggle with fine-grained comprehension and are affected by positional biases.
What Problem Does This Paper Address?
As LLMs become capable of processing increasingly long texts (over 100K tokens), evaluating their comprehension of book-length documents has become a critical challenge. Existing benchmarks often rely on simple question-answering or whole-document summarization, which only assess shallow understanding. These methods fail to capture an LLM's ability to recall information at various levels of detail – from high-level themes to specific facts – a capability crucial for true book-length comprehension. Furthermore, evaluating these long texts is expensive and time-consuming due to the sheer volume of information and the complexity of annotation.
Methods
HAMLET addresses this by proposing a three-stage, automated evaluation framework:
- Query Construction:
- Text Chunking: Books are divided into 4K-token chunks to manage complexity and enable localized analysis.
- Key-fact Tree Construction: For each chunk, key information is extracted and organized into a hierarchical "key-fact tree" with three levels: Root (central theme), Branches (subtopics/narrative arcs), and Leaves (specific details/evidence). This tree can be analytical (focusing on meaning and logic) or narrative (focusing on story progression).
- Query Formulation: GPT-4o is used to generate queries based on these key-fact trees, ensuring they are anchored to specific text locations and abstraction levels.
- Summary Generation: LLMs are tasked with generating query-focused summaries for the entire book, evaluating their ability to recall relevant information and maintain faithfulness.
- Automated Summary Evaluation: HAMLET uses an LLM-based evaluator (GPT-4o) to assess the generated summaries based on two dimensions:
- Multi-level Recall: Measures how well the summary captures key-facts at the root, branch, and leaf levels.
- Multi-level Faithfulness: Assesses the accuracy of the summary content without hallucinations at each level.
The framework's reliability is validated through extensive human studies, showing high agreement with expert judgments and significant cost reduction.
Datasets
The benchmark uses 16 recently published novels, chosen for their length (average 101K tokens) and availability of copyright. The authors emphasize that these are real-world, literary texts, not synthetic ones, to ensure a robust evaluation of LLMs' true capabilities. The generated queries, key-fact trees, model-generated summaries, and evaluation labels are made publicly available.
Key Insights and Ideas
- Hierarchical Comprehension is Key: LLMs struggle with fine-grained details (leaf level) more than high-level themes (root level), indicating a gap in their ability to perform deep, multi-level comprehension.
- The "Lost-in-the-Middle" Effect is Real and Affects Details More: LLMs show a significant drop in recall for information located in the middle of long texts, and this effect is more pronounced for detailed (leaf-level) information.
- Analytical vs. Narrative Matters: LLMs are more consistent in recalling analytical content than narrative content, possibly due to the more explicit and localized structure of analytical information.
- Automated Evaluation Can Be Highly Reliable: HAMLET's LLM-based evaluation pipeline achieves over 90% agreement with expert human judgments, making it a scalable and cost-effective alternative.
- Model Size and Type Influence Performance: Proprietary and larger LLMs generally outperform open-source and smaller models, though open-source models show competitiveness in capturing abstract content.
Key Results
- HAMLET's automated evaluation pipeline achieves over 90% agreement with expert human judgments.
- The evaluation cost is reduced by up to 25x compared to traditional methods.
- LLMs show a consistent decline in recall from root-level (0.764-0.902) to leaf-level (0.113-0.265 for analytical, 0.153-0.383 for narrative).
- The "lost-in-the-middle" effect causes recall to drop significantly, especially for leaf-level information (up to 0.10 lower than at document ends).
- Proprietary LLMs generally exhibit higher recall than open-source LLMs, but open-source models are competitive at the root level.
- Larger LLMs consistently outperform smaller ones in recall.
- Faithfulness scores are generally low (ranging from 0.151 to 0.674), with extrinsic errors (information not in the text) being the most common type of failure.
Limitations and Future Work
- Domain Limitation: The current benchmark focuses on literary novels. Expanding to other domains like academic texts, technical documentation, or non-fiction would broaden its applicability.
- Language Limitation: The current coverage is limited to English. Extending HAMLET to other languages is a future direction to test multilingual robustness.
- Evaluation Dimensions: While HAMLET excels at recall and faithfulness, future work could involve designing automated metrics for other nuanced dimensions like bias, coherence, and reasoning quality.
- Hierarchical Weighting: Developing a more integrated approach to quantifying comprehension that accounts for the hierarchical structure of information is suggested.
Summary updated