WikiChat: Stopping the Hallucination of Large Language Model Chatbots by Few-Shot Grounding on Wikipedia

Sina J. Semnani, Violet Z. Yao, Heidi C. Zhang, Monica S. LamEMNLP 2023

Introduction

Large Language Models (LLMs) like GPT-4 have revolutionized conversational AI, yet they remain plagued by "hallucinations"—the tendency to generate plausible-sounding but factually incorrect information. This issue is particularly severe when discussing recent events or obscure "tail" knowledge. WikiChat introduces a 7-stage pipeline that grounds LLM responses in Wikipedia, virtually eliminating these errors while maintaining a natural conversational flow.

The Challenge: Hallucination in the Tail and Recent Events

Standard LLMs suffer from a "factuality cliff." While they perform well on popular "head" topics frequently seen during training, their accuracy plummets on:

  1. Recent Events: Information occurring after the model's training data cutoff.
  2. Tail Knowledge: Niche or obscure topics with limited representation in pre-training data.

Existing Retrieval-Augmented Generation (RAG) systems often struggle to balance factuality with natural dialogue, sometimes producing dry responses or failing to correct hallucinations when retrieved context is incomplete.

The WikiChat Pipeline

WikiChat addresses these issues through a "generate-then-verify" approach. Instead of simply providing context before generation, it treats the LLM's output as a set of claims to be rigorously fact-checked against Wikipedia.

The 7-stage WikiChat pipeline: from query generation to final refinement.

The pipeline consists of seven distinct stages:

  1. Query Generation: Formulating search queries based on conversation history and temporal context.
  2. Summarize & Filter: Retrieving and selecting relevant Wikipedia passages.
  3. Generate: Producing a candidate response.
  4. Extract Claims: Breaking the response into individual factual statements.
  5. Fact-Check: Verifying each claim against retrieved evidence (supported, refuted, or unknown).
  6. Draft: Reconstructing the response using only verified facts.
  7. Refine: Polishing the draft for naturalness and relevance.

To make this process efficient, the researchers used model distillation. They used the high-reasoning GPT-4 to generate training data and fine-tuned a compact LLaMA-7B model. This "WikiChat L" model retains the pipeline's logic while being significantly faster and cheaper to operate.

Evaluation and Key Results

WikiChat was evaluated against state-of-the-art models across Head, Tail, and Recent topics. The results demonstrate a significant leap in reliability.

Performance comparison of WikiChat against GPT-4, GPT-3.5, and other models across different knowledge categories.

Superior Factuality

As shown in the performance table, WikiChat G4 (based on GPT-4) achieved a factual accuracy of 97.3% overall. Most notably, while GPT-4's accuracy dropped to 56.0% on tail topics and 47.5% on recent topics, WikiChat maintained accuracy levels above 94% across all categories.

Conversationality and Efficiency

Unlike previous retrieval-heavy models like Atlas, which can be repetitive or dry, WikiChat matches the engaging conversational style of GPT-4. Furthermore, the distilled LLaMA-7B version (WikiChat L) is 3.2x faster than its GPT-4 counterpart while maintaining over 91% factual accuracy, proving that sophisticated fact-checking can be both performant and commercially viable.

Conclusion

WikiChat represents a significant step toward trustworthy conversational AI. By shifting the focus from simple generation to rigorous verification and distilling that process into smaller models, it provides a blueprint for chatbots that are both knowledgeable and reliable. Future work may expand this grounding to specialized domains like medicine or law, ensuring that AI assistants can be trusted even in high-stakes environments.

Summary updated

BibTeX
@inproceedings{semnani2023wikichat,
  author = {Sina J. Semnani and Violet Z. Yao and Heidi C. Zhang and Monica S. Lam},
  title = {{WikiChat: Stopping the Hallucination of Large Language Model Chatbots by Few-Shot Grounding on Wikipedia}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  doi = {10.18653/v1/2023.findings-emnlp.157},
}
Figure