Codifying Character Logic in Role-Playing
Authors: Letian Peng
Jingbo Shang
Venue: NeurIPS 2025 poster ()
Keywords: Role-playing
Large Language Models
Knowledge Grounding
Primary area: applications
TL;DR: We rethink the roles of descriptions and narrations in role-playing and build a system to initialize the characters' behavior modes as executable codes with descriptions and refine with narrations.

Abstract: This paper introduces Codified Profiles for role-playing, a novel approach that represents character logic as structured, executable functions for behavioral decision-making. 
Converted by large language model (LLM) from textual profiles, each codified profile defines a set of functions parse_by_scene(scene) that output multiple logic-grounded assertions according to scene, using both explicit control structures (e.g., if-then-else) and flexible check_condition(scene, question) functions where each question is a semantically meaningful prompt about the scene (e.g., "Is the character in danger?") discriminated by the role-playing LLM as true, false, or unknown.
This explicit representation offers three key advantages over traditional prompt-based textual profiles, which append character descriptions directly into text prompts:
(1) Persistence, by enforcing complete and consistent execution of character logic, rather than relying on the model's implicit reasoning;  
(2) Updatability, through systematic inspection and revision of behavioral logic, which is difficult to track or debug in prompt-only approaches;  
(3) Controllable Randomness, by supporting stochastic behavior directly within the logic, enabling fine-grained variability that prompting alone struggles to achieve.  
To validate these advantages, we introduce a new benchmark constructed from 83 characters and 5,141 scenes curated from Fandom, using natural language inference (NLI)-based scoring to compare character responses against ground-truths.  
Our experiments demonstrate the significant benefits of codified profiles in improving persistence, updatability, and behavioral diversity. 
Notably, by offloading a significant portion of reasoning to preprocessing, codified profiles enable even 1B-parameter models to perform high-quality role-playing, providing an efficient, lightweight foundation for local deployment of role-play agents.

Codifying Character Logic in Role-Playing
Letian Peng, Jingbo Shang' Department of Computer Science University of California, San Diego (lepeng, @uhang) edu
Abstract
This paper introduces Codified Profiles for role-playing, novel approach that rep- resents character logic as structured, executable functions for behavioral decision- making. Converted by large language model (LLM) from textual profiles, each codified profile defines a set of functions parse_by__ bycecene (scene) that out- put multiple logic-grounded assertions according to scene, using both explicit control structures (e.g.. then-elae and flexible breck_conditiee (scene, question) functions where each question is a semantically meaningful prompt about the scene (e.g., "Is the character in danger?") discriminated by the role- playing LLM as true, false, or unknown. This explicit representation offers three key advantages
traditional prompt-based textual profiles, which append char- acter descriptions directly into text prompts: (1) Persistence, by enforcing complete and consistent execution of character logie, rather than relying the model's s implicit reasoning; (2) Updatability, through systematic inspection and revision of behavioral logic, which is difficult to track or debug in prompt-only approaches; (3) Controllable Randomness, by supporting stochastic behavior directly within the logic, enabling gne-grained variability that prompting alone struggles achieve. To validate these advantages, we introduce new benchmark constructed from 83 characters and 5,141 scenes curated from Fandom, using natural language inference (NL.))based scoring to compare character responses against ground-truths. Our experiments demonstrate the significant benefits of codified profiles in improv- ing persistence, updatability, and behavioral diversity. Notably, by offloading a significant portion of reasoning to preprocessing, codified profiles enable even IB-parameter models to perform high-quality role-playing, providing efficient, lightweight foundation for local deployment of role-play agents.
Introduction
Role-playing CChnn al. 2024a bl has emerged iconic capability of modern large language
models (LLMs) OpenAl 2023 Touvron et al. 2023), enabling them to simulate characters with
distinct personas. This abilitv has spurred a surge of interest both research [Shao et al. 2023
Wang et al. 2023a Sadeq et al. 2024 and application ranging from emotional companions and
storytelling assistants [Brahman et 2021 Qin al. 2024] to non-playable game characters Yu
et al. 2025 and metaverse agents Zhou 2023 Lifelo et al. 2024].
Despite this progress, current LLM- based role-playing systems interpret character logic by appending
character descriptions directly into prompts. This approach lacks persistence and controllability: character behavior is governed by the LLM's implicit reasoning, which is often brittle and inconsistent.
Corresponding author.
Codes and datasets are available at httnss//gghhooooooonnomiiiiiiood Profile Koishiday 2025
https///character.ai
39th Conference on Neural Information Processing Systems (NcurIPS 2025).

---

witerr furettas returee the occarr
Tectual prodles eeplaited during inferwse Perisdert legic in cxliiial proiles applied tu soane.
(eurcttin) decunnilt
our check codeectttmiiees,,. qestiss);
(acan))
Inttally lgy is incifferent to the jonder
Groups misice io stop DID, be las
some, att.pttttttss =1
cinne/ccea)):
Lsc re-urgaacprest yeu".
snconer"))
penuraal cocredion
Vierjins He
Lf check, comeicceen, "Ie the Janetze sroap In Exnger need beiaf";:
mase paotiimss lis salley ove that. horaen companints when tortig
tadtefieee and way recase to Telly the groep.")
Helper Function
Tortaal
aslind.
reburn scwt_ytateeratt
Iriseloodion
IL Updaste codified proills muiintiising Githahl repeeiter by loun reporting and addrnwoing
Codtiied Protile
garse. scene
come, etatetatttete [3
Exolaing with the stoeylli
coane, ccataaantee E Actiintly help the
Untrtereatel righting
return ccese, statteeeate
rature ccese staterasts
New Scese
+
Statements
logy's profile Season Ep.
profile Season 32
W. Controlable randennnes simulation with expliit randeanes coditted profiie.
Shurghne erobres
Rologlay Rengeron
Robota modomiy respend with equal pobbaiilit
zef scone
Ronden bastice
Cudilid
Tiitad Protte
Intelldd
raadon ("eedtees"""estiterrr"" "esgetivn"
Grundtrath Reference
Conueeaccaage "randoen in codilisation
poslise negpitve
Role-playing and Evolving Codified Profiles over Storyline
A ddvataaees of codified profiles: Persistence, Updatability, and Controllable Randomness
Preesting with letzall profile voflers froc aas scadiaton
Figure 1: A presentation of the workflow and advantages of codified profiles.
Even well-crafted profiles frequently yield unpredictable results, particularly in complex or ambiguous scenes, and offer little transparency, making them difficult to debug or update. In addition, interpreting profile logic at runtime imposes significant computational overhead and introduces latency, limiting scalability and responsiveness.
To address these challenges, we propose Codified Profiles, which compile character logic from natural language descriptions into executable functions. Unlike prompt- role- cole-playing. which appends character descriptions to prompts and relies on runtime interpretation, codified profles are constructed in advance. They define character behavior using explicit control logie, producing consistent and interpretable outputs while reducing reliance on the LLM's implicit reasoning. This design enhances both behavioral persistence and computational efficiency by eliminating the need for repeated logic interpretation during interaction.
As shown in Figure ! we convert textual profiles into parse_by parse_by_sces _b____ene (scene) functions via LLM prompting, which use control structures to generate logic-based function includes multiple callable functions check_conditaa condition (scene, question) that evaluate scene spenifc conditions using the role-playing LLM's logits over verbalizers (e.g., "yes", "no", "unknown"") enabling flexible semantic reasoning within a deterministic framework. At inference, the function outputs guide the LLM's 's response based on explicit character logic.
Each
Codified profiles offer three key advantages over prompt-based methods. First, they ensure persis- ience by enforcing consistent execution of character logic, avoiding reliance on the LLM's implicit reasoning. Second, they enable updatability, as structured, executable logic can be systematically inspected, debugged, and revised. Third, they support controllable randommess, allowing explicit encoding of stochastic behavior for fine-grained variability [Guo al.) [024 Gu et al. 2025). These properties make codified profiles ideal for faithful, efficient, and adaptive role-playing, especially with smaller models.
To evaluate the effectiveness of codified profiles, we construct a new Fandom Benchmark comprising 83 characters and 5.141 scenes curated from Fandom, spanning mangas, novels, and television series. Each scene is paired with ground-truth character actions extracted from original narrative artifacts. To assess alignment between model outputs and expected behavior, employ validated L.-d-based natural language inference (NLJ) scoring framework (Bowman et al. (015). which measures logical entailment between generated responses and reference actions.
Our experiments start with a comparison between our codified profiles and traditional textual profiles, and then dive deep into the effect of evolving profiles that update sequentially along the episode randomness, and the model's Best@ K performance under
timeline, the influence of profile- stochastic response settings. Across all settings, codified profiles significantly improve behavioral consistency, adaptability, and diversity, especially when used with smaller LLMs.
We further investigate codification strategies, focusing on the granularity of profile segmentation. Our findings indicate that paragraph-level segments strike the best balance between fidelity and computational efficiency: larger segments often obscure fine- grained logic, while smaller ones lead

---

to excessive fragmentation and redundant condition checking. We also present case studies that demonstrate the concrete advantages of codified profiles over prompt- based interpretations. Our key contributions are as follows:
We propose codified profiles executable and interpretable representations of character logic that provide persistence, updatability, and controllable randomness beyond the limitations of prompt-based role-playing.
We introduce new benchmark, constructed from Fandom-sourced scenes and characters, for evaluating role-playing consisteney. We plan to open-source this dataset facilitate future research. We present an in in-depth analysis of codified profiles, including distilling condition checkers, profile segmentation trade-offs, and demonstrate their impact through detailed case studies.
2
Background
The rise of LLMs has heightened users' expectations not only for accurate answers but also for emo-
tionally supportive interactions [Chen et al. 2024a b]. Role-playing has emerged trending task to meet this demand, enabling engaging interactions such as simulating fictional characters You et al.
2022] Thoppilan al. 2222]. allows LLMs to adopt varied profiles, supporting storytelling Brah-
man et al. 2021 Qin et al. [202], games Yu et al. 2025]. and metaverse applications [Zhou] 2023
Lifelo et al. 2024]. We present comprehensive overview of role-playing developments, including training, inference, grounding, evaluation, and the evolving role of codified profiles in both traditional games and modern L.MMs.
Training and Inference The most straightforward way to build a character into an LLM to train on how the character reacts to different conditions. Such training data can be obtained from existing plots [L et al. 2023] or profile-base data synthesis [Shao et al. 2023]. However, the scarcity of plots (especially for original characters) and insufficient grounding for synthesis (Peng and Shang 2024) cause hallucination challenges (Sadeg et al. 2024) caused by fine-tuning. During the inference.
LLMs are generally prompted with statements from profiles to mitigate hallucinations, which requires a strong grounding system.
Grounding and Updating The grounding system in role-playing models what and how to append profile information to prompts. The "how" part is modeled similarly to traditional etrieval--augmenee generation (RAG) [ewis et al. 2020 using similarity metrics to retrieve the most relevant state- ments (Karpukhin et al., 2020 how to preprocess the statements for retrieval, including formatting and segmentation (Yuan et al.. 2024). Advanced role-play aolepplayin systems also expect statements to be dynamically updated during the interaction [Zhou et al.) 2024] for both working memory and long-term profile. Such updates generally "backpropagate" self-refiection (Shinn al. [2023] the profile, which refines the original statements in a textual gradient style YYuksekgonul et al. 2025
Liu et al. 2023 Salemi et al., 2024). The "what" part discusses
Evaluation There are evaluations for both understanding and generation in role-playing, For understanding, factuality checking and multiple-choice question answering benchmarks (Salemi et al.) 2024 Yuan et al. 2024] are developed to evaluate the understanding of characters. For generation, the reference comes from ground- -ruth scenes [Wang al. 2023b) and human judgment [Chen et al.) 2023 2025). The profile is an essential reference for human evaluators, especially when evaluators are unfamiliar with the character. The evaluation can also be decomposed into simple tasks like natural language inference [Bowman et al.) 2015 that can be trustfully assigned to neural models for automated evaluation [Peng and Shang] 2024 Some works also apply LLMs to evaluate more
advanced attributes such as value and personality [hao et al., 2023 Wang et al. 2024].
Code in Role-playing Building characters with code is strongly connected to the development of video games (Stanley et al. 20066] Gallotta et al., (2024). The most common practice is hardcode the actions of non-plat non-player characters (NPCs), making them actors in prewritten scripts. They are only allowed to intellectually interact with players in some subscenes (e.g., battle, chess), which hardly affect the storyline progression. In role-playing, codes and L.Mss represent two extremes in interaction freedom, which are synergized our codified profile framework to reach balanced point by generating and executing prewritten symbolic logic by a flexible neural system.
3

---

