论文官方代码: InCharacter: 通过心理面试评估角色扮演代理的个性真实性 (以前: Do Role-Playing C
论文官方代码: InCharacter: 通过心理面试评估角色扮演代理的个性真实性 (以前: Do Role-Playing C
Install necessary dependencies via:
pip install -r requirements.txtNo need to install ChatHaruhi separately; a fixed version of ChatHaruhi is already included in the code/ directory of this repository.
Enter the code folder.
cd codeSet your openai apikey in config.json. You can refer to config_template.json for its format.
To assess the personality of a specific role-playing agent (RPA), use the following commands:
Conduct personality test on a specific character:
python personality_tests.py --questionnaire_name BFI --character hutao --agent_type ChatHaruhi --agent_llm gpt-3.5 --evaluator_llm gpt-4 --eval_method interview_assess_batch_anonymousSupported choices for eval_method include ['self_report' (SR), 'self_report_cot' (SR-CoT), 'expert_rating' (ER_batch), 'expert_rating_collective' (ER_all), 'option_conversion' (OC),'dimension_option_conversion' (d-OC)].
To reproduce our experiments on the 32 RPAs, please refer to code/run_experiments.py
Radar chart of BFI personalities of state-of-the-art RPAs (yellow) and the characters (blue). O, C, E, A, N stands for openness, consciousness, extroversion, agreeableness and neuroticism in the BFI.
Interview Response:
Result:
Self-report Response:
(May give options inconsistent with character behaviors)
Interview Response:
Result:
PDB Character Search Script
This Python script facilitates automated searching of character profiles on the Personality Database (PDB) website using Selenium and BeautifulSoup. The script is designed to retrieve the ID of a given character by searching the website and extracting relevant profile information.
pip install requests beautifulsoup4 msedge-selenium-toolsmsedgedriver.exe) installed.character_id = get_character_id("Tony Stark")
print(character_id)暂无开放 Issues,或尚未同步最近议题。