$Q^2$: Evaluating Factual Consistency in Knowledge-Grounded Dialogues via Question Generation and Question Answering

Or Honovich, Leshem Choshen, Roee Aharoni, Ella Neeman, Idan Szpektor, Omri Abend

Abstract

Factual inconsistency, or "hallucination," remains a significant challenge for generative dialogue models. Traditional metrics like BLEU or BERTScore often fail to capture these errors as they rely on word overlap or reference-based comparisons. This paper introduces $Q^2$ (Question Squared), a novel, reference-free metric that evaluates factual consistency by combining automatic question generation (QG) and question answering (QA). By generating questions from a model's response and attempting to answer them using the source knowledge, $Q^2$ provides an interpretable and highly accurate measure of truthfulness. Experimental results show that $Q^2$ correlates significantly better with human judgment than existing baselines.

Introduction: The Challenge of Factual Consistency

Knowledge-grounded dialogue systems are designed to inform users by leveraging external documents. However, these models frequently produce "hallucinations"—fluent but factually incorrect statements that either contradict or overreach the provided source material.

Evaluating such inconsistencies is difficult because dialogue is open-ended. A single prompt can have many valid responses, making reference-based metrics (which compare model output to a human "gold" response) ineffective. There is a critical need for reference-free metrics that directly compare the generated response to the grounding knowledge.

Methodology: The $Q^2$ Pipeline

The $Q^2$ framework operates through a three-stage pipeline designed to verify claims made in a generated response against the source knowledge.

  1. Question Generation (QG): The system identifies informative spans (e.g., noun phrases) in the model's response. For each span, a T5-based model generates a question for which that span is the answer.
  2. Question Answering (QA): These questions are then posed to an ALBERT-based QA model. Crucially, the QA model is tasked with finding the answer within the original grounding knowledge, not the chatbot's response.
  3. NLI-based Comparison: Finally, the system compares the original answer candidate (from the chatbot) with the answer retrieved from the source knowledge. To handle lexical variations (e.g., "US" vs. "United States"), $Q^2$ employs a RoBERTa-based Natural Language Inference (NLI) model rather than simple string matching.

If the knowledge source cannot answer the question or if the NLI model detects a contradiction, the claim is flagged as inconsistent.

Experimental Setup and Datasets

The authors evaluated $Q^2$ across three major benchmarks: Wizard of Wikipedia (WoW), Topical-Chat, and Dialogue NLI (DNLI). Additionally, the authors released a new annotated dataset based on WoW, containing 1,088 model responses manually labeled by humans for factual consistency. This dataset serves as a "gold standard" for aligning automatic metrics with human intuition.

Key Results and Insights

$Q^2$ demonstrates superior performance in identifying factual errors compared to traditional metrics:

  • Human Correlation: $Q^2$ achieved a system-level Spearman correlation of 0.9798 with human judgments, vastly outperforming BLEU (0.3051) and BERTScore (0.8467).
  • Interpretability: Unlike "black-box" neural metrics, $Q^2$ provides clear evidence for its scores. Developers can inspect the specific question-answer pairs to identify exactly which claim was hallucinated.
  • Robustness: The use of NLI for span comparison makes the metric resilient to paraphrasing and synonyms, which are common in natural dialogue.
  • Binary Accuracy: Using a simple threshold, $Q^2$ correctly identified inconsistent responses with 77.3% accuracy, compared to 65.3% for standard end-to-end NLI approaches.

Conclusion and Future Work

$Q^2$ provides a robust, interpretable, and reference-free solution for evaluating knowledge-grounded dialogue systems. While highly effective, the authors note limitations regarding "chit-chat" (social filler that lacks factual grounding) and coreference resolution (handling pronouns in generated questions). Future work will focus on distinguishing social dialogue from factual claims and improving the handling of dialogue history.

Summary updated

Abstract

Neural knowledge-grounded generative models for dialogue often produce content that is factually inconsistent with the knowledge they rely on, making them unreliable and limiting their applicability. Inspired by recent work on evaluating factual consistency in abstractive summarization, we propose an automatic evaluation metric for factual consistency in knowledge-grounded dialogue using automatic question generation and question answering. Our metric, denoted $Q^2$, compares answer spans using natural language inference (NLI), instead of token-based matching as done in previous work. To foster proper evaluation, we curate a novel dataset of dialogue system outputs for the Wizard-of-Wikipedia dataset, manually annotated for factual consistency. We perform a thorough meta-evaluation of $Q^2$ against other metrics using this dataset and two others, where it consistently shows higher correlation with human judgements.
BibTeX
@inproceedings{honovich2021q,
  author = {Or Honovich and Leshem Choshen and Roee Aharoni and Ella Neeman and Idan Szpektor and Omri Abend},
  title = {{$Q^2$: Evaluating Factual Consistency in Knowledge-Grounded Dialogues via Question Generation and Question Answering}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2021},
  doi = {10.18653/v1/2021.emnlp-main.619},
}
Figure