Codified Profile
3.1 Role-playing Preliminary
A pure role-playing system models character logic as "Input scene output response to the scene as character X", where the response can be utterances, actions, or both. Here we use (LM(-) to represent the role-playing systems
discussion scope will be LLM-driven role-playing. The LLM is prompted to role-play as characters with a system prompt pooe-play which does not contain information of any character to be universally applied for role- pole-playings
LLM((s Isote-paay)-
Textual profile
[p1. P2..P.... Pe. Px] (p; represents segments of P like paragraphs) further grounds the role-playing with in-contex: information about character logic. With P appended to the input, the role-playing LLM can output its response r directly or after reasoning with chain-of-thoughe (Co')) (Wei et al. 2022 col prompted from CoT reasoning instruction ICOT.
LLM(s P, cot, play JCST) where cot = L.M(s P. plule-play ICAT)
(I)
3.2 Codifying Profiles
Our motivation codify profiles emerges from the instability for LLMs interpret textual profiles during inference (the CoT stage col = LLM(s yolc-play- TCo: P)). which completely relies on LLM's reasoning accuracy without missing or misinterpretation. This reliance creates brittle dependency on the model's reasoning over long, natural language inputs, often leading to errors in complex scenes. Codification mitigates this fragility by offloading as much reasoning possible into deterministic control logic, allowing the LLM to focus on localized decisions such as condition evaluation and action selection. All prompts and templates for implementation are in Appendix [
In practice, we utilize LLM's coding ability to codify each profile segment p; into an executable func- tion fi : + P; trig (Code implementation: harre_by_sceee (scene) + griigerre__saatementa which returns the possible reactions P, th in the scene based the logic written in p,. LLM then combines all pi to summarize a final response r.
LLM(s (2)))))(()) [s((s)), (roleplay)
To enhance flexibility while preserving structure, each function f. can incorporate semantic checks using callable helper function check_ conditi uandtiinn (scene, question). This callable allows fi to evaluate context-sensitive conditions that are difficult to express through static rules alone. For example, rule like "Whenever being insulted, X will become outrageous" may be codified as:
if bheeck_conditin (scene, "Is X being insulted?"): triggered_ stw.ssetttttttttmemeemmeeeeem append become outrageous")
Internally, check_ condition queries the role-playing LLM with natural language question and interprets the logits over verbalizers (e.g., "yes", "no", "unknown")) to yield boolean or uncertain judgments. This enables codified profiles to combine deterministic control flow with semantic nuance, supporting persistent and context-aware behavior across scenes. As shown in Figure [5] (Appendix F). this approach covers personality, relationships, and superpowers. By shifting the task from profile-bass based reasoning to localized condition classification, codification allows smaller LLMs perform competitively, making well-suited for low-resource deployments.
3.3 Evolving by Storyline
An essential advantage of codified profiles is long-term maintenance, considering the Github reposi- tory updates according discovered issues. Codified profiles can also be updated along with the storyline, and each profile version reflects the character logic in different episodes. We plot the workflow to evolve codified profiles in Figure 2 Issues in role-playing emerge from predicted response r mismatching with ground-truth response Tier based on scene We select natural language inference (NLI) as the initial signal for profile updating, which discriminates as ("contradicted". "neutral", "entailed") based on Tie-

---

Profle
Codlßed
parse, Sy. scere Acconn))
Triggered Statements
Jaare friilyy cetur Fimeor ator ond de dites latigg back Salo and ts fall set that the weee wiulll toopel Xounebila, Anail Fuaandt and lgp dacidtt senc rermere aign
Group sakomata X
It Resgonse
statmmnta
Intnttrrsttl rightingg
triggered statsments
kigr dess mete deut vilur tas modees
egi est B10 ail boiks for
return traggnnllatetenen ttettment
tie permia catage
Pan Farse the characier Jogic baced on the tngut sonne pazmartaaa reiponse
Syscimnize podrhee yrvble
parte by scese Scocene)s
padried
Trase
Rezsoeed Balansp sf SALAENERS
Inrgrrt an tooue by ML. ribtion
Referunce
triggerdd statearets
cottbed proble
Groep dont
acddeauu anotorusg babunda
Besulti 1987 lriveyy sen for soaton
tpp ware man dateate merriing
return Prigprollatatameett
Reclourd
profii spriit character legie
Figure 2: The evolving mechanism of codified profile to synchronize character with the storyline.
When NLI(Tidd, r) E ""contradictedd, "neutral"), the issue will be reported to the response gener- ation stage, citing "contradicted statement" (contradicted) or "relevant but not detailed statement" " (neutral). Then, LLM is prompted to detect the group of triggered_stateneee stattmentt that fits such accusation. Supposing Pj as one of the proposed triggered triggered_statements statements groups, fj will be revised as problematic character logic. Finally, ʃj will be updated based on the input scene together with Pi Tref, r to synchronize the character logic with the storyline.
Textual profiles are not inherently unevolvable. If formatted into logic like if tf-then-else, they can be incrementally revised. However, most textual profiles are not logically formalized. Moreover, updating texts mimics code debugging, yet lacks the precision or modularity of code debugging.
3.4 Controllable Randomness Simulation
LLMs struggle to simulate precise randomness, as generation is governed by temperature rather than probability in instructions. For example, when asked to respond with equal probability between positive and negative sentiment, they often show biased, unbalanced behavior due to training data and decoding preferences [Guo et al. 2024 Gu et al. 2025].
Codified profiles overcome this limitation by externalizing randomness into explicit Python control logic, using constructs like random. choice .J) or random. random() p. Instead of relying on the LLM's generation -ime sampling, this approach enforces precise stochastic behavior directly within the code. For example, to simulate random sentiment:
sentiment_statement statement = random. choice ["X is positive.", "X is negative. "])
By embedding such logic in codified profiles, we achieve fine the-grained control over behavioral randomness, ensuring both reproducibility and tunability. This approach is particularly advantageous in applications where controlled variability is essential, such as user interaction.
4 Fandom Benchmark
Although various high-quality benchmarks [Wang et al. 2024 2025 exist for evaluating vole-playing
in LLMs, they tend to emphasize dialogue interactions over the complicated exccution of situational actions in grounded contexts. Moreover, many benchmarks rely on data synthesized by LLMs or sparsely annotated scripts [Wang et al. 2023b Chen et al. 2024a which restricts them in evaluating an in-depth understanding of massive character logic.
We propose using Fandon as a rich source of character profiles and structured story summaries to build a behavior-centric role-playing benchmark. For each narrative segment, we prompt gpt-4.1 to extract character actions (e.g.. Green-highlighted parts in the storyline of Figure 3) and treat preceding text as the scene. Each scene-action pair further augmented with a carefully crafted guiding question (by gpt-4. 1), which constrains responses be reference-relevant without revealing answers. During evaluation, the role-playing LLM receives the character profile (spoiler-free, cleaned by gpt-4. 1), scene, and question, and predicts the character's 's next action. Predictions are scored using an LLM-basee NLI system: entailed predictions score 100, neutral 50, and contradictions
https//wwwwfandom.coml
5

---

Findun
Io cmpal prrfeccone suryiess Fanders
polnt Fandons
Profile
Sorre
Reference
Cutadd the vill of Stakes Turpay uo and whises
How dos Duaacya lodi about tae Yeckina alves?
Daszass fris But ta Yaskkal eo are rsulal Asazze's eaghi growid
Starster, allccinadls ianvo Dan, was
tagdaz KinzAata ii Taaaccee and Qaaaa italaa
Danazy was aznally sinad, cbodee yout Spalec senseci otigiall profle LLNG
Quastnes goasrated ator postitioes stlesaat rofreac
netural lasguge
Storyline
Seating sydiea for Fandoam Srechnari
aebooese (UL rdaden vits rddrract
Resporse Reforenno
Dobollith
whtere purt forthe cign dieve oppppee Tlannyy frit
KLI Rdadic
Frnices dawns am baber treted thin
eight
fnwd fimnlyy
Question
Resporee Prediction
fredree prereed Minomple begtn thes law
Daencys and
Dusenys izlormas
Profile
Rele-playing LLM
davcer cheiee frodia. After ieeeeet
olte by LLMe
100
50
Figure 3: Curation and evaluation scenarios of our Fandom Benchmark.
We select reputational artifacts to cover various themes of stories: "Suzumiya Haruhi (Haruhi)". "K "K-On!", "JOJO's 's Bizzare Adventure (JOJO)" (Season 3), "Fullmetal Alchemist (FMA)" (2009), Game of Thrones (AGOT)" (Season 1-3), and "Avatar: The Last Airbender (ATLA)" (Book I). The benchmark covers diverse artifacts from sci-fi to adventure across manga, novels, and TV series, featuring 83 characters in 5,141 scenes. Appendix provides detailed statistics, character information, storylines, and example profiles for clarity.
Experiment
5.1 Evaluation Scenarios
For evaluation, use gpt-4.1 1 as the codifica- tion LLM to convert natural language character profiles into codified profiles Then, employ 1lama-3. 1e-1--8binne -ib-instruct as the role-playing LLM. This model is chosen ensure experi- mental efficiency, including tractable forward pass counts and full access to output logits for analysis For each scene in our Fandom benchmark, the role-playing LLM is prompted with a given profile and is asked produce the character's next action. This response is scored using LLM-based (gpt-4.14 1; We manually check its 5 NLI scoring cases for all 83 characters, and find 92.35% entailed, 90.91% neutral, and 88.89% contradicted judgments align with human evaluation, which validates the usage of LLM for automated NLI scoring) NLI against the moound-truth, as mentioned in the benchmark section. We further extend the basic scenario to evolving profile and stochastic response.
Sctup
Upditte Profile
Import Random
Sampling Metric
Basic
x
NLI
Evolving
/
x
NLJ
Stochastic
Best@K (NLD
Table 1: Detailed setups in experiments.
In Evolving Profile, scenes are evaluated sequentially; after testing on the i-th scene, if the predicted action is not entailed (based NLD, the profile is updated to reflect revised behavioral logic before testing scene (i+1), as detailed in 3.3 In practice, we update one function for each reported issue for efficiency. In Stochastic Response, the role-playing LLM generates K responses per scene using a fixed codified profile with probabilistic constructs (e.g.. random.... choice) and temperature < 0.7. The codification L.M is explicitly prompted introduce randomness into control flow. We evaluate using Best@) K. which assigns the final score for each scene based on the highest NLI score among the K sampled responses, capturing the modcl's potential best alignment. Difference between setups can be referred to Table I Before the experiments, we check the codification ability of gpt-4. 1, which shows competent performance as shown in Appendix E All prompts are included in Appendix B
@K,
5.2 Baselines
Vanilla The role-playing LLM is prompted with only the scene. This setting serves lower bound, representing performance with parameterized knowledge when profile data is unavailable. Textual Profile The full natural language character profile is provided alongside the scene. This is the standard grounding method in most existing allyipl systems.
'In Appendix 5.6 we discuss the influence of using different codification L.MMs.
GGPT- series are also found memorizing artifacts like AGOT [Chang et al. 2023 injecting evaluation bias.

---

Artifact
Haruhi
K-On!
JOJO
FMA
AGOT
ATLA
Average
#Character
5
5
11
5.3
Vanilla (No Profile)
63.53
63.60
59.70
67.10
64.93
66.40
64.21
Main
Textual Profile
70.53
68.47
60.64
68.02
61.52
66.70
65.98
Codified RAG
69.03
66.81
59.52
69.14
65.39
66.33
66.04
Codified Profile
72.14
69.23
63.92
69.60
67.51
67.90
68.38
Textual Profile
72.81
71.17
63.42
71.36
65.60
67.37
68.62
#Character
7
19
9.2
Vanilla (No Profile)
65.12
62.53
61.17
67.65
66.89
64.67
Minor
Textual Profile
65.88
64.70
65.83
66,21
65.88
65.70
Codified RAG
N/A
63.28
68.13
66.97
68.62
66.65
66. 73
Codified Profile
68.59
70.06
68.21
70.51
71.95
69.87
+ Textual Profile
67.97
68.94
69.22
71.83
71.86
69.96
Table 2: Role-playing performance based different profiles. N/A: No minor character in Haruhi.
A simple codification strategy that implements retrieval-augmmnnté generation (RAG) over the profile. Each segment of the profile is wrapped in a theck_conditee func- tion to determine its relevance the current scene (if cheeck_coniite ionditioo (scene, question) triggered seteredd_sttteeettt_ .tp.ementt...peeddde.e (segment)). This method evaluates whether logic-based codi- fication offers deeper character understanding than shallow relevance matching.
Codified RAG
Reasoning Mechanism We incorporate chain-of -ot--hutthhhss prompting before the action prediction step. To fairly evaluate reasoning efficiency, we apply CoT both on top of the Textual Profile and the Codified Profile, and vary the average reasoning chain length from 0 upward. We report performance and forward pass count to assess the trade-off between response quality and computational cost.
5.3 Role-playing Results
In Table and Figure we present the performance of various role-playing methods. Results show that all grounding-baas approaches outperform the vanilla (No Profile) baseline, underscoring the importance of contextual character guidance. The result vali- dates our core claim that enforcing consistent charac- ter logic yields better outcomes than relying on the LLM's implicit reasoning, as codified profiles out- perform Textual Profiles across both main and minor characters. Codified profiles also surpass Codified RAG, demonstrating that their advantage lies not just in retrieving relevant content but in expressing structured, executable behavior logic for more persis- tent and faithful character simulation.
71
wr Shoft CoT
Performance
70
Co
Codified Profile
Codifiel
wi Short Coll
Textual Profile
RAG
win
Long Cal
65
250
eExmra Forwarding Passes
Figure 4: The role-playing performance with reasoning mechanism.
Adding textual profiles on top of codified profiles provides further but marginal improvements, especially when the performance difference between code and text is small. This suggests that textual prompts can sometimes complement information that may have been simplified or abstracted during codification, enhancing the expressiveness of the final behavior. In Appendix C we continue the discussion with human/LLM preference and evaluation on original (out-of-script) scenes.
Reasoning Figure compares codified reasoning with chain-of-thoughts reasoning, averaged over all characters. The results show that the codified reasoning flow achieves strong performance with fewer reasoning steps than chain-of -ffiin-o--oohuttt demonstrating it as a more efficient grounding mechanism compared to approaches that rely heavily on runtime reasoning, Notably, performance improves further when codified profiles are combined with targeted reasoning, indicating that our method can benefit from additional inference when applied judiciously. In contrast, the long chain- of-thought (CoT) baseline underperforms, and manual inspection reveals that it often suffers from overthinking, introducing unnecessary complications that derail character-consistn behavior.
7

---

Fandom Beschmark
Cose: Tyrion Lannister (AGOT)
Teced
Todual (te
02.5
77
Wodling
Kiw ring cal (tnaage
Sh- Seve Carerr
700
08-
X500
196A
ATLA
$50
52
Airge Dng
54
Figure 5: PRole-playing performance with evolving profiles. Left: Performance gain from evolving.
Right: Case of "Tyrion Lannister" " in AGOT to analyze the working mechanism evolving.
Evolving In Figure we examine the effect of evolving codified profiles by the storyline on all characters inside the Fandom benchmark. Evolving for textual profiles follows similar pipeline as the codified profile by select-then-revise. The results show codified to be more efficient than textual profiles in evolving, adventure series rather than relaxing anime like K-On! as they involve more character growth.
directly models character logic. The evolving mechanism works better on
The right subfigure presents case study "Tyrion Lannister". evolving along with all 8 seasons, illustrating how evolving profiles maintain alignment with narrative shifts. Tyrion's profile is well- grounded in Season 2 during the Battle of Blackwater, his defining moment centered by the original profile. However, Scasons 3~u4 show heightened need for evolution, surpassing even later seasons when he joins Daenerys, reflecting rapid character development post-battle. This highlights that the most critical synchronization occurs after major turning points. Codified profiles with evolution enable timely updates capture these shifts, preserving logic-storyline consistency.
Peger-Sloons-Sune Steme
BoxtijKK
(1 (2-0))
Rosten Limtice
Codifoc Prdi
70
Selecmee
Tadta (T-37)
P(tlmor)
Cod Phodls (7-07)
Coddict Peoll (7-33)
0.2
0.6
Figure 6: Left: Cases on controllable randomness simulation by textual and codified profiles. Right: Scenario coverage comparison, evaluated by Best@k K performance with stochastic responses.
Figure randomness control in textual codified profiles across three simulation cases (by 100 runs): choosing paper-scissor-stone (with equal probability), responding with positive or negative emotions (with equal probability). and occasionally adding humor (considering 5% 20% as acceptable probability for "occasionally"" Textual prompting (Temperature 0~~0.7) shows significant bias, overproducing certain responses, while codified profiles accurately follow specified probabilities via explicit control flow. Appendix [F] details the codified logic in Figure 17 which aligns with intended behavior.
The right subfigure shows the application randomness simulation to complex characters in the Fandom benchmark. As expected, codified profiles implemented via explicit randomness in code control flow achieve stronger Best@ K performance, meaning they explore more reasonable reactions. Textual profiles rely raising temperature explore variability, which degrades single-run precision and introduces inconsistency. By decoupling behavioral exploration from sampling noise, codified profiles deliver diversity and accuracy at low temperatures, making them diverse yet high-quality for role-playing We further showcase how randomness enriches characters in Figure
5.4 Smaller Role-playing LLMs
We compare vanilla prompting, textual profiles with chain-of-thought. and codified profiles across LLaMA-3 models of 1B (3.2), 3B (3.2), and 8B (3.1) parameters in Figure 7 and observe that the advantage of codified profiles grows as model size de- creases. Notably, smaller LLMs with codified profiles rival the larger L.LMs with textual profiles for both IB and 3B cases. Manual inspection shows smaller
70
Vests
Toxal
65
55
50
SB
Figure 7: The role-playing performance with smaller role-playing LLMs.
8

---

Artifact
Haruhi
K-On!
JOJO
FMA
AGOT
ATLA
Average
kimi-x2
74.81
67.71
62.70
68.89
67.32
64.62
67.68
qwen3-instruct
76.24
67.89
63.80
70.27
67.46
64.23
68.32
Main
qwen3-coder
74.25
69.82
63.62
70.62
67.88
69.94
69.36
8pt-4.1-ming
73.33
68.58
62.71
68.07
67.03
68.54
68.04
gpt-4.1
72.14
69.23
63.92
69.60
67.51
67.90
68.38
claude-3. 7ssent
76.86
68.53
63.35
70.82
68.69
68.73
69.50
claude-4.0 soneet
75.07
68.99
63.85
74.26
67.22
70.82
70.04
kimi-x2
67.70
65.79
65.53
71.70
64.09
66.96
qwen3-instruct
69.48
66.08
65.64
71.71
65.70
67.72
Minor
qwen3-coder
71.63
67.51
64.44
73.64
72.06
69.86
gpt-4.
71.65
64.66
70.35
69.77
70.43
69.37
gpt-4.1
68.59
70.06
68.21
70.51
71.95
69.87
claude-3. 7-senet
75.05
67.05
67.04
73.79
69.25
70.44
claude-4.0 sonet
71.79
67.66
70.94
74.63
73.72
71.75
Table 3: Role-playing performance based codification LLMs with the 8B role-playing LLM.
models often fail to reconstruct character logic from
free-form text but still perform well when logic is preprocessed by stronger LLMs (e.g- gpt-4. 1) into explicit conditions. This supports our central claim in the introduction: codified profiles reduce reliance the LLM's implicit and inconsistent reasoning enforcing structured, interpretable behavior, which is especially critical for smaller models with limited reasoning ability.
bhack__coniii condit condition (scene, question) is a discriminative task, explore the use of distilled classifier improve both performance and efficiency. Instead of querying the role-playing model for every condition, we distill from gpt-4. 1's condition-checking outputs using 415 scenes (5 per character, 8% of all scenes) and obtain 20,759 labeled discrimination cases. A 3-class deberta-v3-bes
Distilled Condition Checker As check
model (B.IB) [e et al. 2021 is trained on 90% of the data for 5 epochs and achieves 70.53% consistency with gpt -4 on the held-out 10%. As shown in Figure 7 this design enables a highly efficient 1B Code + Distill system that approaches the performance of 8B + Text, demonstrating the benefit of codified reasoning to smaller LLMs. On larger 8B role-playing LLM,, the distilled classifier maintains a comparable performance with significantly better efficiency, as illustrated in the efficiency analysis in Appendíx [] We have also checked the performance excluding the 8% data for distillation, which reaches a consistent conclusion, supporting the generalization of the distilled condition checker.
5.5
Segmentation Strategy
Figure compares section, paragraph, and sentence- level codification. Finer segmentation improves role- playing, with a notable gain from section to para- graph. However, the marginal benefit from paragraph to sentence comes high computational cost, al- most tripling forward passes. Paragraphs offer natu- ral grouping related statements, balancing fidelity and efficiency. Thus, we adopt paragraph-level seg- mentation for the main experiments.
Scatranatioo by Puragragh
Scumantation
Porfermance
68
Segmertatio
Texmed Prifiee
Cludifiet RAA
6
Tocael Podik
65
Villla
100
#Extra Forwarding Passes
experimenn
Figure 8: The role-playing performance with different segmentation strategies.
5.6 Codification LLM Comparison
Table BableaComparee role- oolepllaing performance across different codification LLMs, showing that overall effectiveness generally correlates with the model's 's coding ability the public leaderboard. However, performance varies by artifact, suggesting that codifying character profiles requires more than syntactic code generation, demanding nuanced understanding of different personalities, contexts, and behavioral logic that vary among artifacts. Notably, claude-3. - achieves the highest average, indicating stronger alignment in both structural and semantic aspects of profile codification.

---

Scene: Confrontation between otaro and Hol Horse
8B LLM 1aema-3.--8b-Instreee
Rain patters the rusted mochupe of deseet ghost town es Kujo steps from shadows,
Role-playing ing Coditied Profiles
Role-playing ing w/ Tectual Profiles
billowing
with the wind, eyes locked on the lone figure leeniing ni against a mumbling salion wall. Holl Honse tips his hit with a cocky grin, fingers beitching near his holstor, the glint of empororalmady forming the like thrrat unspolen.
Jotaro's 's Profile
Joturo Kujo the stotc and powerful pooagorist Jolo's Bisame Advantum. Calm and sesertive awon in the face of danger, Jotaro possosacs Stard called Star Platmun-- humannid manieetabion of his fighting spum known for its ovanshdlming spand, strengh, and preciston. sonne, emerges from shadows soeked glool lowra coafivall Hot Horse a rogue Sland sser His unflinching demnerorr and striaggcc mind make it clear that he's here for azower ess and won le easily deserred...
1B LLM 1lama-3.2-Ibiinstrun
deserndd
Role-playing w/ Codifled Profiles
R Role-paayin w/ Textual Profiles
Horse's Profile
Horse a feet-Slking bn and cocky antagorist who libss off more than he can chew. His Stand, The Errpere lakes the form of gun that fires bulleis he cun quide Beough the with uncanny yrecisios. Though te projects confideace, Ho) Hocse fundamentally coward who prefers ambush and misdirection direci confrentatio...
Figure 9: Case study of multi-turn role-playing in a given scene: "Jotaro confronting Hol Horse." (JOJO's Bizarre Adventure)
6
Case Study
Figure GesurePillusttrrr Dillustrates a case study that highlights the advantage of codified profiles in a direct role-play scenario. We construct dynamic scene featuring a confrontation between "Jotaro" and "Hol Horse" from JOJO, and prompt LLMs to role-play as each character by "Propose the next action that [character) takes in response." Both textual and codified profiles are evaluated using 8B and IB models to compare performance across model scales and profile formats.
Codified profiles enhance role-playing coherence and character fidelity by embedding consistent personality traits and logically grounded actions into explicit control flow. For instance, when Hol Horse fires bullet and misses, the codified logic triggers Jotaro to summon Star Platinum in immediate defense, mirroring canonical behavior. In contrast, textual profiles often produce generic and less impactful responses, such as Jotaro merely raising fist and stepping back without clear narrative consequence. By offloading complex reasoning into structured logic, codified profiles allow even smaller LLMs (e.g., IB models) engage in reactive exchanges, avoiding repetitive outputs like "Hol Horse attempls to disarm Jotaro." This explicit structure reduces reliance on the model's 's implicit reasoning and enables believable, narratively aligned interactions that would otherwise require far greater model capacity. We further include extended case studies for codified profile workflow in Appendix F which can be referred to understand the mechanism and advantage of codified profiles.
7 Conclusion
We propose codified profiles, which offer a principled framework for character role-playing by compiling behavior into interpretable, executable functions. Our experiments demonstrate that this approach outperforms prompt-basse based methods in persistency, updatability, and controllable randomness, while enabling strong performance even in small models. These findings highlight codified profiles as practical foundation for building efficient, locally deployable role-play agents across wide range of applications. Future work, as discussed in Appendix A includes extending codification with richer operators and helper tools, modeling environmental Togic for world-level role-playing, and exploring the scope of codifiable textual content.
10

---

Acknowledgement
This work aims to contribute not only to the research community but also to a broader ACG community by introducing more powerful role-playing agents. It is also done in memory of the 17th Koishi's ' Day (May 14th), 2025, since the release of TH11, Touhou Chireiden ~ Subterranean Animism in 2008.
References
Samuel R Bowman, Gabor Angeli, Christopher Potts, and Christopher D Manning. A large annotated corpus for learning natural language inference. arXiv preprint arXiv: 1508. 05326, 2015.
Faeze Brahman, Meng Huang, Oyvind Tafjord, Chao Zhao, Mrinmaya Sachan, and Snigdha Chaturvedi. "let your characters tell their story": A dataset for character-centric narrative un- derstanding. In Marie-Francine Moens, Xuanjing Huang, Lucia Specia, and Scott Wen-tau Yih, editors, Findings of the Association for Computational Linguistics: EMNLP 2021, Virtual Event / Punta Cana, Dominican Republic, 16-20 November, 202 I, pages 1 1734-1752. Association for Computational Linguistics, 2021. doi: 12 https://doi.org/1....eee 1ew.188633vv/ 181.11.111/////1211111 findings emn 150
URL
Kent K. Chang, Mackenzie Cramer, Sandeep Soni, and David Bamman. Speak, memory: An archaeology of books known to chatgpt/gpt-4, 2023. URL https: / 00118
Jiangjie Chen, Xintao Wang, Rui Xu, Siyu Yuan, Yikai Zhang, Wei Shi, Jian Xie, Shuang Li, Ruihan Yang. Tinghui Zhu, Aili Chen, Nianqi Li, Lida Chen, Caiyu Hu, Siye Wu, Scott Ren, Ziquan Fu, and Yanghua Xiao. From persona to personalization: A survey on role-playing language agents, 2024a.
org/ abs /404. 18231
Nuo Chen, Yan Wang, Haiyun Jiang, Deng Cai. Yuhan Li, Ziyang Chen, Longyue Wang, and Jia Li. Large language models meet harry potter: A dataset for aligning dialogue agents with characters. In Houda Bouamor, Juan Pino, and Kalika Bali, editors, Findings of the Association for Computational Linguistics: EMNLP 2023, Singapore, December 6-10, 2023, pages 8506-8520. Association for Computational Linguistics, 2023. doi: 10. 122/33//1/022... / BHINNGS--MNP.5700 URL htttt:tts///oooo. org 10. 18653/v1/2000 findings emnlp.55 570
Nuo Chen, Yang Deng, and Jia Li. The oscars of AI theater: A survey role-playing with language models. CoRR, abs/2407.11484 2024b. doi: 10.4850/ARXXIV240.1115 URL
https://doi. (etiddi..oogg//1/ org/10. wwwgg//....0///a......// arxiv 2407 11484
Nuo Chen, Hongguang Li, Jianhui Chang, Juhua Huang, Baoyuan Wang, and Jia Li. Compress to impress: Unleashing the potential of compressive memory in real-world long-term conversations. In Owen Rambow, Leo Wanner, Marianna Apidianaki. Hend Al- AI-Khalifa, Barbara Di Eugenio, and Steven Schockaert, editors, Proceedings of the 31st International Conference on Computational Lingmistics, COLING 2025, Abu Dhabi, UAE, Jamuary 19-24, 2025, pages 755-773. Association for Computational Linguisties, 2025. URL httpttttts//aaaaatttooooo
orgooog/////0 www.ioolnnnnnooe main
517
Roberto Gallotta, Graham Todd, Marvin Zammit, Sam Earle, Antonios Liapis, Julian Togelius, and Georgios N. Yannakakis. Large language models and games: A survey and roadmap. CoRR, abs/2402. 18659, 2024. doi: 10448550/ARXX1.2400..555 URL htttt:://dooii. org/ 48550/
arXiv 2402. 18659
Jia Gu, Liang Pang, Huawei Shen, and Xueqi Cheng. Do Ilms play dice? exploring probability distribution sampling in large language models for behavioral simulation. In Owen Rambow, Leo Wanner, Marianna Apidianaki, Hend AI-Khalifa, Barbara Di Eugenio, and Steven Schockaert, editors, Proceedings of the 31st International Conference on Computational Linguistics, COLING 2025, Abu Dhabi, UAE, Jamuary 19-24, 2025, pages 5375-5390, Association for Computational Linguistics, 2025. /atttttsss//aannttaaa
org 2025. coling- www..ainn3666 360/
httgs://wwwwiiiicciaagggvv/ssser Animism

---

Yufei Guo, Muzhe Guo, Juntao Su, Zhou Yang, Mengqiu Zhu, Hongfei Li, Mengyang Qiu, and Shuo Shuo Liu. Bias in large language models: Origin, evaluation, and mitigation. CoRR. doi: 1048550ARXV.2411.00000
abs/2411.109 1,901,,, 2024.
org
arXiv. 2411 10915
Pengcheng He, Jianfeng Gao, and Weizhu Chen. Debertav3: Improving deberta using electra-style pre-training with 2021.
embedding sharing. arXiv preprint arXiv:2111.095.2
Vladimir Karpukhin, Barlas Oguz, Sewon Min, Patrick S. H. Lewis, Ledell Wu, Sergey Edunov, Danqi Chen, and Wen-tau Yih. Dense passage retrieval for open-domain question answering. In Bonnie Webber, Trevor Cohn, Yulan He, and Yang Liu, editors, Proceedings of the 2020 Conference on
Empirical Methods in Natural Language Processing. EMNLP 2020, Online, November 16-20, 2020, pages 6769-678 10817. Association for Computational Linguistics, 2020. doi: N0.1853/V1/2000 TEMLL-MMINN.S 550. URL httpp:://oo:: http://o..o.rgggg/ 10..0011663111100 wmnlp- mamppmmann..mmm 550
Patrick S. H. Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Küttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel, Sebastian Riedel, and Douwe Kiela. Retrieval-uugmentdd generation for knowledge-intensive NLP tasks. In Hugo Larochelle, Marc' Aurelio Ranzato, Raia Hadsell, Maria-Florina Balcan, and Hsuan-Tien Lin, editors, Advances in Neural Information Processing Systems 33: An- nual Conference on Neural Information Processing Systems 2020, NeurlPS 2020, December 6-12, 2020, virtual, 2020. URL https: http::::s///rooeddingg Abt.aas...bbtrat.......
ctc.pps.ccppppppe 2020/hash/
Cheng Li, Ziang Leng, Chenxi Yan, Junyi Shen, Hao Wang, Weishi MI, Yaying Fei, Xiaoyang Feng, Song Yan, HaoSheng Wang, Linkang Zhan, Yaokai Jia, Pingyu Wu, and Haozhen Sun. Chatharuhi: Reviving anime character in reality via large language model. CoRR, abs/2308 2023. doi: 2308. 09597
10.48550/ARXIV.2308 09597. JRLLhttps://ddt /ttb:::://oooorr/11.... 0e////1..855///1 18850/arrii>
Zita Lifelo, Jianguo Ding, Huansheng Ning, Qurat-Ul-Ain, and Sahraoui Dhelim. Artificial ceelligence-enablle metaverse for sustainable smart cities: Technologies. applications, chal- lenges, and future directions. Electronics, 13(24), 2024. ISSN 2079 9292.. doi: 10.3390/ fettrronics32448877 URL https:/s:://ww/ mdpi. www.c//mmm00.00 2070-9992//332444555
Shuai Liu, Hyundong Cho, Marjorie Freedman, Xuezhe Ma, and Jonathan May. RECAP: retrieval- enhanced context-aware prefix encoder for personalized dialogue response generation. In Anna Rogers, Jordan L. Boyd-Graber. and Naoaki Okazaki, editors, Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume I: Long Papers), ACL 2023, Toronto, Canada, July 9-14, 2023, pages 1404-8419, Association for Computational Linguisiics 2023. doi: 10. 18853//112223, 468. URL http:::://o11..or0111116/6////// acl-long.co 468
OpenAl. technical report. CoRR, abs/2303.087744 2023. doi: 10:48550haXiiv22303.07777 48550/arXiv 13303.08774
URL httts:///toi.....
Letian Peng and Jingbo Shang. Quantifying and optimizing global faithfulness in persona-driven role-playing. In Amir Globersons, Lester Mackey, Danielle Belgrave, Angela Fan, Ulrich Paquet, Jakub M. Tomezak, and Cheng Zhang, editors, Advances in Neural Information Processing Systems 38: Annual Conference on Neural Information Processing Systems 2024, NewrlPS 2024, Vancouver, BC, Canada, December 10 15, 2024, 2024, URL http://:://ppee nips. cc/ cippppceeepprrrrfillleees
Hua Xuan Qin, Shan Jin, Ze Gao, Mingming Fan, and Pan Hui. Charactermeet: Supporting creative writers' entire story character construction processes through conversation with Ilm- powered chatbot avatars. In Florian 'Floyd' Mueller, Penny Kyburz, Julie R. Williamson, Corina Sas, Max L. Wilson, Phoebe O. Toups Dugas, and Irina Shklovski, editors, Proceedings of the CHI Conference on Human Factors in Computing Systems, CHI 2024, Honolulu, HI, USA, ACM, 2024. doi: 10.1 1 145/361 025553613944.366 3904.364210S URL
May 11-16, 2024, pages sttps://doo org 10. 1041111431111 /00///661394444 3642105
12

---

Nañs Sadeq, Zhouhang Xie, Byungkyu Kang, Prarit Lamba, Xiang Gao, and Julian J. McAuley. Mitigating hallucination in fictional character role-play. In Yaser Al-Onaizan, Mohit Bansal, and Yun-Nung Chen, editors, Findings of the Association for Computational Linguistics: EMNIP 2024, Miami, Florida, USA, November 12-16, 2024, pages 14467-14479, Association for Computational Linguistics, 2024. htt.tttss:/ htt//alaanma /acla//hooy/ org/ 22////22...2 f fiindiinnn---i weweddinnggmmlllpp.pmmmmmm 846
Alireza Salemi, Sheshera Mysore. Michael Bendersky, and Hamed Zamani. Lamp: When large language models meet personalization. In Lun-We: Ku, Andre Martins, and Vivek Srikumar, editors, Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume I: Long Papers), ACI. 2024, Bangkok, Thailand, August 11-16, 2024, pages 7370-7392. Association for Computational Linguistics, 2024, doi: 1LL863//12224AAL-LLLOOGG https://doi.oon org/ 00.86633v/2000 acl -lon...o...... 399
URL
Yunfan Shao, Linyang Li, Junqi Dai, and Xipeng Qiu. Character-IIm: trainable agent for role- playing. In Houda Bouamor, Juan Pino, and Kalika Bali, editors, Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, EMNLP 2023, Singapore, December 6-10, 2023, pages 13153-13188 18177. Association for Computational Linguistics, 2023. doi: 10. 18653/V 1/2023 CAMMNNP--AIN.BA MAIN.814. URL attps://doi.orr 18653/v1/2233 emnlp-maing 814
Noah Shinn, Federico Cassano, Ashwin Gopinath, Karthik Narasimhan, and Shunyu Yao. Reflexion: language agents with verbal reinforcement learning. In Alice Oh, Tristan Naumann, Amir Globerson, Kate Saenko, Moritz Hardt, and Sergey Levine, editors, Ad- vances in Neural Information Processing Systems 36: Annual Conference on Neural In- formation Processing Systems 2023, NeurlPS 2023, New Orleans, LA, USA, December 10 16, 2023, 2023. URL http::/ wipppppprr..ss.....pp.ppppppssem cccpcppppppp.eeeee farrssffllss/ee files/paperrrre Staper/2023/aee 21////222/////// http://22550000-0-baar---------- Conferaectt-oofeecceeee html
Kenneth O. Stanley, Igor Karpov, Risto Miikkulainen, and Aliza Gold. Real-time interactive learning in the NERO video game. In Proceedings, The Twenty-Firs National Conference on Artificial Intelligence and the Eighteenth Innovative Applications of Artificial Intelligence Conference, July 16-20, 2006, Boston, Massachusetts, USA, pages 1954-1954. AAAI Press, 2006. URL http:/ http:://www.... aaai . Otgp//ibarryAAAA// 200//////200//// awwaaaaa00655.... php
Romal Thoppilan, Daniel De Freitas, Jamie Hall, Noam Shazeer, Apoorv Kulshreshtha, Heng-Tze -zee Cheng, Alicia Jin, Taylor Bos, Leslie Baker, Yu Du, YaGuang Li, Hongrae Lee, Huaixiu Steven Zheng, Amin Ghafouri, Marcelo Menegali, Yanping Huang, Maxim Krikun, Dmitry Lepikhin, James Qin, Dehao Chen, Yuanzhong Xu, Zhifeng Chen, Adam Roberts, Maarten Bosma, Yanqi Zhou, Chung-Ching Chang, Igor Krivokon, Will Rusch, Mare Pickett, Kathleen S. Meier- Hellstern, Meredith Ringel Morris, Tulsee Doshi, Renelito Delos Santos, Toju Duke, Johnny Soraker, Ben Zevenbergen, Vinodkumar Prabhakaran, Mark Diaz, Ben Hutchinson, Kristen Ol- son, Alejandra Molina, Erin Hoffman-John, Josh Lee, Lora Aroyo, Ravi Rajakumar, Alena Butryna, Matthew Lamm, Viktoriya Kuzmina, Joe Fenton, Aaron Cohen, Rachel Bernstein, Ray Kurzweil, Blaise Agüera y Arcas, Claire Cui, Marian Croak, Ed H. Chi, and Quoc Le. Lamda: Language models for dialog applications. CoRR, 0/x/22011.82333 2022. URL https://arxiv.orr .rgg abs/ 02201.82230
Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, Aurélien Rodriguez, Armand Joulin, Edouard Grave, and Guillaume Lample. Llama: Open and efficient foundation language models. CoRR, abs/2302. 13971, 2023. doi: 10.48550/ARXIV.23322 13971. httsst //do1 2302. 13971
Xintao Wang, Yaying Fei, Ziang Leng, and Cheng Li. Does role-playing chatbots capture the character personalities? assessing personality traits for role-playing chatbots. arXiv preprint arXiv:2310. 17976, 2023a.
Xintao Wang, Yunze Xiao, Jen-tse Huang, Siyu Yuan, Rui Xu, Haoran Guo, Quan Tu, Yaying Fei, Ziang Leng, Wei Wang, Jiangjie Chen, Cheng Li, and Yanghua Xiao. Incharacter: Evaluating personality fidelity in role-playing agents through psychological interviews. In Lun-Wet Wei Ku, Andre Martins, and Vivek Srikumar, editors, Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), ACL 2024, Bangkok, Thailand, August
13

---

11-16, 2024, pages 1840-1873. Association for Computational Linguistics, 2024. doi: 10.18653/ VI/2024AAL-LLONG.OO0 URL jttps://////o org/ 1t0///....163//22222444 acl acl-long......... 102
Xintao Wang, Heng Wang, Yifei Zhang, Xinfeng Yuan, Rui Xu, Jen-tse Huang, Siyu Yuan, Haoran Guo, Jiangjie Chen, Wei Wang. Yanghua Xiao, and Shuchang Zhou. Coser: Coordinating Ilm- based persona simulation of established roles. CoRR, abs/2502.09082, 2025. doi: 10.48550/ org 10. 48550/ arXiv 09082
ARXIV.2502.00882.
Zekun Moore Wang, Zhongyuan Peng, Haoran Que, Jiaheng Liu, Wangchunshu Zhou, Yuhan Wu, Hongcheng Guo, Ruitong Gan, Zehao Ni, Man Zhang, et al. Rolellm: Benchmarking, eliciting, and enhancing role-playing abilities of large language models. arXiv preprint 10.00723 2023b.
Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia, Ed H. Chi, Quoc Le, and Denny Zhou. Chain-of-thought prompting elicits reasoning in large language mod- els. In NeurlPS, 2022. URL URL http:: nips cc/ htce/papr__ftt_ firr_sfiies_____ wwwlllespppeerreeee haper/2022//aa / 9455066155444ccf44ffffff7f11aa33 Aateaaa--bbbtaaate Abstract- Conerracct-oooeenneeeee hhtell
Chenyu You, Nuo Chen, Fenglin Liu, Shen Ge, Xian Wu, and Yuexian Zou. End-to-end spoken conversational question answering: Task, dataset and model. In Marine Carpuat, Marie-Cathenie de Marneffe, and Iván Vladimir Meza Ruíz, editors, Findings of the Association for Computational Linguistics: NAACL 2022, Seattle, WA, United States, July 10-15, 2022, pages 2219-1232. Associ- ation for Computational Linguistics, 2022. doi: 12..665/1122222NIIISSNNNAAA https://doe org/ 10. 18653/ www.:fffiiiinnndieeeen
URL
Pengfei Yu, Dongming Shen, Silin Meng, Jaewon Lee, Weisu Yin, Andrea Yaoyun Cui, Zhenlin Xu, Yi Zhu, Xingjian Shi, Mu Li, and Alex Smola. RPGBENCH: evaluating large language models as role-playing game engines. CoRR, abs/2502.00595, 2025, doi: 10-8550/ARXXV555000005555.
URL https::///// //wii org/10. wwtpg//..855////1 arviv. 2502. 00595
Xinfeng Yuan, Siyu Yuan, Yuhan Cui, Tianhe Lin, Xintao Wang, Rui Xu, Jiangjie Chen, and Deqing Yang. Evaluating character understanding of large language models via character profiling from fictional works. In Yaser Al-Onaizan, Mohit Bansal, and Yun-Nung Chen, editors, Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, EMNLP 2024, Miami, FI, USA, November 12- 16, 2024, pages 6015-8036. Association for Computational Linguistics, 2024. RtLhhtts::// htt: http///aaaaathooogoyyo org/ 2224/.224222 emnlp comlp-mminn main. 456
Mert Yuksekgonul, Federico Bianchi, Joseph Boen, Sheng Liu, Pan Lu, Zhi Huang, Carlos Guestrin, and James Zou. Optimizing generative ai by backpropagating language model feedback. Nature, 639:609-616, 2025.
Pengyuan Zhou. Unleasing chatgpt on the metaverse: Savior or destroyer? arXiv preprint arXiv:2303.13856. 2023.
Yujia Zhou, Qiannan Zhu, Jiajie Jin, and Zhicheng Dou. Cognitive personalized search integrating large language models with an efficient memory mechanism. In Tat-Seng Chua, Chong- Wah Ngo, Ravi Kumar, Hady W. Lauw, and Roy We- Lee, editors, Proceedings of the ACM on Web Conference 2024 WWW 2024, Singapore, May 13-17, 2024, pages 1464-1473, ACM, 2024. doi: 10. 44444455589333344544444 /ttptttss:// //opi:://diiiie org 21w..011111133343334444444 3644548
14

---

Codiiied RAG
Clasroter: (ihatsder)
Profile: [gessoges
Dicentyy and checlingg question profile pobmttiil by "(character" based on the sceae.
Codiifed Profile
Charactec: (character)
Profile (stalement)
Complete following one by
Explain the diacarter logic indiowed by the given peodile. What character Jehavior can be tigggeed by what kind of condi deas?
Complie logic profile
parse
string
outguts
triggndd charcter behostor aring statmmet) scone, satoments. ran pro definod fanction chock, sonneaoonee, question) that ourputs Poneaalsooon (Unimoww) to huild the logie. Dont use check, condition too many times ensure officiery..
Figure 10: The preprocessing prompts used in our experiments.
A Limitation and Future Work
As pioneering study that integrates executable code into character- based role-playing, this paper focuses on presenting the broad applicability and core benefits of codified profiles. However, several promising further explorations remained for future works.
More operators and helper functions First, while our framework centers on the check_condi tion helper function due to its semantic clarity and general applicability, future work can introduce additional operators and helper tools to support more complex behaviors. For example, in role-playing game (RPG) scenarios, codified profiles could include arithmetic operations for managing health or damage, procedures for activating skills, or functions for spatial movement and positioning. These extensions would enable more dynamic and interactive role-play beyond conditional responses.
World-level role-playing Second, codification can be expanded beyond individual characters to represent the fictional world itself. Codifying environmental rules, societal structures, or magical systems would allow models simulate consistent world behavior and responses. While this paper does not pursue world-level codification due to the lack of benchmarks for evaluating environmental reactivity, it presents promising direction for future research in narrative simulation.
Scope of codification Finally, codification introduces a potential risk of information loss by abstracting nuanced textual descriptions into structured logic. We view this trade-off that can be managed: codified functions can always reference the original profile when needed, and conservative codification that only translates explicit control flows already improves performance. Developing hybrid strategies that balance interpretability and fidelity remains an important direction for making codified profiles more robust and expressive.
These limitations reflect deliberate design choices to focus on a broad and extensible framework. We hope they inspire future work that builds on codified reasoning support richer, more controllable. and scalable role- cole-playing systems.
B Prompts and Templates
Figures from 10
13
show the prompts used in our experiments for result reproduction.
15

---

Spoiler Removal Prompt
Panptinse follexing charadte" (ctanoter) (ahoys rntered [chamoter]) mooove spotler from
(pangroph)
Action Extraction Prompt
#Scon:: (egioode)
TTikk: Bracket the senienoes in the scene alove that invohve active astions nazted ciurater: that reflest their personal atributes withwat any explanation.
Fültering ction Prompt
a Soane
(condition)
A Groznd truh Respozse of (churacter)
jartio;;
#Takk Dese ground-trrhh negonso describe ictive action of (choracer)) Dinefly inower only ceno.
Question Gomeration Prompt
SSene
(ocoditon)
Ground tuth Responce of [chareeter] (action)
Tack Whtee ountise quettion evausae whelber an pale-leying based
**action** truit (chamater)
Figure 11: The prompts used for building the Fandom Benchmark.
16

---

Chain-of-Thoon Thoughts Prompt
Barkgrooudd Koowledge
(gmondingg)
Soonn
(scese)
Queslion
(question) answering think slep
question.
Ressozing
Issue Detection Prompt
Sciene (scone)
(charactec''s Predicted Action Lyoediction)
Feharactee''s Ground-tralh Action (action)
(proñile]
Detected
[ssane)
#Task Joon
only loock cutput
Zresuring
3d": int
Revision Prompt
The loxing is profile causes the lean, slightly to (Pro defined supportove function 'chock, soonelscene, question) outputs Tree/also/None (Urkknww)) to bulld the logic.)
"pytton (code)
Codified Profile w/ Random
Clemoler (chanolert
Profiie: (statement)
Complete following by
Explain the chorzete logic indicated by the gieen profile. W hat character behartor ran be trggend by what kind of conditons?
Compiee the character this peodile statement function by scenel scenel, which takes
function the and string logae. facig madocnnes, you mindom.mmmmm)) <p' choice' sutputs Tree/eabe/Nane: (Unknown)
biggered
statements, You
Don't aee check condition too many time ensure efficiecc..
Figure 12: The shared prompts used for evolving profile and scholastic response.
17

---

Condition Checking Prompt
Scate: (some)
Question (question; Directly only vestoe/unkoon.
A Answer:
Role-playing Prompt
Background Knowlldge
(grounding)
#5oone
(scmne]
#Questoon
(question) Acswer' ouncise nuraiion
NLI Scoring Prompt
(scene)
Your Response: (peediction)
Ground Trath: (action)
Soore action (characler) the response besed on ground tralls
A- The ground truth entails the action (chometar) the regonse: (Following the same character logic:)
B: The ground buth nestral the action of (characier) in the respozse. (Reilleting different facel.)
ground truth contrdidds adtion of (character) the nepoose. (Following cortesdicted charsc logic.)
Output in Joi:: jaon
"ossoningg" "....
scom" 'A/3/C*
Figure 13: The shared prompts used in our experiments.
C Human/LLM Preference Evaluation
Human Preference Evaluation
LLM Preference Evaluation
34
Wiz
Wis
76
Cadilled ProBle Focual Pullle
Cadilled Prodtes Coulleed RAO
Tarke Tale
Code vs Tede
Catotal Trxsel Peoile
Cadilled Prodl Collled AD
Baraa Tawe Code
Codevs Cate
Figure 14: The Human/LLLMbasee preference evaluation results.
limitation the NLI score is its inability to capture fine- tne-grained differences in response quality, since responses with the same NLI relation (e.g., entailed) are assigned the same score. To address this, we conduct a preference- -based evaluation where both humans and LLMs are asked to choose the better response between two candidates, given the reference. L.MSs are prompted all scenes with responses shown both orders to mitigate position bias, and a tic is recorded when the model selects different responses in two runs. Human evaluators assess scenes per character, selecting preferred response or indicating a tie.
Figure 14 presents the results of this evaluation. First, codified profiles are preferred over both textual profiles and Codified RAG by both human and LLM judges, indicating their advantage in producing precise and contextually faithful responses. While Codified RAG achieves higher NLI scores than textual profiles, loses the advantage in preference evaluations, likely due to truncation or omission of relevant details during retrieval. Second, ensembling codified and textual responses further improves performance, though codified-only responses contribute more wins, suggesting they provide the stronger baseline. Notably, we observe that LLM-based preferences tend to result in
18

---

Best Performance
Worst Performance
Rank
Character
Win Rate
Artifact
Rank
Character
Win Rate
Artifact
1
Sansa
81.25
AGOT
60
Winry
32.00
FMA
2
Tywin
70.00
AGOT
59
Mugi
34.15
K-On!
3
Littlefinger
68.42
AGOT
58
Riza
34.78
FMA
Joffrey
67.86
AGOT
57
Stannis
35.00
AGOT
Jon
67.57
AGOT
56
Iroh
38.18
ATLA
6
D' D'Arby
64.71
JOJO
55
Bran
38.89
AGOT
7
Nagato
63.64
Haruhi
54
Koizumi
41.18
Haruhi
8
Hol Horse
62.07
JOJO
53
Sandor
42.86
AGOT
Lust
61.54
FMA
52
Joseph
42.86
JOJO
10
Igey 60.71
JOJO
DIO
44.68
JOJO
Table 4: Win rates of codified profile against textual profile.
Model
deberta-v3-ban
1lama-3.22 3.2-1bitt
11ama 11ama-3.2-1 3.2--bbitt
11ama-3.15 1--bb-rr
Instance/s
69.6
34.3
14.0
6.1
Table 5: Efficiency comparison among different models as condition checkers.
more ties and occasional misjudgments, likely due to distraction by irrelevant details, reinforcing the importance of human judgment in evaluating nuanced role-play quality.
Character-wise Comparison Table 4 presents character-level (characters with at least 20 scenes) comparison win rates between codifie and textual profiles (ties are removed), highlighting which characters benefited most from codification. Notably, the -op-performing characters such as Tywin, Littlefinger, and Arby all exhibit subtle, strategic, or context-sensitie behavior in the source material. These "fickle characters" often require conditional responses based on shifting alliances, hidden motives, or indirect manipulation, making them well-suited to codified logie that explicitly encodes behavioral rules and icenario-based decision-making. In contrast, characters with lower win rates, such as Winry, Mugi, and Riza, tend to exhibit more emotionally driven or straightforward behavior, where textual prompting may suffice and codification provides less added benefit. This pattern suggests that codified profiles are especially advantageous for characters whose actions depend nuanced reasoning and consistent application of complex behavioral constraints. Such discovery further shows a complementing relation between textual and codified profiles, explaining why the ensemble between them generally works.
Out-of-script Scenes To evaluate the practical applicability of codified profiles beyond scripted nar- ratives, we create 200 interactive scenes featuring diverse scenarios such as playing, battling, and ne- gotiating. Following the methodology of our JOJO case study. we prompt 11ama-3. 1.taa...-bb--. 1-t--3.--bbiistttee inbbintttuct for 3-round interactions using both codified and textual profiles. Codified profiles demonstrate strong generalization, achieving 35.5% win rate, with 40.0% ties and only 24.5% losses (based gpt-4.1 preference), reinforcing their effectiveness in worldo dynamic rolc-playing contexts.
D Condition Checking Efficiency
In Table D we present the condition checking efficiency of different models. We calculate efficiency on single S0G A100 with batch size The distilled deberta-v3-ban is shown significantly boost the efficiency when used as the condition checker for LLMs like 11ama-3. 1-8b--it..
E Codification Performance
We manually analyze the codification ability in the preprocessing stage on 200 cases grouped by different attributes (except codes with if-depth 4, with only 16 cases). As shown Table 6 gpt-4. achieves high overall accuracy in translating natural language into structured logic. Precision
19

---

If-depth
Grouped by
w/ Branch
w/ Random
Personality
Ability
Relation
2
3
Precision
98.5
96.0
92.5
93.8
98.5
91.0
97.50
92.50
96.00
Recall
94.0
93.0
89.5
81.3
95.0
96.5
96.00
94.00
98.50
Both
94.0
92.0
87.0
75.0
95.0
89.5
95.50
91.00
95.00
Table 6: Manual evaluation on codification of profile segments grouped by different attributes.
Tyrion's ttitude tuttude Tow ar Insults (NGOT)
paree simee(rrae))
Tytoon has enduzd back wetteer fron others
cameessooeeccces, making a jake irastt Tyrian's besghtz"):
throughasst his life per be has developed meilaanc and oun aislly dissss jakes about iis beight evege when they come flon lis fafle....
*Is seow, ststemntssss appesit Tyrdes is presssely tart by his rathor's Jesolt dbeat his height.")
neture stateootsssssssoo Typesii ondlly stontsses jobes back abeat sis teight")
Tyrion's Relation with J aime (AGOT)
Jynon's slder frotter Juime Dember vis zaketained positive statiosik with hin Jaine adnund Trata for inddiogeos yos and real sena Sequle small sazur eftza decanding zmn agenet thei tamdy's tansh instueett tynon, in tem. held ceep reppct Jassa, avon cheosag liss charpion dariag a
only fimily
faeily stssec?)):
if rieck sreen(sime, "it sale preset)"):
scen, www.etttteenttoooo appanit Tyries seda Jaine's support and feels confortel by his prosece."
cove www.:ccttttttppaoell.ooo "ypra Tyrlas sistes talee wer posteet to uupert via!")
Eyrne
sef panne by conne/crman)
Wor king M Mechanism Lovers Lovers(O00)
cleck Moco__acee/cccn,, "Is Lovers iraide viltten's bruda"");
scens, www.trtttttttt.om westtenetss..pppte uppeed ("Sndyy des acts arragantly, boodin be is protected the hos tage citaatiee.")
Steely Das Steeel knows Levan, is
2f cescssa, "Ia Stooly las nakdng danands or trylng ts control apraans""):
Stand oqpabli anreiig penserss bran amplltying any patz expanenced by Dan. Lsaddaring it das viciis
rean others.")
check sceentsieee Stoely Dae threatennt attackel"") ud22 ampllftied apppndd sefilcted en the vietos.:;
ccens, wtw..tttttaattoo sts. ("peed(" victie experdesces auptiitted pade das to covane! abdllny.")
3cenc_nattmenss
Figure 15: Codification cases for personality, relation, and working mechanism of superpower.
(codified components are all correct) exceeds 98% across shallow control structures and most attributes, indicating strong alignment with intended behavior. Recall (all important information is codified) declines slightly with deeper nesting (81.3% at depth 4), reflecting increased complexity rather than failure. Codification remains robust across personality, ability, and relational traits, with F1 scores above 95% in most categories, demonstrating minimal fidelity loss.
F Extended Case Study
Codification In Figure 15 we showease several codification workflow, including personality, relation and working mechanism of superpower. The cases validate the ability of codified profile to reflect exceptions ("except when insults come from his father)"), situational thoughts ("Is Jaime present?"), and superpower checking ("Dan is harmed"- "The victim is harmed." Loverss inside victim's 's brain"), These cases provide a straightforward illustration on how codified profile builds up the character logic.
Evolving An evolving case about Jotaro's fighting strategy is presented in Figure 16 which shows mismatch between the predicted and reference actions when he is trapped underwater by Dark Blue Moon. The initial codified logic assumed Jotaro always resorts to brute force, resulting in an incorrect prediction where he punches to escape. However, the reference reveals that Jotaro uses the more precise Star Finger technique to blind the enemy and break free. Based on this contradiction. the profile is revised to reflect more accurate strategy: Jotaro prefers clever abilities like Star Finger when brute strength is ineffective. This update enables the codified profile to better align with his adaptive combat behavior in future scenes.
Controllable Randomness We present the specific codes to demonstrate how codified profiles enable controllable randomness in character behavior. In the first, Robotia plays poper-sciisoor-rock.
20

---

Sene
Contradiction
Respore
Refermmce
wiks, au balke Sulystasine sina gel
Bock Moea fra
Jolue Ste Lutzur
Sau Flutnas coverd by
Sepectted:: Jran word crrely stuliyiag devee exconallini lidks 18s Fager fiom livell frm stair nahor the auplisiig anlinnd luds Sar
paward uwlklped staad by Dusk Rioo Maocn Eabyus then por un umar tu griee winch th purpparr (rwwes han
eneralehhngg trnkk from
te banacks asi thee shila Durk Blas
stragfi, lacaus
xas yu fliges ase Sai Finger
vi proettt
Elao Noath gyi
Dark Blue Moor drags tatao underwater and traps hix nith berascleswblee Sakystz bale help.
Prdiction: ctace livals fiee and punches Dark Blue Mlson with braia foros. Relammee krter usa Ste Finger stab Dark lille Mexn sayes and pxspe.
paren, by (c
def parvel by hy_.scon(faeess)-
threet enary vothii Jatano?
tecare rectratind,, unskoned, brate force tneffactive?
elir check, aceruiscare, "Ia there threet
acrie, erateneate.. sgpeod"" Sattro usee a cleasr, prectis, on uncosveetoeea sullity of Site Plattin Like Star finger to aversom street.))
stabamrrt Jpptrri Jotaro
wlthin alif check ccarefacann, ann, "Is thene threet or anaey witnin 2-5 meters of Jetero?"); attack, czanter threat.))
Istaro?
Star owsedelldi power, speed,
avendellingg power,
(hreat.")
jelano always use
Jatano taes class abilit Star Platirum Sue Finger divss vot
Figure 16: case for the evolving mechanism for codified profiles.
spersstwee adat scuate, btblle la axdiaiility
Roboda
Rroothils rignresmbet but cocastoally Is toxer vith probailtty.
andanly celnd pontie
Ieport
Asport randos
pera, by (y,reen))
parse be scem(srend)
scare jestoments
ytocmerts
nowerachairra-ee rack
segative
scone www.tteettttt......oo appordl kapotta tehewd In
outtie "pestttee"
mestmeets txtsts
Jolition respense
randen cawtoll 8.11
sslacts ((ees) "1]
<cew cestteettt...... sppaa""edari tataes
Egp eprasses Fanoe witty ramurt 2400.7)
stateenat
rstare 2499Jt0c00e
Figure 17: Codification cases with randomness simulation involved.
Multi-outrome Expressiveness
Softened ssertion
Rare Event M Modeling
Horch whene book cynial
Nagatel Koye Nigeoomncly
gare
scnnslscere)
Iepert
pares byg (us.ccccceesss
parceJa, cceencuueee))
clikk ciretcciees tame openatural bineve
Roabely chose teturm inrradiity.
ni fenned cn Eink
diclave
reaction randan cholcel!
Uaa bascess intenseiy
rancaa
sncaarrandast)
rearcs.".
188 chanee the fangees sanctiig olos
sceas at aeaeees " sagito rarily boinks
scbuttee...
sose, ststenerts appurd vot forgets soest
2f rances renienll 6.1: 225 evence per acuee
1)
ELutancs, sppearing distracted."
appen(rrccctins)
Fetemm scree statemedss
Figure 18: Codification cases of Fandom characters with randomness simulation involved.
21

