{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/coser-coordinating-llm-based-persona","title":"CoSER: Coordinating LLM-Based Persona Simulation of Established Roles","arxiv_id":"2502.09082","date":"2025-02-13","proceeding":null,"authors":["Xintao Wang","Heng Wang","Yifei Zhang","Xinfeng Yuan","Rui Xu","Jen-tse Huang","Siyu Yuan","Haoran Guo","Jiangjie Chen","Wei Wang","Yanghua Xiao","Shuchang Zhou"],"abstract":"Role-playing language agents (RPLAs) have emerged as promising applications of large language models (LLMs). However, simulating established characters presents a challenging task for RPLAs, due to the lack of authentic character datasets and nuanced evaluation methods using such data. In this paper, we present CoSER, a collection of a high-quality dataset, open models, and an evaluation protocol towards effective RPLAs of established characters. The CoSER dataset covers 17,966 characters from 771 renowned books. It provides authentic dialogues with real-world intricacies, as well as diverse data types such as conversation setups, character experiences and internal thoughts. Drawing from acting methodology, we introduce given-circumstance acting for training and evaluating role-playing LLMs, where LLMs sequentially portray multiple characters in book scenes. Using our dataset, we develop CoSER 8B and CoSER 70B, i.e., advanced open role-playing LLMs built on LLaMA-3.1 models. Extensive experiments demonstrate the value of the CoSER dataset for RPLA training, evaluation and retrieval. Moreover, CoSER 70B exhibits state-of-the-art performance surpassing or matching GPT-4o on our evaluation and three existing benchmarks, i.e., achieving 75.80% and 93.47% accuracy on the InCharacter and LifeChoice benchmarks respectively.","url_abs":"https://arxiv.org/abs/2502.09082v1","url_pdf":"https://arxiv.org/pdf/2502.09082v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"coser-coordinating-llm-based-persona","repo_url":"https://github.com/Neph0s/CoSER","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"none","reach":null},{"paper_slug":"coser-coordinating-llm-based-persona","repo_url":"https://github.com/neph0s/incharacter","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2502.09082","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2502.09082"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/Neph0s/CoSER","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/neph0s/incharacter","reach":null}],"summary":{"ran_honours":4,"ran_draft_wrong":5,"unverified":14},"by_repo_kind":{"official":{"samples":1,"ran":1,"repositories":1},"listed":{"samples":22,"ran":8,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"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"},"n_pointer_only_for_licence":1,"samples":[{"code_sha256_prefix":"4b18614854f76d47","entry":"base64_to_float_array","repo":"neph0s/incharacter","repo_kind":"listed","path":"code/ChatHaruhi/ChatHaruhi.py","file_url":"https://github.com/neph0s/incharacter/blob/HEAD/code/ChatHaruhi/ChatHaruhi.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4b18614854f76d47"}},{"code_sha256_prefix":"9083059a6053c01a","entry":"base64_to_string","repo":"neph0s/incharacter","repo_kind":"listed","path":"code/ChatHaruhi/ChatHaruhi.py","file_url":"https://github.com/neph0s/incharacter/blob/HEAD/code/ChatHaruhi/ChatHaruhi.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9083059a6053c01a"}},{"code_sha256_prefix":"8ac80353df541407","entry":"get_bge_embeddings","repo":"neph0s/incharacter","repo_kind":"listed","path":"code/ChatHaruhi/ChatHaruhi.py","file_url":"https://github.com/neph0s/incharacter/blob/HEAD/code/ChatHaruhi/ChatHaruhi.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8ac80353df541407"}},{"code_sha256_prefix":"6087c37cde8b7d71","entry":"get_bge_zh_embedding","repo":"neph0s/incharacter","repo_kind":"listed","path":"code/ChatHaruhi/ChatHaruhi.py","file_url":"https://github.com/neph0s/incharacter/blob/HEAD/code/ChatHaruhi/ChatHaruhi.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6087c37cde8b7d71"}},{"code_sha256_prefix":"c7933743a582b312","entry":"get_character_prompt","repo":"Neph0s/CoSER","repo_kind":"official","path":"gca_evaluation/utils.py","file_url":"https://github.com/Neph0s/CoSER/blob/HEAD/gca_evaluation/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c7933743a582b312"}},{"code_sha256_prefix":"ccd15a636f8315df","entry":"get_general_embedding","repo":"neph0s/incharacter","repo_kind":"listed","path":"code/ChatHaruhi/ChatHaruhi.py","file_url":"https://github.com/neph0s/incharacter/blob/HEAD/code/ChatHaruhi/ChatHaruhi.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ccd15a636f8315df"}},{"code_sha256_prefix":"a96df6daca0f00a5","entry":"get_text_from_data","repo":"neph0s/incharacter","repo_kind":"listed","path":"code/ChatHaruhi/ChatHaruhi.py","file_url":"https://github.com/neph0s/incharacter/blob/HEAD/code/ChatHaruhi/ChatHaruhi.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a96df6daca0f00a5"}},{"code_sha256_prefix":"f5012fac79a4d832","entry":"is_chinese_or_english","repo":"neph0s/incharacter","repo_kind":"listed","path":"code/ChatHaruhi/ChatHaruhi.py","file_url":"https://github.com/neph0s/incharacter/blob/HEAD/code/ChatHaruhi/ChatHaruhi.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f5012fac79a4d832"}},{"code_sha256_prefix":"e0af9feb46733253","entry":"response_postprocess","repo":"neph0s/incharacter","repo_kind":"listed","path":"code/ChatHaruhi/ChatHaruhi.py","file_url":"https://github.com/neph0s/incharacter/blob/HEAD/code/ChatHaruhi/ChatHaruhi.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e0af9feb46733253"}},{"code_sha256_prefix":"72ca06e73065b5f0","entry":"ChatHaruhi","repo":"neph0s/incharacter","repo_kind":"listed","path":"code/ChatHaruhi/ChatHaruhi.py","file_url":"https://github.com/neph0s/incharacter/blob/HEAD/code/ChatHaruhi/ChatHaruhi.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"72ca06e73065b5f0"}},{"code_sha256_prefix":"ded92e88e0b003ab","entry":"cached","repo":"neph0s/incharacter","repo_kind":"listed","path":"code/ChatHaruhi/ChatHaruhi.py","file_url":"https://github.com/neph0s/incharacter/blob/HEAD/code/ChatHaruhi/ChatHaruhi.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ded92e88e0b003ab"}},{"code_sha256_prefix":"3886f44e69594927","entry":"download_models","repo":"neph0s/incharacter","repo_kind":"listed","path":"code/ChatHaruhi/ChatHaruhi.py","file_url":"https://github.com/neph0s/incharacter/blob/HEAD/code/ChatHaruhi/ChatHaruhi.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3886f44e69594927"}},{"code_sha256_prefix":"4a6302a49807a5e7","entry":"get_bge_embedding","repo":"neph0s/incharacter","repo_kind":"listed","path":"code/ChatHaruhi/ChatHaruhi.py","file_url":"https://github.com/neph0s/incharacter/blob/HEAD/code/ChatHaruhi/ChatHaruhi.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4a6302a49807a5e7"}},{"code_sha256_prefix":"fb71211b0752f685","entry":"get_bge_embeddings_safe","repo":"neph0s/incharacter","repo_kind":"listed","path":"code/ChatHaruhi/ChatHaruhi.py","file_url":"https://github.com/neph0s/incharacter/blob/HEAD/code/ChatHaruhi/ChatHaruhi.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fb71211b0752f685"}},{"code_sha256_prefix":"d39ee52667a78ef8","entry":"get_db_from_type","repo":"neph0s/incharacter","repo_kind":"listed","path":"code/ChatHaruhi/ChatHaruhi.py","file_url":"https://github.com/neph0s/incharacter/blob/HEAD/code/ChatHaruhi/ChatHaruhi.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d39ee52667a78ef8"}},{"code_sha256_prefix":"338cf403e8136171","entry":"get_embedding_for_chinese","repo":"neph0s/incharacter","repo_kind":"listed","path":"code/ChatHaruhi/ChatHaruhi.py","file_url":"https://github.com/neph0s/incharacter/blob/HEAD/code/ChatHaruhi/ChatHaruhi.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"338cf403e8136171"}},{"code_sha256_prefix":"1acb7e8163ea94f9","entry":"get_embedding_for_english","repo":"neph0s/incharacter","repo_kind":"listed","path":"code/ChatHaruhi/ChatHaruhi.py","file_url":"https://github.com/neph0s/incharacter/blob/HEAD/code/ChatHaruhi/ChatHaruhi.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1acb7e8163ea94f9"}},{"code_sha256_prefix":"b6444230426a2754","entry":"get_general_embeddings","repo":"neph0s/incharacter","repo_kind":"listed","path":"code/ChatHaruhi/ChatHaruhi.py","file_url":"https://github.com/neph0s/incharacter/blob/HEAD/code/ChatHaruhi/ChatHaruhi.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b6444230426a2754"}},{"code_sha256_prefix":"9d6500eb148b11cd","entry":"get_general_embeddings_safe","repo":"neph0s/incharacter","repo_kind":"listed","path":"code/ChatHaruhi/ChatHaruhi.py","file_url":"https://github.com/neph0s/incharacter/blob/HEAD/code/ChatHaruhi/ChatHaruhi.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9d6500eb148b11cd"}},{"code_sha256_prefix":"936046d800c3e83d","entry":"get_luotuo_model","repo":"neph0s/incharacter","repo_kind":"listed","path":"code/ChatHaruhi/ChatHaruhi.py","file_url":"https://github.com/neph0s/incharacter/blob/HEAD/code/ChatHaruhi/ChatHaruhi.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"936046d800c3e83d"}},{"code_sha256_prefix":"cd9ff808f0197b70","entry":"luotuo_embedding","repo":"neph0s/incharacter","repo_kind":"listed","path":"code/ChatHaruhi/ChatHaruhi.py","file_url":"https://github.com/neph0s/incharacter/blob/HEAD/code/ChatHaruhi/ChatHaruhi.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cd9ff808f0197b70"}},{"code_sha256_prefix":"0ef004806ceb47bb","entry":"luotuo_openai_embedding","repo":"neph0s/incharacter","repo_kind":"listed","path":"code/ChatHaruhi/ChatHaruhi.py","file_url":"https://github.com/neph0s/incharacter/blob/HEAD/code/ChatHaruhi/ChatHaruhi.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0ef004806ceb47bb"}},{"code_sha256_prefix":"55e9d4ef95279fed","entry":"tiktokenizer","repo":"neph0s/incharacter","repo_kind":"listed","path":"code/ChatHaruhi/ChatHaruhi.py","file_url":"https://github.com/neph0s/incharacter/blob/HEAD/code/ChatHaruhi/ChatHaruhi.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"55e9d4ef95279fed"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}