NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

RAGs to Riches: RAG-like Few-shot Learning for Large Language Model Role-playing

Timothy Rupprecht, Enfu Nan, Arash Akbari, Arman Akbari, Lei Lu, Priyanka Maan, Sean Duffy, Pu Zhao, Yumei He, David R. Kaeli, Yanzhi WangarXiv 2025 · DOI

Abstract

Role-playing in Large Language Models (LLMs) is often fragile, with models easily 'jailbroken' into breaking character when faced with hostile prompts. We present RAGs-to-Riches (R2R), a framework that treats persona-conditioning as a retrieval problem grounded in Implicit Bayesian Reasoning. By utilizing transcribed real-world audio, dense emotive labeling, and satirical pseudo-data, R2R creates agents that are significantly more robust to character-breaking interactions. Our results demonstrate that R2R agents incorporate 35% more reference material than standard methods and are judged as more authentic by both human and LLM evaluators.

Introduction

While LLMs are increasingly deployed for role-playing in entertainment, education, and customer service, they remain notoriously fragile. A "hostile" user can often "jailbreak" a persona by requesting out-of-character tasks—such as asking a historical figure to write Python code or translate modern languages. Standard solutions, such as zero-shot prompting or standard In-Context Learning (ICL), often fail because the model's extensive pre-training data conflicts with the few-shot examples provided. Fine-tuning offers a more robust alternative but is prohibitively expensive for applications requiring thousands of distinct characters.

The RAGs-to-Riches Framework

The RAGs-to-Riches (R2R) framework addresses these limitations by treating persona-conditioning as a retrieval problem. Grounded in Implicit Bayesian Reasoning, R2R aims to maximize the influence of provided demonstrations over the model's internal pre-trained knowledge.

The framework introduces several key innovations:

  1. Transcribed Audio Sources: Instead of using LLM-generated catchphrases, R2R utilizes manual transcriptions of real-world audio (interviews, speeches) recorded after the model's training cutoff date. This ensures the data is novel to the model, forcing it to rely on the provided context rather than its pre-existing weights.
  2. Dense Emotive and Contextual Labeling: Demonstrations are tagged with emotional states (e.g., angry, happy, neutral) and functional contexts (e.g., "Boasting responses," "Press responses"). This leverages the LLM's innate multi-task learning capabilities to switch linguistic styles more effectively.
  3. Pseudo-data for Boundaries: The authors include satirical pseudo-data where the character explicitly refuses to break character (e.g., a Trump persona stating, "I do not know how to program... I am just Donald Trump"). This acts as a guardrail against jailbreaking attempts.
Example of an R2R few-shot prompt for a Donald Trump persona, featuring categorized catchphrases and emotive demonstrations.

Evaluation Methodology

The study utilizes two primary hand-crafted evaluation datasets:

  • Authenticity Evaluation Dataset: Specifically designed to challenge role-playing robustness. Half the prompts are persona-related, while the other half are "hostile" jailbreak-style prompts (e.g., code debugging, translation, illicit advice).
  • Role-playing Evaluation Set: Covers four real-world scenarios: 2020 & 2024 US Presidential Elections (Trump, Biden, Harris), TV Hosting (Ellen DeGeneres), and CEO Board-room Interviews (Elon Musk).

To quantify performance, the authors introduced Intersection over Output (IOO) to measure how much the model improvises versus follows references, and Intersection over References (IOR) to measure the utilization rate of the provided demonstrations.

Key Results and Discussion

R2R models demonstrated significantly higher fidelity and robustness compared to baselines. In hostile user simulations, the R2R model incorporated an average of 35% more tokens from the reference demonstrations than zero-shot or standard ICL methods. Using an "LLM-as-a-judge" framework (Crowd Vote), R2R models were consistently judged as more authentic and remained in-character more often than competitors.

A critical insight from the study is the "Contradiction Term." Bayesian theory suggests that if few-shot data overlaps too much with training data, the model may ignore it. By using post-cutoff audio, R2R creates a "benefit term" that forces the model to pay more attention to the provided references. Furthermore, the inclusion of self-aware "pseudo-data" acts as a guardrail, teaching the model that "staying in character" includes acknowledging its own limitations as that character.

Conclusion

The RAGs-to-Riches framework provides a robust method for LLM role-playing that resists character-breaking prompts by treating persona as a retrieval task. While the current framework requires manual effort for high-quality transcription and labeling, it sets a new standard for persona authenticity in LLMs. Future work will explore automated "knapsack-like" problem solvers for sample selection and multimodal expansions pairing emotive text with synthesized speech and video.

Summary updated

BibTeX
@misc{rupprecht2025rags,
  author = {Timothy Rupprecht and Enfu Nan and Arash Akbari and Arman Akbari and Lei Lu and Priyanka Maan and Sean Duffy and Pu Zhao and Yumei He and David R. Kaeli and Yanzhi Wang},
  title = {{RAGs to Riches: RAG-like Few-shot Learning for Large Language Model Role-playing}},
  year = {2025},
  eprint = {2509.12168},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.12168},
}
Figure