---

Statisties (Main/Minor)
Haruhi
K-On!
JOJO
FMA
AGOT
ATLA
#Character
5/-
5/4
7/9
5/7
11/19
4/7
#Scene
48.4/-
173.0/49.8
111.6/20.8
85,8/32.9
63.0/33.1
214.5/31.1
#Word per profile
782.6/-
676.4/449.2
925.0/488.8
1564.6/1330
1517.3/1243
1578.2/740.1
#Paragraph per profile
11.8/
9.2/7.0
15.7/9.9
16. 16.0/15.1
14.6/11.8
14.5/9.3
Table
Important statisties of the Fandom Benchmark.
with each move selected uniformly using random. choice, ensuring balanced randomness, In the second, Robotia expresses either a positive or negative emotion with equal probability, highlighting how codified logic maintains behavioral diversity more reliably than prompt-based sampling. In the third, Robotia consistently behaves logically but has a 10% chance of adding humor, showing how low-probability actions can be precisely embedded without disrupting core traits. These examples demonstrate how codified randomness offers fine-grained, interpretable variability beyond what temperature tuning alone can provide.
Randomness in Real Cases Randomness in codified profiles enhances realism by supporting three key concepts: multi-outcome expressiveness, softened assertion, and rare event modeling as shown in Figure 18] For example, Kyon's 's reactions to bizarre events are randomly selected from a set of consistent yet varied responses, enabling multi-outcome expressiveness. Yui's intense focus includes a 50% chance of forgetting other responsibilitiees, introducing probabilistic nuance that softens rigid assertions. Nagato's 's rare behaviors, like not blinking or gazing into the distance, are modeled with low probabilities, capturing subtle traits through rare event modeling. Together, these uses of randomness enrich character behavior while preserving logical structure.
G Benchmark and Character Details
Haruhi:
"Suzumiya Haruhi" is a high school sci-fi comedy centered on girl who unknowingly possesses godlike powers, dragging her eccentric club into supernatural chaos.
K-On!: "K-On!" follows group of high school girls who form light music club, bonding over tea, friendship, and their shared love for music.
JOJO: "JOJO", 's Bizarre Adventure" is a multi-generational saga where members of the Joestar family battle supernatural threats with flamboyant powers and style. We select season 3, "Stardust Crusaders". which describes Jotaro's 's bizarre advantage from Japan to Egypt. fighting against DIO. FMA: "Full Metal Alchemist" tells the story of two brothers who use alchemy in a perilous quest restore their bodies after tragic experiment. We select the 2009 edition of FMA.
AGOT: "A Game Thrones' is a gritty political fantasy where noble families vie for power in a brutal world of betrayal, war, and dragons. We focus the first 3 seasons of the TV series.
ATLA: "Avatar: The Last Airbender" is an epic tale of young boy who must master all four elements stop a tyrannical war and restore the world's balance. We focus on "Book One: Water".
Statistics Statistics in Table highlight the depth and breadth of the Fandom Benchmark. The average number of scenes for main characters ranges from 48 to 214 scenes each, with minor characters adding dozens more, resulting in a total of 5,141 annotated scenes. Profiles are notably rich, averaging around 1,000 words and 15 paragraphs for main characters, with similarly detailed coverage for minors. This combination of long-form profiles and large-scale scene coverage offers a rigorous testbed for evaluating models' ability to reason over sustained character logic, adapt behavior across contexts, and handle diverse narrative situations with consistency.
we present brief introductions of characters involved in our experi- ments for readers who are unfamiliar with these artifacts. In Figure [9] we also showcase a profile and testing cases for better clarity of our benchmark.
Characters In Tables 8 and
22

