T ime C hara: Evaluating Point-in-Time Character Hallucination of Role-Playing Large Language Models (2024)

Abstract: While Large Language Models (LLMs) can serve as agents to simulate human behaviors (i.e., role-playing agents), we emphasize the importance of point-in-time role-playing. This situates characters at specific moments in the narrative progression for three main reasons: (i) enhancing users’ narrative immersion, (ii) avoiding spoilers, and (iii) fostering engagement in fandom role-playing. To accurately represent characters at specific time points, agents must avoid character hallucination, where they display knowledge that contradicts their characters’ identities and historical timelines. We introduce TimeChara, a new benchmark designed to evaluate point-in-time character hallucination in role-playing LLMs. Comprising 10,895 instances generated through an automated pipeline, this benchmark reveals significant hallucination issues in current state-of-the-art LLMs (e.g., GPT-4o). To counter this challenge, we propose Narrative-Experts, a method that decomposes the reasoning steps and utilizes narrative experts to reduce point-in-time character hallucinations effectively. Still, our findings with TimeChara highlight the ongoing challenges of point-in-time character hallucination, calling for further study.

## introduction the recent progress in large language models (llms) has opened up a new phase of generative agents @xcite @xcite , where llms simulate human-like behaviors, memories, and cognitive processes. a particularly promising area is the development of role-playing llm agents @xcite @xcite , which simulate the personas of either real individuals or fictional characters and engage with users to provide a more vivid experience. a variety of applications, including character ai, gpts, talkie, replika, ai [consistent] [inconsistent] to accurately represent characters at specific time points, the agents should recognize the character's knowledge boundary. this includes their unawareness of future events, their ability to recall past events precisely, and their understanding of the individuals involved in those past events. however, current llm-based role-playing agents are prone to character hallucination @xcite , displaying knowledge that contradicts their character's identity and historical context (e.g., julius caesar talking about his favorite movie). despite the seriousness, the problem has not been investigated in terms of maintaining character consistency, especially in relation to their historical timelines, and robustness to such hallucinations. we introduce a new point-in-time character hallucination benchmark, timechara, to rigorously assess role-playing llms at specific time points, thereby evaluating the agents' spatiotemporal self-consistency and their ability to avoid character hallucination. figure 1 exemplifies the point-in-time character hallucination, where harry potter, in his fifth year at hogwarts, inappropriately mentions a future fact about his wife, ginny weasley. we select 14 fictional characters from four popular novel series and develop a pipeline to generate interview questions tailored to each character at a specific point in their story, along with spatiotemporal labels to determine the spatiotemporal consistency of their responses. our empirical experiments reveal a significant issue of point-in-time character hallucination in state-of-the-art llms, including @xcite and @xcite . this suggests that despite llms memorizing extensive knowledge from books @xcite , they still struggle with maintaining spatiotemporal consistency during role-playing scenarios. to mitigate this, we propose a decomposed reasoning method, narrative-experts, which partitions reasoning tasks among narrative experts specialized in temporal (i.e., identifying between past and future events) and spatial domains (i.e., discerning whether a character was present or absent in specific past events). experiments show that narrative-experts significantly reduces point-in-time character hallucination and enhances spatiotemporal consistency. still, our timechara underscores the ongoing challenge of point-in-time character hallucination and highlights the potential for future improvements. our main contributions are as follows: ## related work we include a more thorough literature review in appendix a. in this section, we only discuss the most relevant works. role-playing llm agents. prior research on conversational ai has focused on developing dialogue agents with self-consistent personas @xcite @xcite . furthermore, llms are increasingly being used to simulate human behavior @xcite . many of these efforts involve using llms to role-play specific characters, such as harry potter, socrates, and others @xcite . in this context, @xcite introduced character hallucination, a scenario where a role-playing agent inappropriately exhibits knowledge that is inconsistent with the character's identity and historical background. on the other hand, @xcite proposed a point-in-time "harry potter" role-playing dialogue dataset. they focused on assessing whether a role-playing agent responds naturally to the character within a specific point in a storyline. rather than directly stress-testing role-playing llms at specific time points by asking confusing questions, their relevance metrics are designed to gauge overall character alignment given natural scene and dialogue context. however, existing studies on role-playing agents have not extensively examined how well these agents are robust to point-in-time character hallucination. we aim to stress-test role-playing llms at specific time points by assessing their spatiotemporal self-consistency and robustness against pointin-time character hallucination, as detailed in llm's temporal reasoning capability. understanding the concept of time is crucial for llms, as the information they acquire is often timesensitive @xcite @xcite . to assess llms' temporal reasoning capabilities, several studies have set benchmarks. @xcite examined how well llms adapt to frequentlyupdated knowledge corpus. feng et al. (2023) focused on whether llms can interpret the impact of subtle contextual changes on relevant temporal relationships. tan et al. (2023b) developed time-lineqa, a dataset for querying the lifelogs of imaginary people. while these benchmarks evaluate the temporal reasoning capabilities of llms, we extend them to point-in-time role-playing scenarios by evaluating whether role-playing llms maintain the character's spatiotemporal consistency. ## the timechara benchmark to create timechara, we select four renowned novel series: harry potter, the lord of the rings, twilight, and the hunger games. this choice is based on two main reasons: (i) the ease of gathering raw text content (i.e., transcripts) and personality information for each character, useful for dataset construction, and (ii) the fact that recent state-ofthe-art llms store knowledge of these series well in their parametric memories @xcite , facilitating tests for point-in-time character hallucination. note that timechara is not exclusively limited to these series; it is easily extendable to other narratives, provided that raw text content and personality information for the characters can be obtained. then, we identify 14 main characters across the four novel series, detailed in appendix f. we pinpoint a particular moment in each character's timeline (e.g., hermione on christmas during her first year at hogwarts) rather than assuming they are aware of all events up to the end of the series as in previous studies @xcite . we organize our dataset in an interview format where an interviewer poses questions and the character responds. specifically, we differentiate between fact-based and fake-based interviews. ## decomposed reasoning we find that existing llms struggle with spatiotemporal consistency as in temporal expert: this expert pinpoints the scene's book and chapter from a question, assigning a future or past label. if deemed future, it bypasses the spatial expert and advises the roleplaying agent with a specific hint (i.e., "note that the period of the question is in the future relative to {character}'s time point. therefore, you should not answer the question or mention any facts that occurred after {character}'s time point."). ## conclusion we highlighted the importance of point-in-time role-playing agents for enhancing narrative engagement, preventing spoilers, and facilitating fandom role-play activities. to maintain a character's spatiotemporal consistency and avoid hallucinations, we introduced the timechara benchmark and developed an automated pipeline, resulting in 10,895 instances. using timechara, we identified significant hallucination issues in state-of-the-art roleplaying llms. to address these, we proposed narrative-experts, an effective method to reduce character hallucinations by breaking down the reasoning process and guiding it with narrative experts. despite these efforts, our findings indicate ongoing challenges with point-in-time character hallucinations, suggesting the need for further improvements.