Papers › Character-LLM: A Trainable Agent for Role-Playing

Character-LLM: A Trainable Agent for Role-Playing

16 Oct 2023arXiv:2310.10158archive 2025-07-28

Yunfan Shao, Linyang Li, Junqi Dai, Xipeng Qiu

Large language models (LLMs) can be used to serve as agents to simulate human behaviors, given the powerful ability to understand human instructions and provide high-quality generated texts. Such ability stimulates us to wonder whether LLMs can simulate a person in a higher form than simple human behaviors. Therefore, we aim to train an agent with the profile, experience, and emotional states of a specific person instead of using limited prompts to instruct ChatGPT API. In this work, we introduce Character-LLM that teach LLMs to act as specific people such as Beethoven, Queen Cleopatra, Julius Caesar, etc. Our method focuses on editing profiles as experiences of a certain character and training models to be personal simulacra with these experiences. To assess the effectiveness of our approach, we build a test playground that interviews trained agents and evaluates whether the agents \textit{memorize} their characters and experiences. Experimental results show interesting observations that help build future simulacra of humankind.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2310.10158")

Code

Syntology Ran 12 of 15 code samples harvested from 1 repository linked to this paper; 3 have no recorded run. Of those that ran: 12 ran with no contract checked.

By repository: official repository: 15 samples from 1 repository, 12 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

choosewhatulike/trainable-agents officialmentioned in papermentioned on GitHubpytorchApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

15 samples harvested; 12 ran; 0 honoured the contract we drafted; 3 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

12ran
3unverified

Licence: 0 of the 15 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from choosewhatulike/trainable-agents. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

check_result choosewhatulike/trainable-agents/run_api_gen_data.py official repository ran Apache-2.0 (permissive) · af3878439bc986a9 · report
format_interactions choosewhatulike/trainable-agents/run_api_score_turns.py official repository ran Apache-2.0 (permissive) · 25b1dea29e55122c · report
get_output choosewhatulike/trainable-agents/api_call_util.py official repository ran Apache-2.0 (permissive) · 5390fac97c1ea60e · report
get_output_raw choosewhatulike/trainable-agents/api_call_util.py official repository ran Apache-2.0 (permissive) · 28a20e352cb1ce38 · report
get_prompt_single_item choosewhatulike/trainable-agents/run_api_score_turns.py official repository ran Apache-2.0 (permissive) · 4d8c470a88efd7b5 · report
get_reply choosewhatulike/trainable-agents/run_api_score_single.py official repository ran Apache-2.0 (permissive) · e146af9402e23bba · report
get_reply choosewhatulike/trainable-agents/run_api_score_turns.py official repository ran fingerprinted Apache-2.0 (permissive) · 1d971f3ce7ecf159 · report
parse_dialogue_info choosewhatulike/trainable-agents/parser/parse_data_dialogue.py official repository ran fingerprinted Apache-2.0 (permissive) · 19921ae215b33a22 · report
post_process choosewhatulike/trainable-agents/run_api_score_single.py official repository ran Apache-2.0 (permissive) · 7d2f2e6ced176d21 · report
read_json choosewhatulike/trainable-agents/eval_utils.py official repository ran Apache-2.0 (permissive) · ad5f98bba0c21929 · report
read_jsonl choosewhatulike/trainable-agents/io_utils.py official repository ran Apache-2.0 (permissive) · 3151efbd64278742 · report
read_profile choosewhatulike/trainable-agents/eval_utils.py official repository ran Apache-2.0 (permissive) · 36c2e7789224a00e · report
decoder_for_openai choosewhatulike/trainable-agents/api_call_util.py official repository unverified Apache-2.0 (permissive) · 13ae1a522a371250 · report
load_gen_data choosewhatulike/trainable-agents/parser/parse_data_dialogue.py official repository unverified Apache-2.0 (permissive) · 94821323f3209979 · report
read_gen_data choosewhatulike/trainable-agents/eval_utils.py official repository unverified Apache-2.0 (permissive) · ad965edc5fbc1c41 · report

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections