ZEBRA: Zero-Shot Example-Based Retrieval Augmentation for Commonsense Question Answering

Francesco Molfese, Simone Conia, Riccardo Orlando, Roberto NavigliEMNLP 2024

Introduction

Large Language Models (LLMs) have demonstrated impressive reasoning capabilities, yet they often function as "black boxes" with internal processes that are difficult to interpret. To enhance performance and transparency, researchers frequently employ Retrieval-Augmented Generation (RAG), providing models with external facts. However, standard RAG faces challenges in commonsense reasoning: static knowledge bases often provide noisy or incomplete information, and alternative "knowledge introspection" methods typically require expensive fine-tuning.

ZEBRA (Zero-Shot Example-Based Retrieval Augmentation) introduces a novel framework that addresses these issues by retrieving full reasoning examples—triplets of questions, choices, and explanations—rather than isolated facts. This approach allows LLMs to generate context-specific knowledge through introspection without any additional training or fine-tuning.

Methodology

The ZEBRA framework operates through a three-step process designed to leverage case-based reasoning:

  1. Example Retrieval: Utilizing a dense retriever (E5-base-v2), the system identifies similar complete examples (Question, Choices, and Explanation) from a dedicated knowledge base, ZEBRA-KB.
  2. Example-Guided Knowledge Generation: The LLM is presented with these retrieved examples and prompted to generate a new explanation for the target question, mimicking the logic and style of the retrieved cases.
  3. Knowledge-Informed Reasoning: Finally, the LLM answers the original question, utilizing the custom explanation it generated in the previous step.
The three-step ZEBRA framework: example retrieval, knowledge generation, and informed reasoning.

To support this framework, the authors developed ZEBRA-KB, a high-quality knowledge base. Since many datasets lack explanations, Gemini-1.5-Flash was used to generate logical justifications for thousands of commonsense questions, providing a rich pool for retrieval.

Experimental Setup

ZEBRA was evaluated across eight prominent commonsense reasoning benchmarks, including CommonsenseQA (CSQA), OpenBookQA (OBQA), ARC, PIQA, WinoGrande, and QASC. The retriever was specifically fine-tuned on the CSQA training set using multi-label noise contrastive estimation (NCE) loss. Testing was conducted across four diverse models: Mistral-7B (v0.2), Phi-3-Small, Llama-3-8B, and Phi-3-Mini.

Results and Analysis

ZEBRA consistently outperformed both vanilla zero-shot LLMs and standard RAG methods across all tested models and benchmarks.

Comparison of Accuracy (%) between Zero-Shot, Standard Retrieval, and ZEBRA across different LLMs.

Key findings include:

  • Performance Gains: The framework achieved an average accuracy improvement of up to 4.5 percentage points.
  • Human Evaluation: A blind study revealed that 96% of ZEBRA’s generated knowledge was relevant, and 74% was directly helpful for answering the question.
  • Retrieval Efficiency: The authors determined that retrieving $k=5$ examples offered the optimal balance between providing sufficient context and maintaining a manageable prompt window.

Discussion and Insights

The core innovation of ZEBRA lies in the shift from fact-based retrieval to example-based retrieval. By providing a "cognitive template" through full reasoning examples, the model learns how to reason rather than just what to know. This approach avoids the common pitfall where standard RAG provides distracting or irrelevant facts that can decrease performance.

Furthermore, ZEBRA enhances interpretability. By requiring the model to generate an explicit explanation before answering, it creates a human-readable audit trail for its decision-making process.

Limitations

Despite its success, ZEBRA's performance is contingent on the retriever's accuracy. Additionally, the two-step process (knowledge generation followed by reasoning) increases inference latency compared to single-turn QA. Future work may explore cross-lingual retrieval and address potential biases inherited from the LLMs used to construct ZEBRA-KB.

Summary updated

BibTeX
@inproceedings{molfese2024zebra,
  author = {Francesco Molfese and Simone Conia and Riccardo Orlando and Roberto Navigli},
  title = {{ZEBRA: Zero-Shot Example-Based Retrieval Augmentation for Commonsense Question Answering}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.emnlp-main.1251},
}
Figure