---

Haruhi
Haruhi eccentric und energetic high school student whose curiosity and uncomventioal outlok drive the extracedi-
nory evenes the "Haruhi" series
Kyon
Kyon a wiryy and pragmatic high school student who serves as the narrator and reluctant companion to the eccentric
Uaruhi
main
Naguto
Nagato Yuki is quies, enigmatic member of the SOS Brigade the "Harahi Suzumiya" series, known for her extraordinary intelligence
Harhh Suzumiya in the 'Haruhi Suzumiya' series.
mysterious origins.
Kaizumi
Koizumi is mysterious and ever-smilingg transfer student in the "Hanshi Suzumiya" scries, who serves as an esper and key member of the SOS Brignde.
Asahina
Asahina Mikaru shy and gensle upperclassman in the "Harahi Suzumiya' series, often roped into the SOS Brigade's
antics as their adocuble mysterioms "muscot."
Yui
Yui Hirasawa is the cheerful and airheaded lead guitarist of the high school band in the anime "K On"O."". known for her infections enthusiasm and love
Ricsu
Rits Tainaka is energetic and playful drummer of the high school band in anime "K-On!" known her mischacvous antics and close frtendship with her bandmates.
main
Mio
Mio Akiyamaa is the shy and talensed bassist of the high school band in the anime 'K-On!", known for her gentle personality and musical prowess.
Mugi
Mugi, whose name Tuumugi Kotobuki, gentle cheerful key buyboardist in anime "K KKOOn", known for wealth. kindness, and love of sharing sweets with her friends.
K- On!
Azusa
Azusa Nakano is diligent and calented guitaist who joins the light music club in the anime "K- Oa!""", quicklly becomning integral and endearing member of group.
Sawako
Sawako a shy and soft splkes high school girl who gradually opens up to her clussmates in the heartwarning series
"Kini ni Todoke."
Nodoka
Nodoka a gentle and bookich high school student from the anime "K-Oo!", known fire her close friendship with Yui
Hirasawa her responsible role as member the student council.
Ui
Ui is kind-heurted and responsible younger sister in "K-On!", known for her maturity and unwavering support for her older sister, Yui.
Jun
Jun is thoughtful and reserved member the group 'Kon'' known their quiet intelligence and unwasering loyally their friends,
Edward
Edward Eirie as brilliant and desermined young alchemistt who omburks on a perilous journey to restore his and his brother's hodies after a failed alchemical experiment in "Fullmetal Alchemist."
Alphonse
Alphonse Elric gentle and hand-hearted young alchemist whose soul is hound to towering suit of armor after failed alchomical ritual in "Fullmetal Alchemist."
main
Winry
Winry Rockhell a talented mitronal engineer and childhond friend of the Eiric brothers in "Fullmetal Alchemist," known for her mechanical experiis: and compussionaic nature.
Roy
Ray Musting charismatic
ambitious State Alchemist "Fullmetal Alchemist, renowned mestery of flme alchemy and his unwavering deserminatiin to reform the milliary from within.
Fulimeal Althemist
Ling
Ling You a charismmtic and ambitious prince from Xing in "Fulliettal Alchomisi," driven by his quest for immortality and deep sense of responsibility towand his people.
Envy
Envy cunning
sadistic homunculus from Fullmetal Alchemist, known for their shapeshifting abilities deep-seared resentment toward humanity. Lzuma Curtis is fiercely skilled alchemist and martial artist who serves as tough but caring menter to the Elric brothers Fullieetl Alchemist.
Izumi
Lust
Lust, one extendable fingers and her complex, enigmatic motivations.
seven Homunculi "Fullmetal Alchemist," a cunning and seductive antagonist known for her deadly
minor
Scar
Scar is vengeful and enigmatic warticr in 'Fullmetal Alchemist." driven by the trauma of his war tom past and mission punich State Alchemists for their role the destructinn of people.
Greed
cunning and charismatic homunculus from Fulimetal, Alchemist. driven by an insatiable desire material possessions, power, and immortality, yet harboring a surprisingly complex semse of loyally and independence. Riza Hawkeye is highly skilled sharpshooter and the loyal lieatenant to Colonel Roy Mustang in Fullmetal Alchemist, of duty, and deep of loyalty.
Riza
known for her calm demeanar, uzwavering King Bradley, also known as Writh, the enigmatic and fearsome leader Amestris in "Pullmetal Alchemist," concealing his trae identity as a deadly Homunculas.
King Bradley
Aotaro
Jotaro Kujo is stoie and powerful high school student who Stardust Crusadess" renowaed for iconic Stand, Star Platinum, and his unyielding resolve.
the protagumist of "Jalo's Bizarre Adventure:
Polnareff
Jeun Pierre Polnureff is a brave and fumbbuyan French swordsman who joins the Joestar group in 'JoJo's 's Bizarre Adventure; Starchst Crasaders." wielding the Stand Silver Chariot in his quest for justice and reyenge. Joseph Joestar quick witted and flamboyant protagonist from 'Jolo's Bizarre Adventure." known for his clever tactics, brash personality, signature catchphrase.
Joseph
next DIO is a charismatic and ruthless vampire antagomist from the "JoJo's Bizarre Adventure" series, known for his overwhelming power. conning intellect, and iconic catchphrase. 'Za Warudo!"
main
DIO
Kakyoin
Noriaki Kakyoin is cool and intelligent Stand user who joins lotaro Kujo and his friends their journey in 'Jalo's Bizame Advesrune: Stardust Crasaders," wielding the emerald shooting Stand. Hierophant Green.
Avdol
Mohammeed Avdal is a wise and loyal Stand user from Egyps, known for his fiety Stand Magician's Red and his unwavering support of locarn and his friends in "Jalo's is Bizame Adventure: Starduse Crusaders." Iegy is small, scrappy Boston Terrier with bad attitude and love for coffee flavored gum, who joins the Joestar 'Jolo's Bizarre Adventure: Stardust Crusaders."
1020's Dizarm Adventure
Isgy
group as a Stand Hol Homs is cunning and flamhoyant gunsligger Stand user from "Jolo's Bizarr Adventure: Stardust Crusaders." known for wielding the sentient revelver Stand, Emperor.
Hol Horse
Alessi
Alessi minar antugonist from 'JuJo's Bizarre
Stardust Crusaders." known for his cowardly demeunor and
Stand, Sethan, D' Arby as cunning and manipulative gambler from "Jalo's ' Bizarre Adventure," 'nownn for his deadly games of chance and his ability to steal soals from those who lose to him. Steely Dan cunning
the power to regress people into younger versions themselves.
D' D'Arby
Steely Dan
sadistic Stand from "Iolo's Bizarre Adventure: Stardast Crasaders." known for his and control
manipulative tarties and his Stand, Lovers, which allows him Vanilla loe is nuhlless and fanatically loyal servant of DIO in 'Jolo's Rizare Adventare: Standust Crusadess" wielding the deadly Stand Cream, which can erse anything it tomches from existence.
his enemnees
minor
Vanilla Ice
Enya
Enya the Hog cunning and malevolent Stand user in "JoJo's Bizarre Adventure: Stardust Crusaders," serving loyal follower
and wielding the deadly Stand Justice.
Oingo
Oingo a mischievous Stand user from 'Jola's 's Bizarre Adventure: Stardust Cracaders." known for his ability to shapsshift his appearance using his Stand, Khnum, and his comical partnershpp with his brother Roingo. Per Shop is menacing, highly intelligent falcon who deadly Roingn is rimid and eccentric Stand neer from "Jolo's Bizame Adventure: Stardust Cruaader,"" known for his prophetic comic book Stand Tohth, which prediets the future in hizarre and aften literal ways.
Pet Shop
the guardian DIO's mansion in 'Jalo's Bizarre
Adventure: Stardust Crusaders," wielding
Hocus.
Boingo
Table 8: Information of characters in our experiments (1/2).
23

