Mitigating Hallucination in Fictional Character Role-Play

Nafis Sadeq, Zhouhang Xie, Byungkyu Kang, Prarit Lamba, Xiang Gao, Julian J. McAuley

Abstract

Large Language Models (LLMs) often struggle with factual consistency when performing fictional character role-play, frequently succumbing to cross-universe or temporal hallucinations. This paper introduces RoleFact, a framework designed to mitigate these issues by decomposing responses into atomic facts and verifying them through a dual-path process involving retrieved scripts and calibrated internal confidence. To support this research, the authors present the Script Grounded Character Role-play (SGR) dataset, a comprehensive benchmark of 72,000 character interviews. Experimental results demonstrate that RoleFact significantly improves factual precision and temporal accuracy over existing baselines.

Introduction

The use of LLMs for role-playing fictional characters has gained significant popularity. However, these models often rely on "parametric knowledge"—the vast information absorbed during pre-training—which can lead to character-breaking hallucinations. Specifically, models face two primary challenges: Cross-Universe Hallucinations, where a character references information from an unrelated fictional world, and Temporal Hallucinations, where a character reveals information they should not yet know based on their current timeline in a story (e.g., a "Year 1" Harry Potter discussing events from later books).

While standard Retrieval-Augmented Generation (RAG) provides a partial solution by offering external context, it often fails to prevent the "leakage" of internal model knowledge into the persona. This research addresses the need for a mechanism that balances creative persona with strict factual grounding.

The RoleFact Framework

The proposed RoleFact framework operates as a multi-stage pipeline to filter and refine character responses:

  1. Decomposition: The model generates an initial response, which is subsequently broken down into "atomic facts"—simple, third-person declarative statements.
  2. Dual-Path Verification: Each fact undergoes a two-pronged check:
  3. Non-parametric Path: The fact is verified against retrieved scripts or story-lines to ensure alignment with the source material.
  4. Parametric Path: If the script is silent on a fact, the model’s internal confidence is assessed. The model is queried $m$ times; if its self-consistency exceeds a specific threshold $t$, the fact is retained.
  5. Self-Reflection Update: The model performs a final rewrite of the response, removing unverified facts while maintaining the character's stylistic integrity and engagement level.

This approach acknowledges that internal knowledge is valuable for role-play but requires calibration to prevent over-confident hallucinations.

The SGR Dataset

A major contribution of this work is the Script Grounded Character Role-play (SGR) dataset. Surpassing previous benchmarks in scale and diversity, SGR includes:

  • Scale: Over 2,000 characters from 1,152 unique story-lines across various media (movies, plays, etc.).
  • Adversarial Testing: 18,000 questions specifically designed to bait models into cross-universe errors.
  • Temporal Grounding: Utterance-level time annotations that allow for testing a model's ability to respect a character's "current" knowledge state within a narrative.

Key Insights and Experimental Findings

The researchers identified several critical factors influencing role-play performance:

The Anonymization Paradox

A common hypothesis is that anonymizing a character's name in a prompt might force the model to rely solely on provided context. However, the study found that anonymization actually degrades factual precision. Knowing the character's identity is essential for the model to ground both its linguistic style and basic factual framework correctly.

Addressing Popularity Bias

LLMs naturally perform better with "celebrity" characters (e.g., Harry Potter) due to the abundance of training data. RoleFact provides a significant 23% boost in factual precision for obscure characters by prioritizing retrieved script data over the model's sparse internal knowledge.

Calibration of Confidence

By tuning the confidence threshold ($t$), the researchers identified a "sweet spot" at approximately $t=0.6$. This balance ensures high factuality without making the character's responses too dry or robotic.

Results

RoleFact demonstrated clear superiority over standard prompting and basic RAG across several metrics:

  • Factual Precision: Improved by 18% in adversarial (cross-universe) scenarios.
  • Temporal Accuracy: Reduced "spoiler" hallucinations by 44% in time-sensitive scenarios.
  • Human Evaluation: RoleFact achieved a factuality score of 6.1/7, significantly outperforming the baseline score of 4.9.
  • Informativeness: Unlike simple deletion methods, RoleFact’s self-reflection step ensures responses remain engaging and stylistically consistent.

Conclusion and Future Work

While RoleFact is highly effective, it remains sensitive to the quality of the retrieval system and involves higher computational costs due to the multi-sampling approach used for confidence calibration. Future research will explore instruction-tuning open-weight models directly on the SGR dataset to integrate fact-checking capabilities into the model's weights, potentially streamlining the pipeline for real-time applications.

Summary updated

BibTeX
@inproceedings{sadeq2024mitigating,
  author = {Nafis Sadeq and Zhouhang Xie and Byungkyu Kang and Prarit Lamba and Xiang Gao and Julian J. McAuley},
  title = {{Mitigating Hallucination in Fictional Character Role-Play}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.findings-emnlp.846},
}
Figure