Long-Span Question-Answering: Automatic Question Generation and QA-System Ranking via Side-by-Side Evaluation

Bernd Bohnet, Kevin Swersky, Rosanne Liu, Pranjal Awasthi, Azade Nova, Javier Snaider, Hanie Sedghi, Aaron T. Parisi, Michael Collins, Angeliki Lazaridou, Orhan Firat, Noah FiedelarXiv 2024 · DOI

TL;DR

This paper introduces a novel framework for automatically generating and evaluating long-context question-answering datasets using large language models (LLMs). By leveraging LLMs for both question generation and a novel side-by-side evaluation method, the authors demonstrate that full book context significantly improves QA performance and that LLM-based evaluation is a reliable alternative to human annotation.

What Problem Does This Paper Address?

The increasing context window sizes of LLMs (up to 1 million tokens) open up possibilities for deep comprehension of long texts like books. However, a significant bottleneck is the lack of suitable datasets to train and evaluate these capabilities. Existing QA datasets often focus on short, factual answers and are not designed for complex reasoning over extended narratives. Manually creating such datasets is arduous and not scalable. This paper addresses the need for an automated approach to generate and evaluate long-context QA benchmarks, enabling better assessment of LLMs' ability to understand intricate plots, character arcs, and thematic elements.

Methods

The paper proposes a two-pronged LLM-driven framework:

  1. LLM-as-a-curator (Data Generation):
    • Entity Extraction and Coreference Resolution: Identifies key entities (characters, locations, events) and their mentions (including pronouns) within a book using a state-of-the-art coreference resolution system.
  2. Prompt-Based Question Generation: Uses an LLM (Gemini 1.5 Pro) to generate challenging questions that require reasoning across long spans of text. These questions are designed to avoid direct entity mentions, forcing models to infer and synthesize information. The generated questions focus on themes, symbolism, narrative structure, and character relationships.
  3. LLM-as-an-evaluator (QA System Ranking):
    • Absolute Evaluation (AutoAIS): An LLM is prompted to determine if a generated answer is factually supported by the provided text context. While useful for factual accuracy, this method doesn't effectively differentiate between models.
  4. Relative Evaluation (Side-by-Side Comparison & Bradley-Terry Model): This is the core novel evaluation method. LLMs compare answers from two different models pairwise, judging which is "better" based on criteria like accuracy, relevance, detail, and clarity. These pairwise comparisons are then used to train a Bradley-Terry model, which generates a robust ranking of model performance. This relative approach is shown to be more discriminative and consistent than absolute scoring.

Datasets

  • Newly Generated Datasets: The authors create new QA datasets from two books: Les Misérables (732k tokens) and The Wild Huntress (230k tokens), sourced from the PG-19 dataset.
  • NarrativeQA: This manually curated dataset is used for validation. The authors show that their LLM-based evaluator agrees well with human judgments on NarrativeQA and even identifies errors in the dataset's ground truth answers.

Key Insights and Ideas

  • LLMs as Automated Curators and Evaluators: The paper demonstrates that LLMs can effectively automate both the creation of complex QA datasets and the evaluation of QA systems, significantly reducing manual effort.
  • Side-by-Side Evaluation is Superior: A pairwise comparison approach, ranked using the Bradley-Terry model, provides a more nuanced and discriminative evaluation of LLM performance than absolute scoring, especially for long-context QA.
  • Full Context is Crucial: Providing LLMs with the entire book as context leads to significantly better QA performance compared to no-context or retrieval-augmented generation (RAG) with limited context windows.
  • LLM Evaluators Can Find Dataset Errors: The LLM-based evaluator, when applied to the NarrativeQA dataset, identified errors in the ground truth answers, highlighting the potential for LLMs to improve dataset quality.
  • Long-Context Reasoning is Differentiating: While models perform well on well-known texts (like Les Misérables), the true differentiation in capabilities emerges when evaluating performance on less common texts or when requiring deep comprehension of long spans.

Key Results

  • Performance Improvement with Full Context: Gemini 1.5 Pro with full book context significantly outperformed no-context and 4k RAG settings across both generated datasets and NarrativeQA. For instance, in Les Misérables, full context Gemini 1.5 Pro achieved an AutoAIS accuracy of 92.2 ± 1.6%, compared to 87.7 ± 1.8% for no-context Gemini 1.5 Pro.
  • Ranking Consistency: The Bradley-Terry model, based on side-by-side comparisons, provided a more consistent and differentiating ranking of models than absolute AutoAIS scores.
  • Inter-Model Agreement: LLMs from different families showed moderate agreement in their ratings, suggesting the viability of LLM-based evaluation.
  • NarrativeQA Validation: The LLM evaluator showed excellent agreement with human judgment on NarrativeQA, and the Gemini 1.5 Pro model identified errors in the dataset's ground truth.

Limitations and Future Work

  • Model Family Bias: The paper investigates potential bias where an LLM might favor answers from its own family, finding moderate agreement between different model families.
  • Context Length Limitations: While Gemini 1.5 Pro handles full books, other models have limitations, necessitating RAG. The effectiveness of RAG can vary.
  • Future Work: The authors suggest that their framework can be easily adapted to different LLMs and evaluation criteria. They also highlight the potential for LLMs to perform nuanced self-evaluation, which could lead to more robust and reliable QA systems. The development of more challenging benchmarks is crucial for advancing LLM capabilities in long-context understanding.

Summary updated

BibTeX
@misc{bohnet2024long,
  author = {Bernd Bohnet and Kevin Swersky and Rosanne Liu and Pranjal Awasthi and Azade Nova and Javier Snaider and Hanie Sedghi and Aaron T. Parisi and Michael Collins and Angeliki Lazaridou and Orhan Firat and Noah Fiedel},
  title = {{Long-Span Question-Answering: Automatic Question Generation and QA-System Ranking via Side-by-Side Evaluation}},
  year = {2024},
  eprint = {2406.00179},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.00179},
}
Figure