---

Tyrion
Tyrion Lannisier, the thsp-willed and Mamp--ongued youngesi son of Lord Tywin, navigates the treacheouus politics of Westeros with cunning and humor despite being scorned for his starure.
Ducnerys
Dacnerys Targaryen, the exiled prineess of the fallen Targsyyn dynasty, begins her journey in "A Gume of Thrones' limid young girl sold into martigge, destined become a powerful and determined Censei Lannister is the ambitious and cunning queen of the Seven Kingdoms, known for her beaury, ruthlessness, and fierce devotion to her family.
Cersei
Jaime
Jaime Lannister, known the Kingslayer. is skilled and charismatic knight of the Kingsguard, infamous for kcilling the complicated loyalties.
main
Mad King and renowned for striking Robb Stark is the eldest son of Eddard and Catelyn Stark, a dutifal and honorable young lord who shoulders great responsibility as heir to Winterfell.
Robb
Eddard
Warden the North. Arya Stark is fervely independent adventuroes youngest daughter Eddard Catelyn Stark. Catelyn Stark is the resolute and fiercely protective lody of Winterelll, whose loyalty to her family shapes her every action.
Eddard Stark, the hanorable and steudfast Lord Winteriell,
Arya
Catelyn
Sansa
Sansa Stark the eldest daughter of Eddard and Cauelyn Stark, known for her beauty,
and romantic dreamss
Snow is brooding, illegitimate son of Eddard Suark, raised at Winterfell and haunted by questions identity belonging.
Bran
Bran Stark is the curions and adventurous seven-year-old son of Eddard Stark, whose life changes forever after a fateful fall.
Tywin
Tywin Lagmister the fornidable and calculating heal of House Lannister, renowned for his ruthless political acumen and unyielding pursait of power.
A Game of Thmoes
Varys
Varys, known the Spider, the enigmatic and cumming Master of Whisperets King's Landing, weaving vast web
of spice throughout the Seven Kingloms
Jofirey
Joffrey Baratheon is the arrogunt and cruel crown prince of the Seven Kingdorns known for his golden hair, petulant
domennor, and penchant for sadistic belavior.
Theon
Theon Greyyoy the charismatic and cocky heir of the fron Islands, serving ward of House Stark in Winterfell.
Stannis Litlelinger
Stannis Baratheon, the stern unyielding younger brother of King Robert, is relentless claimant
Iron Throne.
Potyr Buclish, known as Litleeinger. a conning and ambitious master of coin at King's 's Landing, remowned for his munigulative schemes and silver tongue.
Melisundre
Melisandre, mysterious and powerful priestess from Asshai, serves Stannis Barathoon wickling shadowy mapic the nume licty god. R R'hllor.
Jorah
Jorah Morment is disgraced knight from Bear Ishand who serves as an exiled advisor to Daenerys Targuryen. Sandor Clegane, known as "the Hound." is fearsome and brutally bonest knight with a burned, distigured face who the gurrd to Prince Jollry Buratheon.
Sander
minor
Shae
the Lannister ammy. Margaery Tyrell is the clover and beautiful daughter of House Tyrell, renowned for her political acumen and poised umbition in the courtly intrigues of Westerus. Davos Seaworth, known the "Onion Knight." former smuggler tumed loyal and bonest advisor Stannis Baratheem.
Shae is young
alluring camp follower who becomes Tyrion, Lannister's lover during his
Margaery
Davos
Renly
Renly Baratheon the charismatic and handsome youngest brother of King Robert Baratheon, known for his charm, wit. and political ambition. Broan cunning and progmatic sellsword known for his sharp wit. deally skill with sward, and willingness to fight the highest bidder.
Broan
Brieane
Briennc of Tarth, a formidable and loyal warrior known for her unwavering honor and uncomventional appearance, introduced as a noblewoman who defies traditional gender roles in pursuit of knighthoud and justice.
Barristan
Bartistan Selmy, known Barristan the Bold, is legendary and bonorable knight the Kingsguard serving King Robert
Manoe
Mance Rayder, unce a swom brother of the Night's 's Watch. is the charismutic and comning King- Beyond-the-We thed-----WWee Wail who unites the wildlings.
Craster
Crasser cruel and incestuous wildling who lives north of the Wall, noterious for marrying his daughters and sacrificing his
the Others.
Olenaa
Olenna Tyrell, known as the shapp longued and cuaning "Queen of Thoms." is the formidable matriarch of House Tyrell.
Aang
Aang the fun-loving, peace-seoking last Airhender and reluctant Avatar tocked with restoring balance a war-torn world.
Katara
Katara is compusionati and determined waterbender from the Southen Water Tribe who plays a crucial role the fight against the Fire Nation alongside Aang and her friends.
min
Sokka
Sokka is witty and resourceful warrior from the Southem Water Tribe known for his boomerang skills, inventive mind, comodic personality.
Avutar: The Last Airhender
Zako
Zuko the conflicted and determined exiled prince of the Fire Nation whose journey defined by his quest for honor and self discovery.
Irah
Irah wise and compascionate retired general of the Fire Nation, known for his love of peofound spiritul insight. and unwavcring support for his nxphow Zuko. Than is an ambitions and nuthless Fire Nation admiral whose relentless pursuit of power and glory makes him
Zhao
formidable adversary Aang and his friends.
Jet charismatic and liereely determined toenage ficedom lighter known leading group of rebels against the
Nation with morally anthiguous approsch justice.
minor
Yue
Yue the gentle and compassionate princess of the Northern Water Tribe whose destiny becomes intertwined with the
fate of the Moon Spirit.
Suki
Suki the skilled and comragenus lender Kyoshi Warrios known for her exceptional combat ahilities and
unwarering sense of justice.
Apyu
Appa Aung's 'ss loyal flying bison and stendfostt companion known for his gentle nature, immense strongth, and ability to
sour through the skies.
Pakku
Pakku master Waterbender the Northem Tribe known for his strict teuching style and deep sense tradition.
Table 9: Information of characters in our experiments (2/2).
24

---

