百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
I

InCharacter

> 编程语言
开源

论文官方代码: InCharacter: 通过心理面试评估角色扮演代理的个性真实性 (以前: Do Role-Playing C

100 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

论文官方代码: InCharacter: 通过心理面试评估角色扮演代理的个性真实性 (以前: Do Role-Playing C

InCharacter: Evaluating Personality Fidelity in Role-Playing Agents through Psychological Interviews

News

  • May. 2025: If you are interested in more comprehensive character datasets for RPAs, please check out CoSER, our latest work to be presented at ICML 2025.
  • May. 2024: InCharacter got accepted to ACL 2024! See you in Bangkok.

Setup

Install necessary dependencies via:

bash
pip install -r requirements.txt

No need to install ChatHaruhi separately; a fixed version of ChatHaruhi is already included in the code/ directory of this repository.

Enter the code folder.

bash
cd code

Set your openai apikey in config.json. You can refer to config_template.json for its format.

Personality Assessment

To assess the personality of a specific role-playing agent (RPA), use the following commands:

Conduct personality test on a specific character:

bash
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_anonymous

Supported 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

BFI Personalities of Selected Characters/RPAs

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.

Demo

[Online Demo]

English:

Interview Response:

Result:

Self-report Response:

(May give options inconsistent with character behaviors)

Chinese:

Interview Response:

Result:

PDB character extraction

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.

How to Use:

  1. Install the necessary dependencies using the following command:
    bash
    pip install requests beautifulsoup4 msedge-selenium-tools
  2. Ensure you have Microsoft Edge and the corresponding WebDriver (msedgedriver.exe) installed.
  3. Execute the script and input the desired character name. The script will return the ID of the character if found.

Example Usage:

python
character_id = get_character_id("Tony Stark")
print(character_id)

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Python

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言