Context Generation Improves Open Domain Question Answering

Dan Su, Mostofa Patwary, Shrimai Prabhumoye, Peng Xu, Ryan Prenger, Mohammad Shoeybi, Pascale Fung, Anima Anandkumar, Bryan Catanzaro · DOI

This research, a collaboration between HKUST and NVIDIA, introduces CGAP (Context Generation and Answer Prediction), a framework that significantly boosts the performance of Large Language Models (LLMs) in open-domain question answering (ODQA) without requiring external database retrieval.

The Sophistication Gap in ODQA

Open-Domain Question Answering typically follows two paradigms: open-book, which retrieves relevant documents from a corpus like Wikipedia, and closed-book, which relies solely on internal model parameters. While open-book systems are accurate, they require complex infrastructure. Conversely, closed-book models often struggle to recall specific facts, leading to a "sophistication gap" where the model possesses the knowledge but fails to extract it through standard prompting.

Figure 1: Comparison between standard prompting and the CGAP framework. While standard prompting fails, CGAP generates multiple contexts and uses majority voting to arrive at the correct answer (Richard Marx).

The CGAP Framework

The authors propose a two-stage, coarse-to-fine approach that transforms the model into its own retriever:

  1. Context Generation: Instead of answering directly, the LLM is prompted to generate a background "context" for the target question, effectively writing its own reference paragraph.
  2. Answer Prediction: The model is then prompted with the question plus its self-generated context to derive the final answer.
  3. Context Marginalization: To mitigate hallucinations, the system generates $k$ contexts in parallel. The final answer is determined via majority voting across these multiple predictions, filtering out noise from individual incorrect generations.

To ensure high-quality few-shot prompts, the system uses a Dense Passage Retriever (DPR) to select the most relevant training examples, grounding the model in the appropriate topic before generation.

Key Results and Scaling Laws

The framework was evaluated on three major benchmarks: Natural Questions (NQ), TriviaQA (TQA), and WebQuestions (WQ). The results demonstrate that CGAP effectively closes the gap between closed-book and open-book systems.

Figure 6: Accuracy (Exact Match) across NQ, TQA, and WQ datasets. Performance increases significantly as the size of the context generation model scales up to 530B parameters.

Performance Highlights:

  • TriviaQA: CGAP (530B model) improved accuracy from 55.3% to 68.6%, outperforming the state-of-the-art open-book model, RAG (68.0%).
  • Natural Questions: Accuracy jumped from 23.0% to 42.0%.
  • WebQuestions: Accuracy rose from 23.6% to 41.8%.

Insights and Discussion

A critical finding is that the benefit of CGAP scales non-linearly with model size. While smaller models (357M) see modest gains, the 530B parameter model experiences a transformative jump. Interestingly, for the largest models, self-generated context often led to better answers than retrieved Wikipedia text, suggesting that internal knowledge representations may be more "digestible" for the model's own reasoning processes.

While majority voting significantly reduces hallucinations, the system still faces challenges if a model is "confidently wrong" across all generated contexts. Future work will likely focus on achieving similar "context-first" reasoning in smaller, more efficient models through distillation.

Summary updated

BibTeX
@inproceedings{su2023context,
  author = {Dan Su and Mostofa Patwary and Shrimai Prabhumoye and Peng Xu and Ryan Prenger and Mohammad Shoeybi and Pascale Fung and Anima Anandkumar and Bryan Catanzaro},
  title = {{Context Generation Improves Open Domain Question Answering}},
  booktitle = {EACL (Findings)},
  year = {2023},
  doi = {10.18653/v1/2023.findings-eacl.60},
}
Figure