Generated Knowledge Prompting for Commonsense Reasoning

Jiacheng Liu, Alisa Liu, Ximing Lu, Sean Welleck, Peter West, Ronan Le Bras, Yejin Choi, Hannaneh Hajishirzi

Introduction

Instead of relying on external, structured databases to help AI understand the world, why not just ask the AI what it already knows? This paper introduces Generated Knowledge Prompting, a method where a large language model (LLM) generates its own knowledge statements to help it solve complex commonsense reasoning tasks. By simply "thinking out loud" before answering, models achieved state-of-the-art results on several benchmarks without any specialized fine-tuning or access to external knowledge bases.

The Challenge of Commonsense Reasoning

Commonsense reasoning—understanding that "birds have two wings" or "golfers want the lowest score"—is notoriously difficult for AI. Traditionally, researchers have tried to fix this by plugging in external knowledge bases like ConceptNet. However, these databases often suffer from poor coverage, are difficult to integrate into modern neural networks, and usually require task-specific supervision—meaning significant amounts of hand-labeled data are needed to teach the model how to use the database effectively.

The authors ask a provocative question: Since massive models like GPT-3 are trained on nearly the entire internet, do they already contain the necessary knowledge? And if so, can we elicit that knowledge in a way that helps the model reason more effectively?

The Generated Knowledge Framework

The authors propose a flexible, two-step framework that requires no additional training of the underlying models:

  1. Knowledge Generation: Using a few-shot prompting approach, they ask an LLM (specifically GPT-3) to generate several "knowledge statements" related to a question. For example, if the question is about a heifer, the model might generate: "The master of a heifer is a farmer." They typically generate $M=20$ such statements to ensure variety.
  2. Knowledge Integration: They then take these generated statements and concatenate them with the original question. A second "inference model" (which could be the same LLM or a different one like T5) reads the combined prompt and predicts the answer.
The Generated Knowledge Prompting framework consists of two main stages: knowledge generation via few-shot prompting and knowledge integration for final inference.

The system selects the final answer based on which knowledge statement produced the highest-confidence prediction. This "plug-and-play" nature makes it highly adaptable to various architectures.

Evaluation and Benchmarks

The researchers evaluated their method on four diverse commonsense reasoning benchmarks:

  • NumerSense: Tests numerical commonsense (e.g., "A typical human has <mask=two> arms").
  • CommonsenseQA (CSQA): 5-way multiple-choice questions about everyday scenarios.
  • CommonsenseQA 2.0 (CSQA2): A harder, binary (True/False) classification task designed to be difficult for current AI.
  • QASC: An 8-way multiple-choice task focused on grade-school science facts.

Key Insights and Scaling Effects

One of the most striking findings is the "Amplification Effect." Even if a model already "knows" a fact internally, explicitly generating that fact as a text prompt significantly boosts its reasoning performance. It is as if the model needs to see the fact written down to use it properly during the inference stage.

Furthermore, the method shows remarkable scaling properties. Adding generated knowledge to a smaller model (like T5-large) can make it perform as well as, or better than, a model ten times its size (like GPT-3) running without that knowledge. This suggests that the bottleneck for many models is not a lack of knowledge, but an inability to access it during the reasoning process.

Comparison of vanilla baselines versus generated knowledge prompting across various model sizes, showing significant performance gains particularly for smaller models.

Results and Performance

The method set new state-of-the-art (SOTA) records on three of the four benchmarks:

  • NumerSense: Improved accuracy from 64.1% to 72.5%.
  • CSQA2: Improved from 70.2% to 73.0%.
  • QASC: Improved from 76.7% to 80.3%.
  • Zero-shot performance: In settings where the model had never seen the task before, the method improved accuracy by 7% to 10% across the board.

Human evaluation confirmed the quality of these generations, showing that 83% of the statements were factually correct, and 93% of the statements that "fixed" a model's wrong answer were deemed helpful.

Limitations and Future Work

Despite its success, the method has drawbacks. Inference cost is a major concern; generating 20 knowledge statements for every question is computationally expensive and increases latency. Additionally, while 83% factuality is high, the remaining 17% of hallucinated knowledge can mislead the model. The authors noted that when the model was misled into a wrong answer, 86% of the time it was due to non-factual generated knowledge.

Future work will likely focus on finding more efficient ways to integrate this knowledge or developing better filtering mechanisms to discard non-factual "knowledge" before it reaches the inference stage.

Summary updated

BibTeX
@inproceedings{liu2022generated,
  author = {Jiacheng Liu and Alisa Liu and Ximing Lu and Sean Welleck and Peter West and Ronan Le Bras and Yejin Choi and Hannaneh Hajishirzi},
  title = {{Generated Knowledge Prompting for Commonsense Reasoning}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2022},
  doi = {10.18653/v1/2022.acl-long.225},
}
Figure