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. Lam
5/23/2023
cs.CL

No official code found. Best implementation: stanford-oval/WikiChat (1,615 stars, Apache-2.0, last commit 2026-01-31).

Abstract

This paper presents the first few-shot LLM-based chatbot that almost never hallucinates and has high conversationality and low latency. WikiChat is grounded on the English Wikipedia, the largest curated free-text corpus. WikiChat generates a response from an LLM, retains only the grounded facts, and combines them with additional information it retrieves from the corpus to form factual and engaging responses. We distill WikiChat based on GPT-4 into a 7B-parameter LLaMA model with minimal loss of quality, to significantly improve its latency, cost and privacy, and facilitate research and deployment. Using a novel hybrid human-and-LLM evaluation methodology, we show that our best system achieves 97.3% factual accuracy in simulated conversations. It significantly outperforms all retrieval-based and LLM-based baselines, and by 3.9%, 38.6% and 51.0% on head, tail and recent knowledge compared to GPT-4. Compared to previous state-of-the-art retrieval-based chatbots, WikiChat is also significantly more informative and engaging, just like an LLM. WikiChat achieves 97.9% factual accuracy in conversations with human users about recent topics, 55.0% better than GPT-4, while receiving significantly higher user ratings and more favorable comments.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

WikiChat is an improved RAG. It stops the hallucination of large language models by retrieving data from a corpus.

1,615147CSS, JinjaOct 19, 20238 months agoApache-2.0
chatbotemnlp2023factualityllmnatural-language-processing+2 more

Similar Papers

Cite this paper

@article{semnani2023wikichat,
  title  = {WikiChat: Stopping the Hallucination of Large Language Model Chatbots by Few-Shot Grounding on Wikipedia},
  author = {Sina J. Semnani and Violet Z. Yao and Heidi C. Zhang and Monica S. Lam},
  year   = {2023},
  eprint = {2305.14292},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2305.14292v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2305.14292.svg)](https://codeofpaper.com/paper/2305.14292)

Discussion