TL;DR
This paper introduces CGAP, a novel two-stage framework for closed-book question answering (CBQA) that leverages large language models (LLMs) to generate relevant context before answering a question. By generating and then marginalizing over multiple contexts, CGAP significantly boosts accuracy, matching open-book QA performance without external knowledge retrieval or fine-tuning.
What Problem Does This Paper Address?
Open-domain question answering (ODQA) aims to answer questions using knowledge that isn't explicitly provided. Traditional approaches fall into two camps: open-book QA, which retrieves relevant documents from an external corpus, and closed-book QA (CBQA), which relies solely on the knowledge implicitly stored within a pre-trained language model (LLM). While LLMs possess vast amounts of knowledge, existing CBQA methods often fail to fully exploit this "parametric knowledge." They either fine-tune the LLM (which requires extensive data and computation) or use simple few-shot prompting, which can be insufficient. This leads to a performance gap compared to open-book methods. The challenge is to unlock the LLM's internal knowledge more effectively for CBQA without resorting to external data or costly fine-tuning.
Methods
The proposed framework, CGAP (Context Generation and Answer Prediction), operates in two stages:
- Context Generation: Given a question, CGAP prompts a large pre-trained LM to generate a relevant context. This is achieved using a few-shot prompting approach, where the LM is provided with a few examples of question-context pairs from a supporting dataset. To ensure high-quality context, relevant examples are selected using a similarity-based retriever (DPR). Crucially, multiple contexts are generated in parallel to reduce latency.
- Answer Prediction: The same pre-trained LM is then prompted again, this time with the generated context and the original question, to predict the answer. To improve robustness and mitigate potential inaccuracies in the generated context, CGAP generates multiple contexts and their corresponding answers. The final answer is then determined by majority voting across these predictions. This process is referred to as "context marginalization."
A key aspect of CGAP is that it does not require any fine-tuning of the LLMs or access to external knowledge sources beyond what's implicitly stored in the model.
Datasets
The paper evaluates CGAP on three standard open-domain QA benchmark datasets:
- Natural Questions (NQ): Questions derived from Google search queries.
- TriviaQA (TQA): A collection of questions from trivia and quiz-league websites.
- WebQuestions (WQ): Questions sourced from the Google Suggest API.
The authors use standard data splits for these datasets and processed versions provided by other researchers.
Key Insights and Ideas
- Generated Context as a Bridge: The core idea is that generating a relevant context acts as an intermediate step, helping the LLM better access and utilize its internal knowledge for answering questions.
- Marginalization for Robustness: Generating multiple contexts and using majority voting (context marginalization) significantly improves accuracy by mitigating the impact of any single inaccurate or hallucinated context.
- Scale Matters: The performance gains from CGAP are amplified with larger LLMs, suggesting that larger models are better at both generating useful contexts and leveraging them for accurate answers.
- No Fine-tuning Needed: The framework demonstrates that impressive results can be achieved without the need for computationally expensive fine-tuning, making it more accessible.
Key Results
- State-of-the-Art Performance: CGAP significantly outperforms existing closed-book QA methods. On TriviaQA, it improves exact match accuracy from 55.3% to 68.6%.
- On Par with Open-Book QA: CGAP achieves performance comparable to open-book QA methods (68.6% vs. 68.0% on TriviaQA), despite not using external knowledge retrieval.
- Impact of Context Generation: Using a 357M parameter model for context generation alone provides substantial accuracy gains (e.g., +19% on NQ) compared to standard few-shot prompting.
- Benefits of Marginalization: Context marginalization consistently improves accuracy across all datasets and model sizes, with particularly large gains when using larger models (e.g., a 12.8% average EM score increase with 530B parameters).
- Scalability: The method scales well, with performance increasing significantly as the LLM size increases, reaching 68.6% EM on TriviaQA with a 530B parameter model.
Limitations and Future Work
- LM Size Dependency: The performance of CGAP is heavily dependent on the size of the LLM used. The highest accuracy results were achieved with a 530B parameter model, which is often only accessible via API.
- Hallucinated Content: While context marginalization helps, generated contexts can still contain factually inaccurate or irrelevant information, which can lead to incorrect answers.
- Future Work: The authors suggest that further improvements could come from exploring more sophisticated context generation and marginalization techniques. The framework also paves the way for hybrid models that could integrate LLMs with external knowledge sources more effectively.
Summary updated