Profile
Tyrtach manter, Jesera Lannidee garned way durig ane tirs, aed both Tysl Comeet anrty ho his iepoecblee for the tropedy.
Dycam wllun mile ded dulur usi enioune by decup am lus 'lag" and 'H "iallau adumplo endomas kibia naiikaa lelalll colom. il whibk with draaion Like Tyska laurs concommtie woahh and canta
a momann sarryy they reight hasn have abandiund har dans canaion provited
ds au di sstaas tut jaio mual as evaall un beddaadd is dung ac. Malk dadl widh to deaedess cookted (a gark sux Trali cou stap, bayy ovenu dly id is love caii swardy Jahn
Tysts
guonte
indere to Tyeaniless le siryaaty
Whike tic ohillyg yowart line, thy
of
Ciiteryy whoe
Judnne war mas staaed. Fyrice io coad to be and betigg of funky and ther ad an the thmms erpectal ahhe Comata marrice to ktag Stact Duniaaee.
Tydan tne renatabbl tanal agrat intivicaul who kasc pleczsi mate ba eddertbingg shiliggs evmpen
ba read greaest aast As mumber at Youss Lanat dee
expetast uphidd taed nacie repeiative coppl bancing
boost ans offe uatin thes introur thee tho anderettmn mate ine or can tptt dit shantone. sus areme leveraing teeally came addevicall people ds well la malem elu abto be shi, olkn vuli antaaia inly Jullon and Cinse bui socn aod play geen lie Lid alliftge call byy sell.
plare
Cycmeii makard lund keukkann anda (res others farragloen, in bis, ye le bus dom deye couh and unily fius ou plac des legid, coup, when Gay comerfon hos felle, Hes abboss) Jas Sture huallny
for Sillen ceroade buutuui, mules Tycnus sym pkll los pil omilare you di up your
uxme mut
dengle diabiiity Tymariic Arsenas where fmull and diit
ahreet
Stvrt
baraed
pust-ll durb cnpuoaal bn Juas, Shanc' utta es ot aiai landuci lade gal hodiag ba snile to aill Tycau in hnd thee wia Led lis with beccat co cus und josstoo vetur of lauat aud digat
Vown the Visterr 2C' sueines They contact oet and henal hort are cerpiaa and thr planical mnd sinn with are fell hut and care dr once of wanir, both aew conquer mare capalde of somree, inttally
Virys drovieped
oith
Ty pan her dhr other hut ges mocosicaly de fovd, thnt and the gl ooe ne way to crpe with thes handh teetmment be nedend thoughee hi thes When he sirosd spoot er crmmontivnaal the
hove
truaed lan. Tyrtie legg for love and socip aaas usi iaio desple bus whnt otac duep las his
Tyrlen has in if atoveiing ys with be fonily many of whoon whete monimee a tovantss tire vid lonely cooooal thei saore it of de rastee Camae, biic line reporaaiio for their mathers fork hos ticher Trurts sharm Dapae's resettrant iur ba beloved oud desng Tysteh A.taregt Tyras adiaem augus Tystcci penen, skoert dimatai is agat ciliere. Tyuts
Bubled lin
nathr
inteppnttgg
an jelgeee cene hunall ahe lan.
Tyrteh elder Tysten trothe Jasren vas only ty momber do in sebaittdd a pittiee mást most io with him, jain adror nnd Tyree for an tasd leeece and not deapte tix muil dhaus, otter doftectig tate quarod fesr fanalyy Land seutoaal lead las akk lasdie dim rquect be jume. cves thet has dhom as dunin biul by coaled Bycce mas stowrg with Tys suparts my las
cukles Mornil
Myratluskeeed
stiee
biguano una sakk ralas Keng's Lunding yakr. lans anrd hoppy der dins dogil la sous wull love un finc Eir divste anaoonaas whe accas fatno qpei lassang in Sourllaa Bark and
Allur eqpathmuugg feut peoveu kowes Tyzaa becouss caeudy doledd add living le ciskes like bause of lesing kas ouu pasiins und pesarieds Helledall
like sase Thene Tyres wypthee brglins vinw becinniy and pare it powerr when rines flreryy le exprrsee of figross vi the finaooe, oree stivel no sayley Athough
an fhome is ietns snnn high rnport out the
and oeainal tha chuage the alan ir and fortuy an snidiet oer Dan tn fundy same for balk anci ene pratecioo.
Tyslen in highly si led pe zat purting odia ioatatoon and dii dpiemuc, though abditan tncl strakgas buctsiar ean vated Like tiche, Tiwiss Tyrise set pectacuual daty adept budeshikk but arpaly to ms actane tast dig ot tit dicoossidly dy orthotrrnn in anben East the Blaccvattr attep willine and ha smopets sortss Honcmer,
der cu approath zeth amodd has rralag is ai Fasteeys spatat Carvel mecutting to soreaa mntcorete betfe plac exoighten fer the captur ot Cuabero llace Cor secuurttyy Duetayy gann ixpurtest vita lis
Dpcm lun oo Tia des fenm
ou and Dammyy avid musy videmar selve pn klams ening foumaar diwuet fillow kullans fautalge, Hecomiitedde
poiooi mininng
Siotne
PINK
Wi
Santa not being elent and iegjett i ichers the aerive king Ribbet daete with het baighs tidked bebect gaod aot her aamly.
Tysteo las daacr with Lord ieao Sirat call quasioca lie doou de massaos el de rayi las Jass cas aud sxled is the Migit Wisc usi iosal Boea Ovenauderd da City Warkh in flaae Camel crativer Tetirs i wilion
Btannt flmaaah lores cnppp pay las sulle Lyyaii eack lo Quarc smpudianss Alac cad kas foud larva wup to be ard de losa salada Wuratfll nacs
nopucte fayant Conak andit
Tyrie,
"I'
Wha artion dree Tyrer betcte love cetele to Wh
apeina Rrves as Connusderal the City Wark?
enyogy the of proditow reved Rox.
the romnethe dais loding the oppor the people dhe dowr dertte wit
Figure 19: An example of a profile and testing cases used in our experiments. (Tyrion Lannister)
25

---

NeurIPS Paper Checklist
The checklist is designed to encourage best practices for responsible machine learning research, addressing issues of reproducibility, transparency, research ethics, and societal impact. Do not remove the checklist: The papers not including the checklist will be desk rejected. The checklist should follow the references and follow the (optional) supplemental material. The checklist does NOT count towards the page limit.
Please read the checklist guidelines carefully for information on how to answer these questions. For each question in the checklist:
You should answer [Yes], [No], or [NA].
[NA] means either that the question is Not Applicable for that particular paper or the relevant information is Not Available.
Please provide short (1-2 sentence) justificcton right after your answer (even for NA).
The checklist answers are an integral part of your paper submission. They are visible to the reviewers, area chairs, senior area chairs, and ethics reviewers. You will be asked to also include (after eventual revisions) with the final version of your paper, and its final version will be published with the paper.
The reviewers of your paper will be asked to use the checklist as one of the factors in their evaluation.
While "[Yes] " is generally preferable to "[No]", ", it is perfectly acceptable to answer "[No] provided proper justification is given (e.g., "error bars are not reported because it would be too computationally expensive" or "we were unable to find the license for the dataset we used"). In general, answering "[No] or "[NA] is not grounds for rejection. While the questions are phrased in binary way, we acknowledge that the true answer often more nuanced, so please just use your best judgment and write justification to elaborate. All supporting evidence can appear either in the main paper or the supplemental material, provided in appendix. If you answer [Yes] to a question, in the justification please point to the section(s) where related material for the question can be found.
IMPORTANT, please:
Delete this instruction block, but keep the section heading "NeurIPS Paper Checklist",
Keep the checklist subsection headings, questions/answers and guidelines below.
Do not modify the questions and only use the provided macros for your answers.
1. Claims
Do the main claims made in the abstract and introduction accurately reflect the paper's contributions and scope?
Question:
Answer: [Yes]
Justification: We clearly show the claims in the abstract and introduction, which are explored and verified in experiments and analyses.
Guidelines:
The answer NA means that the abstract and introduction do not include the claims made the paper.
The abstract and/or introduction should clearly state the claims made, including the contributions made the paper and important assumptions and limitations. A No or
NA answer to this question will not be perceived well by the reviewers.
The claims made should match theoretical and experimental results, and reflect how much the results can be expected to generalize to other settings.
It is fine to include aspirational goals as motivation as long as it is clear that these goals are not attained by the paper.
2. Limitations
Question: Does the paper discuss the limitations of the work performed by the authors? Answer: [Yes]
26

---

We discuss the limitation in scope as pioneering work, leaving multiple directions for future works explore.
Justification:
Guidelines:
The answer NA means that the paper has no limitation while the answer No means that the paper has limitations, but those are not discussed in the paper.
The authors are encouraged to create a separate "Limitations" section their paper.
The paper should point out any strong assumptions and how robust the results are to violations of these assumptions (e.g., independence assumptions, noiseless settings, model well-specification, asymptotic approximations only holding locally). The authors should reflect how these assumptions might be violated in practice and what the implications would be.
The authors should reflect on the scope of the claims made, e.g., if the approach was only tested on few datasets or with few runs. In general, empirical results often depend on implicit assumptions, which should be articulated.
The authors should reflect on the factors that influence the performance of the approach. For example, facial recognition algorithm may perform poorly when image resolution is low images are taken in low lighting. Or speech-to-text system might not be used reliably to provide closed captions for online lectures because it fails to handle technical jargon.
The authors should discuss the computational efficiency of the proposed algorithms and how they scale with dataset size.
If applicable, the authors should discuss possible limitations of their approach to address problems of privacy and fairness.
While the authors might fear that complete honesty about limitations might be used by reviewers as grounds for rejection, worse outcome might be that reviewers discover limitations that aren't 't acknowledged in the paper. The authors should use their best judgment and recognize that individual actions in favor of transparency play an impor- tant role in developing norms that preserve the integrity of the community, Reviewers will be specifically instructed to not penalize honesty concerning limitations.
3. Theory assumptions and proof's
Question: For each theoretical result, does the paper provide the full set of assumptions and complete (and correct) proof?
Answer: [NA]
Justification:
The paper does not include theoretical results.
Guidelines:
The answer NA means that the paper does not include theoretical results.
All the theorems, formulas, and proofs in the paper should be numbered and cross- referenced.
All assumptions should be clearly stated or referenced in the statement of any theorems.
The proofs can either appear in the main paper or the supplemental material, but if they appear in the supplemental material, the authors are encouraged provide short proof sketch to provide intuition.
Inversely, any informal proof provided in the core of the paper should be complemented by formal proofs provided in appendix or supplemental material.
Theorems and Lemmas that the proof relies upon should properly referenced.
4. Experimental result reproducibility
Does the paper fully disclose all the information needed to reproduce the main perimental results the paper to the extent that affects the main claims and/or conclusions of the paper (regardless whether the code and data are provided not)?
Question:
Answer: [Yes]
Justification: We include all details: models, prompts, hyperparameter setups in the main content and the appendix.
Guidelines:
27

---

The answer NA means that the paper does not include experiments.
If the paper includes experiments, a No answer to this question will not be perceived well by the reviewers: Making the paper reproducible is important, regardless of whether the code and data are provided or not.
If the contribution is dataset and/or model, the authors should describe the steps taken to make their results reproducible or verifiable.
Depending on the contribution, reproducibility can be accomplished in various ways. For example, if the contribution is a novel architecture, describing the architecture fully might suffice, or if the contribution is specific model and empirical evaluation, it may be necessary to either make it possible for others to replicate the model with the same dataset, provide access to the model. In general. releasing code and data is often one good way to accomplish this, but reproducibility can also be provided via detailed instructions for how replicate the results, access to hosted model (e.g., g., in the of a large language model), releasing of a model checkpoint, or other means that are appropriate to the research performed.
While NeurlPS does not require releasing code, the conference does require submis- sions to provide some reasonable avenue for reproducibility, which may depend on the nature of the contribution. For example
(a) If the contribution is primarily a new algorithm, the paper should make it clear how reproduce that algorithm. (b) If the contribution is primarily
model architecture, the paper should describe the architecture clearly and fully.
(c) the contribution is a new model (e.g., a large language model), then there should either be way to access this model for reproducing the results or way to reproduce the model (e.g., with an open-source dataset or instructions for how to construct the dataset).
(d) We recognize that reproducibility may be tricky in some cases, in which case authors are welcome deseribe the particular way they provide for reproducibility. In the case of closed-source models, it may be that access to the model is limited in some way (e.g., to registered users), but it should possible for other researchers to have some path to reproducing verifying the results.
5. Open access to data and code
Question: Does the paper provide open access to the data and code, with sufficient instruc- tions faithfully reproduce the main experimental results, as described in supplemental material?
Answer: [Yes]
Justification: We will release code and data when the paper is published, currently, the link is hidden for anonymity. The data and tools used to build our benchmark are also open to the public.
Guidelines:
The answer NA means that paper does not include experiments requiring code.
Please see the NeurlPS code and data submission guidelines (https://nips.cm ec/
for more details.
While we encourage the release of code and data, we understand that this might not be possible, so "No" is an acceptable answer. Papers cannot be rejected simply for not including code, unless this is central to the contribution (e.g., for new open-source benchmark).
The instructions should contain the exact command and environment needed to run to reproduce the results. See the NeurlPS code and data submission guidelines (https
/tipps.cc/pulli//uuudee hww.bl/ii.ggiiddee//deeeuuiiiiii /Ct////ooeeeeeaeeaaaeee ssi onPolicy) for more details.
The authors should provide instructions on data access and preparation, including how to access the raw data, preprocessed data, intermediate data, and generated data, etc.
The authors should provide scripts to reproduce all experimental results for the new proposed method and baselines. only subset of experiments are reproducible, they should state which ones are omitted from the script and why.
28

---

At submission time, to preserve anonymity, the authors should release anonymized versions (if applicable).
Providing as much information as possible supplemental material (appended to the paper) recommended, but including URLs to data and code is permitted.
6. Experimental setting/details
Question: Does the paper specify all the training and test details (c.g., data splits, hyper- parameters, how they were chosen, type of optimizer, etc.) necessary to understand the results?
Answer: [Yes]
Justification: We include all hyperparameters and other setups for the reproduction of our results.
Guidelines:
The answer NA means that the paper does not include experiments.
The experimental setting should be presented in the core of the paper to level of detail that is necessary to appreciate the results and make sense of them.
The full details can be provided either with the code, in appendix, or as supplemental material.
7. Experiment statistical significance
Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?
Question:
Answer: [Yes]
Justification: Our method's improvement over baselines is significant, and omit the statement because the gap is relatively large to save lines.
Guidelines:
The answer NA means that the paper does not include experiments.
The authors should answer "Yes" if the results are accompanied by error bars, confi- dence intervals, statistical significance tests, least for the experiments that support the main claims of the paper.
The factors of variability that the error bars are capturing should be clearly stated (for example, train/test split, initialization, random drawing of some parameter, or overall run with given experimental conditions).
The method for calculating the error bars should be explained (closed form formula, call to a library function, bootstrap, etc.)
The assumptions made should be given (e.g., Normally distributed errors).
It should be clear whether the error bar is the standard deviation or the standard error of the mean.
is OK to report 1-sigma error bars, but one should state it. The authors should preferably report a 2-sigma error bar than state that they have 96% CI, if the hypothesis of Normality of errors is not verified.
For asymmetric distributions, the authors should be careful not to show in tables or figures symmetric error bars that would yield results that are out range (e.g. negative enror rates).
If error bars reported in tables plots, The authors should explain in the text how they were calculated and reference the corresponding figures or tables the text.
8. Experiments compute resources
For each experiment, does the paper provide sufficient information on the com- puter resources (type of compute workers, memory, time of execution) needed to reproduce the experiments?
Question:
Answer: [Yes]
Justification:
We provide such information in efficiency analysis.
Guidelines:
29

---

The answer NA means that the paper does not include experiments.
The paper should indicate the type of compute workers CPU or GPU, internal cluster, or cloud provider, including relevant memory and storage.
The paper should provide the amount of compute required for each of the individual experimental runs as well estimate the total compute.
The paper should disclose whether the full research project required more compute than the experiments reported in the paper (e.g., preliminary failed experiments that didn't make into the paper).
9. Code ethics
Question: Does the research conducted the paper conform, in every respect, with the NeurlPS Code of Ethics httpp:://eeurrii http://wwwppscccpplicpceeeeeeeee httpp/plllc./tiiccciiiieeeeeeeee
Answer: [Yes]
Justification:
We conduct experiments in every respect, with the NeurlPS Code of Ethics.
Guidelines:
The answer NA means that the authors have not reviewed the NeurIPS Code of Ethics.
If the authors answer No, they should explain the special circumstances that require deviation from the Code of Ethics.
The authors should make sure to preserve anonymity (e.g.. there a special consid- eration due to laws or regulations in their jurisdiction).
10. Broader impacts
Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed?
Answer: [Yes]
Justification: As role-playing method, discuss the social impact of role-playing LLMs in the introduction and related work.
Guidelines:
The answer NA means that there no societal impact of the work performed.
If the authors answer NA or No. they should explain why their work has no societal impact or why the paper does not address societal impact.
Examples of negative societal impacts include potential malicious or unintended uses (e.g., disinformation, generating fake profiles, surveillance), fairness considerations (e.g., deployment of technologies that could make decisions that unfairly impact specific groups), privacy considerations, and security considerations.
The conference expects that many papers will be foundational research and tied to particular applications, let alone deployments. However, if there is direct path to any negative applications,
authors should point it out. For example, it is legitimate to point out that an improvement in the quality of generative models could be used to generate deepfakes for disinformation. On the other hand, is not needed to point out that a generic algorithm for optimizing neural networks could enable people to train models that generate Deepfakes faster.
The authors should consider possible harms that could arise when the technology is being used as intended and functioning correctly, harms that could arise when the technology is being used as intended but gives incorrect results, and harms following from (intentional unintentional) misuse of the technology.
there are negative societal impacts, the authors could also discuss possible mitigation strategies (e.g., gated release of models, providing defenses in addition attacks, mechanisms for monitoring misuse, mechanisms to monitor how a system learns from feedback over time, improving the efficiency and accessibility of ML).
11. Safeguards
Question: Does the paper describe safeguards that have been put in place for responsible release of data models that have a high risk for misuse (e.g., pretrained language models, image generators, or scraped datasets)?
30

---

Answer: [NA]
Justification: The paper poses no such risks because it completely uses open data and models.
Guidelines:
The answer NA means that the paper poses such risks.
Released models that have high risk for misuse or dual-use should be released with necessary safeguards to allow for controlled use of the model, for example by requiring that users adhere usage guidelines restrictions to access the model or implementing safety filters.
Datasets that have been scraped from the Internet could pose safety risks. The authors should describe how they avoided releasing unsafe images.
We recognize that providing effective safeguards challenging, and many papers do not require this, but encourage authors to take this into account and make best faith effort.
Licenses existing assets
Question: Are the creators or original owners of assets (e.g.. code, data, models), used in the paper, properly credited and are the license and terms of use explicitly mentioned and properly respected?
Answer: [Yes]
Justification: We have well cited the sources of all tools and datasets used in the experiments.
Guidelines:
The answer NA means that the paper does not use existing assets.
The authors should cite the original paper that produced the code package dataset.
The authors should state which version of the asset used and, possible, include URL.
The name of the license (e.g., CC-BY 4.0) should be included for each asset.
For scraped data from a particular source (e.g., website). the copyright and terms of service of that source should be provided.
If assets are released, the license, copyright information, and terms of use in the bataasesssppprsstttt paperswi theode. com/datasets package should be provided. For popular datasets,
has curated licenses for some datasets. Their licensing guide can help determine the license of dataset.
For existing datasets that are re-packaged, both the original license and the license of the derived asset (if it has changed) should be provided. If this information is available online, the authors are encouraged reach out to the asset's 's creators.
13. New assets
Question: Are new assets introduced in the paper well documented and the documentation provided alongside the assets?
Answer: [Yes]
Justification:
We detail our new assets in the appendix.
Guidelines:
The answer NA means that the paper does not release new assets.
Researchers should communicate the details the dataset/code/model as part of their submissions via structured templates. This includes details about training, license, limitations, etc.
The paper should discuss whether and how consent was obtained from people whose asset used.
At submission time, remember to anonymize your assets (if applicable). You can either create anonymized URL or include anonymized zip file.
14. Crowdsourcing and research with human subjects
31

---

Question: For crowdsourcing experiments and research with human subjects, does the paper include the full text of instructions given to participants and screenshots, if applicable, as well as details about compensation (if any)?
Answer: [Yes)
Justification: The human evaluation guideline is clear as there are references provided to remove background knowledge requirement.
Guidelines:
The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.
Including this information the supplemental material is fine, but if the main contribu- tion of the paper involves human subjects, then as much detail as possible should be included the main paper.
According to the NeurIPS Code Ethics, workers involved in data collection, curation, other labor should be paid at least the minimum wage in the country of the data collector.
15. Institutional review board (IRB) approvals or equivalent for research with human subjects
Question: Does the paper describe potential risks incurred by study participants, whether such risks were disclosed to the subjects, and whether Institutional Review Board (IRB) approvals (or an equivalent approval/review based on the requirements of your country or institution) were obtained?
Answer: [Yes]
Justification:
The experiment is approved.
Guidelines:
The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.
Depending on the country in which research is conducted, IRB approval (or equivalent) may be required for any human subjects research. If you obtained IRB approval, you should clearly state this in the paper.
We recognize that the procedures for this may vary significantly between institutions and locations, and expect authors to adhere to the NeurIPS Code of Ethics and the guidelines for their institution.
For initial submissions, do not include any information that would break anonymity (if applicable), such as the institution conducting the review.
16. Declaration of LLM usage
Question: Does the paper describe the usage of LLMs if it is an important, original, or non-standard component of the core methods this research? Note that if the LLM used only for writing, editing, or formatting purposes and does not impact the core methodology. scientific rigorousness, or originality the research, declaration is not required.
Answer: [Yes]
Justification: We clearly declare the roles of LLMs in experiments.
Guidelines:
The answer NA means that the core method development in this research does not involve LLMs any important, original, non-standard components.
Please refer to our L.LM policy (ttrpe///earrrppccc///ooferrrree for what should or should not be described.
32


Reviews:
[{"review_id": "NfkCSmbmV1", "reviewer": "Reviewer_o66c", "summary": "This paper introduces a novel framework called \"Codified Profiles\" for LLM-based character role-playing. Instead of appending plain text character descriptions to prompts, this method compiles them into structured, executable Python functions. These functions use explicit control logic (e.g., if-then-else) and a flexible helper function (check_condition) that queries an LLM to interpret scene-specific conditions. The authors argue that this approach offers three main advantages over traditional methods: Persistence (consistent application of character logic), Updatability (easier to debug and evolve character logic over a storyline), and Controllable Randomness (precise simulation of stochastic behaviors). To validate these claims, the paper introduces a new comprehensive benchmark, \"Fandom Benchmark,\" curated from narrative websites. Experiments demonstrate that Codified Profiles improve role-playing consistency, are more adaptable, and allow for greater behavioral diversity, showing particular strength when implemented with smaller language models.", "questions": "1.How robust is the codification process to the style of the source profile? For example, a Fandom wiki article is often structured and factual. Would the codification LLM struggle more with a profile written in a more literary or implicit style, potentially leading to less accurate or incomplete logic?\n\n2.The check_condition function is a cornerstone of the framework's flexibility. It can return True, False, or None (Unknown). How does the system handle an \"Unknown\" response? Could this lead to situations where no logical branch is triggered, resulting in a generic or null response from the character?\n\n3.The evolving mechanism is supervised by ground-truth actions from the storyline. How do you envision this mechanism adapting to an interactive, open-ended role-playing scenario where no such ground truth exists? Could the framework be integrated with self-reflection mechanisms to enable unsupervised character evolution based on interaction history?\n\n4.The examples in the paper show clear but relatively simple logical structures. In your experiments with complex characters from works like \"A Game of Thrones\", did the codification LLM generate more complex code involving, for instance, state variables that persist across multiple scenes or nested loops? If so, how does the framework manage this statefulness?", "limitations": "Yes", "rating": 5, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 3, "clarity": 3, "significance": 2, "originality": 3, "strengths_and_weaknesses": "Strengths:\n\n1.The paper addresses a well-defined and important problem in LLM-based role-playing: the lack of persistence, controllability, and transparency in prompt-based methods. The proposed solution of \"codifying\" character logic into executable functions is highly original and offers a new paradigm for character representation that synergizes symbolic logic with neural models. This is a significant departure from mainstream RAG or fine-tuning approaches.\n\n2.The experimental validation is a major strength of this paper. The authors systematically design experiments to verify each of their three core claims:\n- Persistence: The superiority of codified profiles over textual profiles and RAG baselines in Table 2 and Figure 4 clearly supports this claim.\n- Updatability: The \"Evolving Profile\" experiment (Section 5.3, Figure 5) provides strong evidence that codified logic is more effectively and efficiently updated along a storyline compared to unstructured text.\n- Controllable Randomness: The experiments in Figure 6 convincingly show that codified profiles can simulate specified probabilities accurately, a known weakness of LLM sampling, and that this controlled stochasticity leads to better coverage of plausible actions (Best@K results).\n\n3.By curating 83 characters and over 5,000 scenes from rich, real-world narrative sources, the authors provide a high-quality, behavior-centric benchmark that will be valuable for future research in this area. \n\n4.The paper is exceptionally well-written and easy to follow. The methodology is explained clearly with illustrative examples. The appendices are thorough, providing all necessary prompts, benchmark details, and extended case studies, which strongly supports the reproducibility of the work.\n\n----\n\nWeaknesses:\n\n1.The framework's effectiveness hinges on the ability of a powerful LLM (GPT-4.1 in this case) to accurately translate nuanced text into correct logical code. The performance could degrade substantially if a less capable, open-source model were used for this codification step. While Appendix G explores this, the core experiments rely on a state-of-the-art closed model, which could be a practical barrier.\n\n2.The proposed evolving mechanism is driven by NLI-based comparisons to a ground-truth reference action from the original story. This is a sound approach for evaluation but its applicability to open-ended, interactive role-playing (where no ground-truth exists) is unclear. The paper does not fully explore how character evolution would be triggered or guided in such scenarios.\n\n3.The process of abstraction from rich, descriptive text to structured code may lead to a loss of nuance. A character's personality might contain subtle elements that are not easily captured by discrete if-then logic. The authors acknowledge this in Appendix A and show that combining codified and textual profiles yields slight gains (Table 2), which implicitly supports this concern. This trade-off could be discussed more prominently in the main paper.", "was_revised": true, "final_justification": "The authors' response addressed most of my concerns, but I still believe that executable codes cannot represent most scenarios. Therefore, the method is only applicable to cases with verifiable facts.", "rebuttal": "We are sincerely thankful for your strong support for our work with both strong recommendations and insightful comments/questions. In response to your valuable efforts to further improve our work, we have the following clarifications and modifications. We believe our work is further solidified with your suggestions!\n\n**Reliance on Closed LLM’s Coding Ability (W1)**\n\nWe completely agree that the benefit of codified profiles comes from the coding ability of modern LLMs and the growing ability is actually one motivation for our work. While closed coders (e.g., Claude) dominate the state-of-the-art in coding, this does not mean no chance for open-source coders. **We add experiments with three recent state-of-the-art open source LLMs:** “moonshotai/Kimi-K2-Instruct” (`kimi-k2`), “Qwen3-235B-A22B-Instruct-2507”(`qwen3-instruct`), “Qwen3-Coder-480B-A35B-Instruct” (`qwen3-coder`) to Table 6 in Appendix G (codification model comparison).\n\n|           |                  | Haruhi | K-On! | JOJO  | FMA   | AGOT  | ATLA  | Average   |\n| --------- | -------- | ------ | ----- | ----- | ----- | ----- | ----- | --------- |\n| **Main**  | **kimi-k2**          | 74.81  | 67.71 | 62.70 | 68.89 | 67.32 | 64.62 | 67.68     |\n|           | **qwen3-instruct**   | 76.24  | 67.89 | 63.80 | 70.27 | 67.46 | 64.23 | 68.32     |\n|           | **qwen3-coder**      | 74.25  | 69.82 | 63.62 | 70.62 | 67.88 | 69.94 | 69.36     |\n|           | gpt-4.1-mini     | 73.33  | 68.58 | 62.71 | 68.07 | 67.03 | 68.54 | 68.04     |\n|           | gpt-4.1          | 72.14  | 69.23 | 63.92 | 69.60 | 67.51 | 67.90 | 68.38     |\n|           | claude-3.7-sonet | 76.86  | 68.53 | 63.35 | 70.82 | 68.69 | 68.73 | 69.50     |\n|           | claude-4.0-sonet | 75.07  | 68.99 | 63.85 | 74.26 | 67.22 | 70.82 | 70.04 |\n| **Minor** | **kimi-k2**          | N/A    | 67.70 | 65.79 | 65.53 | 71.70 | 64.09 | 66.96     |\n|           | **qwen3-instruct**   |        | 69.48 | 66.08 | 65.64 | 71.71 | 65.70 | 67.72     |\n|           | **qwen3-coder**      |        | 71.63 | 67.51 | 64.44 | 73.64 | 72.06 | 69.86     |\n|           | gpt-4.1-mini     |        | 71.65 | 64.66 | 70.35 | 69.77 | 70.43 | 69.37     |\n|           | gpt-4.1          |        | 68.59 | 70.06 | 68.21 | 70.51 | 71.95 | 69.87     |\n|           | claude-3.7-sonet |        | 75.05 | 67.05 | 67.04 | 73.79 | 69.25 | 70.44     |\n|           | claude-4.0-sonet |        | 71.79 | 67.66 | 70.94 | 74.63 | 73.72 | 71.75 |\n\nThe results in the Table above verify that open source LLMs can rival closed ones on the codification task, especially given that `qwen3-coder` outperforms `gpt-4.1` on main characters and has only a 0.01 gap on minor characters. The results indicate the implementation barrier for codification isn’t that high and does not need to rely on closed LLMs, which further improves the reproducibility of our and future codification works. We will update the results in the main content and appendix to show that open source coders can also support codification implementation. Thanks for the suggestion!\n\n**Evolving Codified Profiles in Open-ended Scenarios (W2 & Q3)**\n\nHow to evolve codified profiles in open-ended scenarios is an insightful and interesting topic for discussion! In the current version of our work, the evolving mechanism is designed to capture character dynamics in the scripted storyline (e.g., it can provide different Tyrion’s profiles in Season 1 v.s. Season 5 for users to interact with), but characters can certainly evolve in an open-ended environment with interactions. For self-reflection, we agree it’s an important mechanism for accurate self-update when update signals are received. But here we would like to emphasize what can be used as trustworthy update signals when evolving character logics without ground-truth plots. Here we discuss three potential feedback sources: **Environment Feedback**, **User’s Preference**, and **Pre-defined Evolving Mechanism**.\n\n- **Environment Feedback:** Characters can adapt using environmental signals such as action outcomes, changes in relationships, and feedback from other characters. These serve as cues for adjusting motivations, beliefs, and traits.\n\n**Prerequisite:** This requires building a world-level feedback system, which is discussed in our limitation section for future work.\n\n- **User’s Preference (Including authorial intent):** Explicit or implicit user feedback (e.g., corrections, engagement patterns) and narrative intent can guide updates, ensuring evolution aligns with player expectations or desired scenarios.\n\n**Prerequisite:** This requires a man-in-the-loop system to let users tell the role-playing system what kind of character behavior is preferred to update their logic.\n\n- **Pre-defined Evolving Mechanism:** Characters can be initialized with plausible development paths or constraints. Self-reflection modules use interaction history to trigger updates along these paths, preserving coherence without ground-truth supervision.\n\n**Prerequisite:** This requires a self-evolving logic to be written or codified inside the initial profile of the character.\n\nSelf-evolving without ground truth is feasible, but it cannot happen without any feedback signals. Reliable update signals from the environment, users, or pre-defined trajectories are essential for meaningful character evolution. We sincerely thank the reviewer for raising this valuable discussion point, which will help us better position our framework for open-ended interactive scenarios. We will update such a future work discussion after the limitation section to further expand the potential future work discussions.\n\n**Nuanced or Implicit Profiles (W3 & Q1)**\n\nWe thank the reviewer for raising this insightful discussion on codifying implicit/nuanced profiles. For this question, we think it’s important to discuss the following two cases of implicit expressions.\n- **Case 1 (Implicit expression with hidden logics):** If the implicit or nuanced profiles indeed contain hidden logics that are simply conveyed in a more literary style, these subtleties pose challenges not only to codification but also to directly interpreting textual profiles during role-playing. In such cases, codification can actually help by surfacing and converting these latent logics into more reliable grounding functions, thereby improving consistency.\n- **Case 2 (Implicit expression without hidden logics):** If, instead, the implicit or nuanced profiles lack such hidden logics and instead emphasize tone or descriptive richness, we agree they may be better left uncodified, as discussed in the limitations section. We fully concur that developing a discriminator to assess whether a profile contains sufficient logic depth for codification is an important direction for future work. This would help avoid breaking nuanced information when textual profiles serve primarily stylistic purposes.\n\nWe will highlight this trade-off more prominently in the main paper and we appreciate the reviewer for prompting this valuable clarification.\n\n**Handling \"Unknown\" Branches (Q2)**\n\nAllowing `check_condition` to return `None` (Unknown) prevents the framework from incorrectly defaulting to `False` when it cannot confidently determine the condition. As in the Roy (FMA) example below, if the scene's formality is unclear (`None`), no statement is generated. This avoids unwarranted or generic actions and keeps character behavior consistent with available information.\n\n```python\n    # 1. Is the setting formal or serious?\n    formal = check_scene(scene, \"Is the setting formal or serious?\")\n    if formal is True:\n        scene_statements.append(\"Roy styles his hair neatly, slicking it back for a polished appearance.\")\n    elif formal is False:\n        scene_statements.append(\"Roy's hair is casually tousled, falling over his eyes.\")\n    # If unknown, do not add a statement.\n```\n\n**Complexity and Statefulness (Q4)**\n\nCurrently, our codified logic is largely \"Markov\", which processes each scene independently without persistent state or memory, so we have not observed LLMs producing that complex code (deeply nested condition checking exists, referring to Table 5). However, codification can represent more complex logic, such as loops or persistent state, as illustrated by the “Endless Eight” example below (from Haruhi Suzumiya, where characters repeat the same period until a key action breaks the loop) (This is not simulating the profile but an event so it's not included in our experiments and is codified in a different format). This demonstrates the framework’s potential for handling complex logic (e.g., time loops) if needed.\n\n```python\nscene_statements = []\n# Does the Endless Eight time loop trigger?\nif check_scene(scene, \"Are Haruhi and the SOS Brigade on summer vacation and making plans?\"):\n    scene_statements.append(\"Endless Eight time loop is triggered! The characters are repeating the last two weeks of summer.\")\n    n_loop = 1\n    while check_scene(scene, \"Is the time loop still repeating?\"):\n        scene_statements.append(f\"Loop #{n_loop}: The Brigade does summer activities, but feels a sense of déjà vu.\")\n        user_action = input(\"What will you do differently this time? (e.g., 'Suggest doing homework', ...): \")\n        scene = update_scene(scene, scene_statements, user_action ) # Psuedo Implementation\n        if check_scene(scene, \"Did someone suggest finishing their summer homework?\"):\n            scene_statements.append(\"Kyon suggests doing his homework. Haruhi approves. The Endless Eight loop is broken!\")\n            break\n        elif check_scene(scene, \"Is someone aware of the loop but fails to act?\"):\n            scene_statements.append(\"The Brigade feels uneasy, but no decisive action is taken. The loop continues...\")\n            n_loop += 1\n        else:\n            scene_statements.append(\"Nothing significant changes. The loop continues...\")\n            n_loop += 1\n```\n*(Generated by GPT-4.1 based on the description of Endless Eight)*"}, {"review_id": "7nRGkTkR53", "reviewer": "Reviewer_YKSi", "summary": "This paper introduces Codified Profiles, which aim to represent character logic in role-playing scenarios using structured, executable functions. The primary motivation is to enhance consistency, controllability, and efficiency compared to traditional prompt-based approaches. These profiles convert textual character descriptions into executable functions that include explicit control structures (like if-then-else) and conditional checks handled via helper functions. The approach provides persistence, facilitates systematic updates, and supports controlled randomness in character behaviors. To validate the approach, a new benchmark (Fandom Benchmark) sourced from manga, novels, and television series was developed. Experimental results demonstrate that Codified Profiles improve consistency, adaptability, and diversity of behaviors. Furthermore, it was shown that even small language models like 1B models could effectively use these profiles, making role-playing feasible for lightweight deployments.", "questions": "Please see weaknesses above.", "limitations": "yes", "rating": 4, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 3, "clarity": 3, "significance": 2, "originality": 3, "strengths_and_weaknesses": "Strengths\n- The concept of transforming textual character logic into structured, executable code is innovative and effectively addresses current challenges in consistency and interpretability in LLM-driven role-play.\n- Experiments clearly validate key claims about persistence, controllable randomness, and ease of updating character profiles. The new Fandom Benchmark can be useful for future research in the field of LLM for role-playing.\n\n\n\nWeaknesses\n- The method relies on LLMs (e.g., GPT-4.1) to convert text to code, which may introduce errors in complex logic. \n- NLI scoring (entailment/neutral/contradiction) lacks granularity for nuanced role-playing quality (e.g., emotional depth).", "was_revised": false, "final_justification": "", "rebuttal": "We are grateful to see your positive and valuable feedback on our work! On your concern about the potential error introduction and the criterion selection, we make the following clarifications and modifications accordingly. We believe our work is further polished with your constructive suggestions!\n\n**Logic Interpretation from Text v.s. Code (W1)**\n\nWe completely understand the concern that codifying text into code may introduce errors, especially when handling complex logic. However, we also would like to emphasize that such errors are more likely to occur when relying solely on LLMs to interpret textual profiles directly during role-playing. Correct profile interpretation is equally essential when role-playing with textual profiles, as the LLM must extract and apply relevant logic in real time, which can be problematic and inconsistent. One core motivation for codification is to reduce cases where “the LLM can interpret the logics in the profile but fails to execute them consistently during role-play.”\n\nAdditionally, codification makes the interpreted logic explicit and thus human-supervisable. Errors in codified profiles can be identified and debugged systematically, whereas errors arising from on-the-fly reasoning with textual profiles are often impersistent/opaque and hard to diagnose. In this sense, while codification may introduce errors, those errors are debuggable and correctable, unlike the implicit reasoning failures of direct textual interpretation. As the potential error in codification is also likely to occur in on-the-fly reasoning, it’s better to attribute the introduced error to the LLM’s interpretation rather than the codification mechanism.\n\nAs codification is an extra preprocessing step in role-playing, it's natural for readers to have error introduction concerns about integrating this codification system. We will incorporate the discussions above into our paper to further clarify the position of codification. Many thanks for pointing out this potential concern!\n\n**Criterion Selection (W2)**\n\nWe thank the reviewer for highlighting the importance of multi-dimensional evaluation in role-playing. We would like to explain the selection of NLI criterion based on **reference difference**,  **granularity**, **adaptability**, and **connection to NLP** in our work.\n\n**(Reference Difference)** While previous works (e.g. literature [1-3] mentioned by reviewer cxgP) often rate responses across multiple axes (e.g., emotion, knowledge, value alignment), these works typically use the character profile (or LLM's internal understanding of the profile) itself as the reference. In contrast, our benchmark utilizes real, audience-accepted plot responses as ground truth, with the profile serving only as a grounding input. In this setting, multi-dimensional criteria are not always directly applicable to the reference in each test case because not all dimensions will exist in the reference, making a unified NLI criterion more appropriate for our experiments.\n\n**(Granularity)** NLI also provides useful granularity by introducing a neutral state, capturing partial or ambiguous matches more reliably than binary yes/no judgments. NLI also offers a clear, well-defined criterion than numeric scoring (e.g., rating 1-10) as well.\n\n**(Adaptability)** When finer evaluation granularity is needed (e.g., evaluating emotional depth), we can filter our test set for reference responses that mention a target ability (e.g., emotion states), allowing NLI to serve as a fine-grained, ability-specific benchmark without altering our core evaluation method. In our validation of the LLM NLI discriminator, we observe that it takes every detail in the reference (including emotion) into account. For example, when the response says “the character willingly helps the antagonist” while the reference says “the character reluctantly helps the antagonist”, it will be discriminated as “contradicted”, showing the awareness of emotional depth. In the following table, we illustrate the filtered (by questioning gpt-4.1) performance evaluated by references that include details of “value”, “knowledge”, “emotion”, and “superpower”.\n\n| Dimension | Emotion | Knowledge | Value | Superpower |\n|----------------|-------------|-------------|-------------|-------------|\n|Textual        | 66.19 | 65.76 | 65.82 | 68.66 |\n|Codified      | 68.73 | 69.07 | 69.25 |  72.41|\n|$\\Delta$ Score| 2.66 | 3.31 | 3.43 | 3.85 |\n*(Explanation: Metric is averaged over all filtered test cases)*\n\nThe result is consistent with our observation that emotion is harder to codify, while superpowers, generally designed to follow audience-understandable logic, benefit more from codification. Thus, NLI can serve as a fine-grained evaluation metric as well, and we will update the results in the paper.\n\n\n**(Connection to NLP)** Finally, as a formally established criterion in NLP, NLI ensures our results are interpretable and comparable with prior literature.\n\nIn summary, while multi-dimensional scoring has value, our use of NLI provides the most practical and rigorous approach for assessing plot-driven character responses in our benchmark.\n\n[1] Character-LLM: A Trainable Agent for Role-Playing, EMNLP 2023.\n\n[2] Large Language Models are Superpositions of All Characters: Attaining Arbitrary Role-play via Self-Alignment, ACL 2024.\n\n[3] MMRole: A Comprehensive Framework for Developing and Evaluating Multimodal Role-Playing Agents, ICLR 2025."}, {"review_id": "z9PRdy5orl", "reviewer": "Reviewer_YbfS", "summary": "This paper presents codified profiles as a way to use LLMs as in role-playing scenarios with more logic persistence, updatability, and controllable randomness. Codified profiles represents character logic as structured, semi-executable functions for behavioral decision-making. The paper also introduces a new role-playing benchmark and demonstrate the advantage of their approach.", "questions": "* Why are eqns (1) and (2) $r = LLM(s | ..)$? Do you mean that the response is sampled from the conditional distribution? $r \\sim LLM(\\cdot | s, ...)$\n* What is the y-axis in Figure 5? Is it still NLI scores? If so, how does different profile representations having similar relative performance in different seasons illustrate \"how evolving profiles maintain alignment with narrative shifts\" (L280)? Wouldn't that require both (a) a ground-truth line plotted on the same graph showing the same relative performance across seasons, and (b) some assurance that relative NLI differences measure narrative shifts?", "limitations": "yes", "rating": 5, "confidence": 3, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 3, "clarity": 3, "significance": 3, "originality": 4, "strengths_and_weaknesses": "**Good idea, good execution.** The idea of using structured representations to maintain character logic in role-playing settings is interesting, and the results show that it helps produce character responses that are logically consistent with ground-truth responses. The authors run appropriate experiments, evaluation, and analysis. The evaluation dataset is fairly extensive, and seems less prone to data contamination since it is fan fiction. The ablation plots are well-done and show the value of different elements of codified profiles: granularity of segmentation, model size, chain-of-thought length, and structure. \n\nIf this paper is published or otherwise publicly shared, I would share it with other researchers interested in structured representations of human logic. \n\n**NLI vs. human preferences.** From the main body of text, it is not immediately clear that NLI against a ground-truth response is the correct measure for free-form LLM response generation. The authors include validation for using NLI as a quality metric and the human preference results in the appendix. I think that especially given the soft-correctness nature of this setting, these should be moved into the main body of text.", "was_revised": true, "final_justification": "After clarifications and added details and reviewing the authors' conversations with other reviewers, I maintain my score.", "rebuttal": "It's our pleasure to receive your strong support for the acceptance and recommendation to other researchers! To polish our paper to further meet your expectations, we will make the following clarifications and modifications according to your suggestions.\n\n**NLI Validation Placement (W1)**\n\nWe agree that human validation is especially important given the potentially noisy nature of LLM evaluation. We will move the human preference results and our validation of NLI as a quality metric from the appendix into the main body of the paper to highlight their importance and improve the paper’s readability.\n\n**Response Sampling Formula (Q1)**\n\nRegarding the notation in equations (1) and (2), our current formulation treats LLM($\\cdot$) as a function. We agree with you that representing the response as sampled from a conditional distribution (r ~ LLM($\\cdot$| s, ...)) is more precise and will update the notation accordingly.\n\n**Interpretation of Tyrion’s Case Study Result (Q2)**\n\nFor Figure 5, the y-axis represents NLI scores (averaged over different seasons). Our claim about evolving profiles maintaining alignment with narrative shifts is based on comparing the performance gap between using static versus evolving codified profiles (the difference between the green solid/dashed line in the right subfigure). This difference becomes most pronounced when there are significant character changes in the narrative (such as Tyrion in AGOT Season 3/4), which we interpret as evidence of the benefit of evolving profiles. We will clarify both the axis labeling and our reasoning in the revised text to make this conclusion easier to follow."}, {"review_id": "MIFa8ZnBAD", "reviewer": "Reviewer_cxgP", "summary": "This paper proposes a novel method, Codified Profiles, for modeling character logic in LLM-driven role-playing scenarios. The approach converts textual character profiles into executable functions that enable persistence, updatability, and controllable randomness.\nA new benchmark, curated from 83 characters and over 5,000 scenes sourced from Fandom, is used for evaluation. Experiments show codified profiles outperform traditional textual approaches in behavioral consistency, adaptability, and diversity, especially when used with smaller LLMs.", "questions": "1. In line 248, the reference to Table 6 appears to be incorrect; it should likely be Table 2.\n2. Several tables (e.g., Figures 5, 6, and 7) would benefit from clearer labeling of both rows and columns to clarify their meanings. Adding explicit axis labels or captions would improve readability.\n3. Similar to Weaknesses 2, how well do codified profiles generalize to unscripted or human-character interactive scenarios beyond the Fandom benchmark?\n4. Why is LLM-based NLI used as the main scoring method? Prior works [1-3] have introduced various evaluation strategies—some of which offer finer-grained or more interpretable feedback. What advantages justify choosing NLI over those methods?\n\n[1] Character-LLM: A Trainable Agent for Role-Playing, EMNLP 2023.\\\n[2] Large Language Models are Superpositions of All Characters: Attaining Arbitrary Role-play via Self-Alignment, ACL 2024.\\\n[3] MMRole: A Comprehensive Framework for Developing and Evaluating Multimodal Role-Playing Agents, ICLR 2025.", "limitations": "1. Abstraction vs. Fidelity Trade-off: Codification simplifies logic but may lose narrative nuances present in free-form text.", "rating": 4, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 3, "clarity": 3, "significance": 3, "originality": 3, "strengths_and_weaknesses": "**Strengths:**\n1. Conceptual Novelty: Introducing executable code as character profiles is a significant and original contribution, effectively combining symbolic logic with LLM capabilities.\n2. Controllable Randomness: Explicit modeling of randomness via code enhances reproducibility and behavioral fidelity.\n3. Clear Advantages Over Baselines: Demonstrates improvements in persistence, updatability, and behavioral diversity compared to previous methods. The use of a comprehensive benchmark and comparisons across multiple conditions (baseline, evolving, stochastic) strengthen the claims.\n\n**Weaknesses:**\n1. Dependence on Proprietary LLMs: GPT-4.1 is used for codification and NLI scoring, raising concerns about reproducibility and transparency. Can the codification pipeline be fully automated using only open-source models, and if so, what trade-offs would arise?\n2. Generalization to Open-ended Scenarios: While effective on benchmarked or scripted contexts, the method's ability to generalize to open-ended, unscripted, or human-character interactive settings remains underexplored. As mentioned in Lines 117-121, the rigidity of code may hinder generalization, which is important for role-playing LLMs.", "was_revised": true, "final_justification": "The author has resolved most of my concerns, including those regarding Reliance on Closed LLMs’ Coding Ability, Unscripted Role-playing Performance, Criterion Selection, and Writing Issues. I believe this is an interesting piece of work that deserves to be accepted. However, given that the method has limited evaluation and improvement in common unscripted scenarios, I will maintain my score of borderline accept for this paper.", "rebuttal": "We appreciate your positive comments on our work and recognition of our contributions to expand the LLM's ability! In response to your efforts in providing constructive suggestions, we will make the following modifications and clarifications accordingly.\n\n**Reliance on Closed LLM’s Coding Ability (W1)**\n\nWe appreciate the reviewer’s concern regarding the reliance on proprietary models such as `gpt-4.1` for codification, especially in terms of reproducibility and transparency. While it is true that closed models (e.g., Claude) currently lead the field in coding tasks, we emphasize that this does not preclude effective codification with open-source LLMs.\nTo address this, we conducted new experiments with three recent state-of-the-art open-source LLMs: “moonshotai/Kimi-K2-Instruct” (`kimi-k2`), “Qwen3-235B-A22B-Instruct-2507” (`qwen3-instruct`), and “Qwen3-Coder-480B-A35B-Instruct” (`qwen3-coder`).\n\n|           |                  | Haruhi | K-On! | JOJO  | FMA   | AGOT  | ATLA  | Average   |\n| --------- | ---------------- | ------ | ----- | ----- | ----- | ----- | ----- | --------- |\n| **Main**  | **kimi-k2**          | 74.81  | 67.71 | 62.70 | 68.89 | 67.32 | 64.62 | 67.68     |\n|           | **qwen3-instruct**   | 76.24  | 67.89 | 63.80 | 70.27 | 67.46 | 64.23 | 68.32     |\n|           | **qwen3-coder**      | 74.25  | 69.82 | 63.62 | 70.62 | 67.88 | 69.94 | 69.36     |\n|           | gpt-4.1-mini     | 73.33  | 68.58 | 62.71 | 68.07 | 67.03 | 68.54 | 68.04     |\n|           | gpt-4.1          | 72.14  | 69.23 | 63.92 | 69.60 | 67.51 | 67.90 | 68.38     |\n|           | claude-3.7-sonet | 76.86  | 68.53 | 63.35 | 70.82 | 68.69 | 68.73 | 69.50     |\n|           | claude-4.0-sonet | 75.07  | 68.99 | 63.85 | 74.26 | 67.22 | 70.82 | 70.04 |\n| **Minor** | **kimi-k2**          | N/A    | 67.70 | 65.79 | 65.53 | 71.70 | 64.09 | 66.96     |\n|           | **qwen3-instruct**   |        | 69.48 | 66.08 | 65.64 | 71.71 | 65.70 | 67.72     |\n|           | **qwen3-coder**      |        | 71.63 | 67.51 | 64.44 | 73.64 | 72.06 | 69.86     |\n|           | gpt-4.1-mini     |        | 71.65 | 64.66 | 70.35 | 69.77 | 70.43 | 69.37     |\n|           | gpt-4.1          |        | 68.59 | 70.06 | 68.21 | 70.51 | 71.95 | 69.87     |\n|           | claude-3.7-sonet |        | 75.05 | 67.05 | 67.04 | 73.79 | 69.25 | 70.44     |\n|           | claude-4.0-sonet |        | 71.79 | 67.66 | 70.94 | 74.63 | 73.72 | 71.75 |\n\nAs shown in the table above (updated Table 6 in Appendix G), open-source LLMs can rival or even surpass closed models on the codification task, as `qwen3-coder` notably outperforms `gpt-4.1` on main characters and shows only a 0.01 gap on minor characters. This demonstrates that the entire pipeline can be automated with open-source models, significantly improving reproducibility and transparency. We will also release the codification results from closed/open LLMs for reproduction.\n\nWhile open-source models may have some limitations compared to the very latest proprietary coders (`claude-4.0-sonet`), such as occasional differences in logic abstraction or error rates, our results suggest that these trade-offs are narrowing rapidly. We will update our paper with these findings to further support the viability of open codification models. Thank you for the valuable suggestion!\n\n**Unscripted Role-playing Performance (W2 & Q3)**\n\nWe thank the reviewers for highlighting the importance of generalization to open-ended and unscripted scenarios. To address this, we have already included an open-ended character-character interaction setup in Appendix D, where two characters interact in a script-free, unsupervised manner. These results demonstrate that codification can indeed contribute to character consistency and believability even outside benchmarked contexts.\n\nWe did not place these results in the main content because reference-based scoring, which is grounded in real, audience-accepted responses, is inherently more reliable than evaluating solely based on LLM judgments of scenario plausibility. We also recognize the value of further exploring human-character interactions. Following the reviewer's suggestion, we conducted additional experiments where a simulated human interviewer (“You are a human interviewer interested in {character}”) driven by `gpt-4.1` interacts unscripted with each character, similar to the methodology in [1]. We ran 83 such interview sessions (1 for each character), and the codified profile achieved 37.35% win, 34.94% tie, and 27.71% loss rates for 8B `llama-3.1` judged by `gpt-4.1`, further validating the generalizability and advantage of codification in broader, open-ended settings. Thank you for raising this important point; we will clarify and update these results in the revised version.\n\n**Criterion Selection (Q4)**\n\nWe thank the reviewer for highlighting the diversity of evaluation strategies in recent works and for prompting us to clarify the advantages of our NLI-based approach.\n\nWhile prior studies such as [1] and [2] utilize multi-dimensional scoring (e.g., emotion, knowledge, value alignment), these typically use the character profile itself as the reference or gold standard for evaluation. This approach is fundamentally different from ours: our benchmark leverages real, audience-accepted plot responses as ground truth, using the profile only as a grounding input rather than as an evaluation reference. In this setting, applying multi-dimensional criteria is not always directly meaningful for each test case, making a unified NLI criterion more appropriate and interpretable for our experiments.\n\nWith respect to [3], although it does not input the character profile directly in the evaluation prompt, its methodology still relies on the LLM’s own understanding or \"internalization\" of the character as the ground truth, which can introduce ambiguity or drift from intended characterization. In contrast, our use of NLI is strictly grounded in concrete plot responses, avoiding circular reasoning.\nNLI further offers practical advantages in granularity and clarity: its three-way decision (entailment, neutral, contradiction) allows for nuanced distinctions  (capturing ambiguous or partially matching responses) without relying on arbitrary numeric scoring or less interpretable axes. When finer granularity is needed (e.g., to specifically evaluate emotional depth), we filter our test set for references mentioning the relevant trait or ability, so NLI can serve as an ability-specific benchmark without altering the core evaluation paradigm. In the following table, we illustrate the filtered (by questioning `gpt-4.1`) performance evaluated by references that include details of “value”, “knowledge”, “emotion”, and “superpower”.\n\n| Dimension | Emotion | Knowledge | Value | Superpower |\n|----------------|-------------|-------------|-------------|-------------|\n|Textual        | 66.19 | 65.76 | 65.82 | 68.66 |\n|Codified      | 68.73 | 69.07 | 69.25 |  72.41|\n|$\\Delta$ Score| 2.66 | 3.31 | 3.43 | 3.85 |\n*(Explanation: Metric is averaged over all filtered test cases)*\n\nThe result is consistent with our observation that emotion is harder to codify, while superpowers, generally designed to follow audience-understandable logic, benefit more from codification. Thus, NLI can serve as a fine-grained evaluation metric as well, and we will update the results in the paper.\n\nEmpirically, we also observe that the LLM NLI discriminator is sensitive to nuanced aspects such as emotion: for example, if a response says \"the character willingly helps the antagonist\" but the reference says \"the character reluctantly helps the antagonist,\" the NLI correctly detects a contradiction, reflecting awareness of emotional nuance.\n\nFinally, as a well-established and widely used criterion in NLP, NLI ensures that our results are interpretable, reproducible, and comparable with previous literature.\n\nIn summary, while multi-dimensional scoring is valuable, our use of NLI is a practical, rigorous, and principled choice for evaluating plot-driven character responses in our benchmark, especially given the design differences from recent alternatives.\n\n**Writing Issues (Q1 & Q2)**\nThank you for pointing out these writing and formatting issues! We will correct the reference in line 248 to Table 2 and revise the labeling and captions for Figures 5-7 to ensure clearer row and column descriptions (e.g., adding \"NLI scores\" labels to the y-axis). These updates will be reflected in the revised version.\n\n[1] Character-LLM: A Trainable Agent for Role-Playing, EMNLP 2023.\n\n[2] Large Language Models are Superpositions of All Characters: Attaining Arbitrary Role-play via Self-Alignment, ACL 2024.\n\n[3] MMRole: A Comprehensive Framework for Developing and Evaluating Multimodal Role-Playing Agents, ICLR 2025."}]

Author rebuttal:

Meta-review: This paper proposes Codified Profiles, a new framework for representing character logic in role-playing by converting textual descriptions into structured, executable functions. Unlike prompt-based methods, codified profiles use explicit control structures and flexible condition checks to produce consistent, updatable, and stochastic behaviors. The authors introduce a benchmark of 83 characters and over 5,000 scenes from Fandom and evaluate persistence, adaptability, and diversity through NLI-based scoring. Results show that codified profiles significantly improve consistency and controllability, and even small models (1B parameters) can perform high-quality role-playing when leveraging this representation.

The paper’s strengths lie in its conceptual novelty, clear exposition, strong experimental validation, and contribution of a valuable benchmark. Reviewers praised the originality of combining symbolic logic with LLM reasoning and confirmed that experiments convincingly support the three core claims. Weaknesses primarily concern reliance on closed LLMs for codification, potential loss of narrative nuance, and questions about generalization to open-ended role-playing. The rebuttal directly addressed these issues: additional experiments showed open-source coders rival closed models, clarifications outlined how evolution could occur in interactive scenarios, and the role of NLI as a principled evaluation metric was justified with supplementary results and planned revisions. Post-rebuttal comments from all reviewers were positive, with concerns adequately resolved. Therefore, I recommend acceptance.
Decision: Accept (poster)