{"id":19287301,"url":"https://github.com/opendilab/psydi","last_synced_at":"2025-10-09T07:34:48.326Z","repository":{"id":232966656,"uuid":"785605922","full_name":"opendilab/PsyDI","owner":"opendilab","description":"PsyDI: Towards a Personalized and Progressively In-depth Chatbot for Psychological Measurements. (e.g. MBTI Measurement Agent)","archived":false,"fork":false,"pushed_at":"2025-08-04T12:33:09.000Z","size":43532,"stargazers_count":178,"open_issues_count":2,"forks_count":18,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-08-26T06:39:32.819Z","etag":null,"topics":["chatbot","llm","mbti","reinforcement-learning","vlm"],"latest_commit_sha":null,"homepage":"https://psydi.opendilab.org.cn","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opendilab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-04-12T08:25:17.000Z","updated_at":"2025-08-25T14:16:43.000Z","dependencies_parsed_at":"2024-04-12T18:30:10.550Z","dependency_job_id":"480f5df7-adeb-4ae9-82aa-e14c09068394","html_url":"https://github.com/opendilab/PsyDI","commit_stats":null,"previous_names":["opendilab/psydi"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/opendilab/PsyDI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opendilab%2FPsyDI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opendilab%2FPsyDI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opendilab%2FPsyDI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opendilab%2FPsyDI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opendilab","download_url":"https://codeload.github.com/opendilab/PsyDI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opendilab%2FPsyDI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000960,"owners_count":26082973,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chatbot","llm","mbti","reinforcement-learning","vlm"],"created_at":"2024-11-09T22:05:48.708Z","updated_at":"2025-10-09T07:34:48.311Z","avatar_url":"https://github.com/opendilab.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PsyDI\n\u003cdiv align=\"center\"\u003e\n    \u003cimg width=\"1000px\" height=\"auto\" src=\"https://github.com/opendilab/PsyDI/blob/main/assets/banner.png\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\nEnglish | [简体中文(Simplified Chinese)](https://github.com/opendilab/PsyDI/blob/main/README.zh.md) | [🔥PsyDI Paper](https://arxiv.org/abs/2408.03337)\n\n## Introduction to PsyDI\n\nPsyDI is a multi-modal and interactive chatbot for psychological assessments. Its objective is to explore users' potential cognitive styles through interactive analysis of their multimodal inputs, finally determining their Myers-Briggs Type Indicator (MBTI). Additionally, PsyDI offers feedback in the form of customized figures and detailed analysis for each user. We are continuously improving PsyDI, with upcoming features such as an MBTI gallery. Your feedback is valuable to us!\n\nAccess PsyDI: [English version](https://psydi-en.opendilab.org.cn/) | [Chinese version](https://psydi.opendilab.org.cn/)\n\n## :boom: News!\n\n- We've recently refreshed our collection of classical character galleries:\n\n| Character                  | Introduction                | MBTI   | Figure |\n|----------------------------| --------------------------- | ------ | ------ |\n| [Yor Forger (SPY×FAMILY)](http://xhslink.com/13YTRE) | Yor Forger is a skilled assassin with a gentle heart, who disguises herself as a government official and becomes an integral part of the makeshift family in the \"SPY×FAMILY\" series. | ISFJ   | \u003cimg width=\"120px\" height=\"auto\" src=\"https://github.com/opendilab/PsyDI/blob/main/assets/yor.png\"\u003e\u003c/a\u003e     |\n| [Anya Forger (SPY×FAMILY)](http://xhslink.com/Z929fF) | Anya Forger is a telepathic schoolgirl with a mischievous streak, who unknowingly plays a pivotal role in her adoptive family's covert activities in the \"SPY×FAMILY\" narrative. |ENFP       | \u003cimg width=\"120px\" height=\"auto\" src=\"https://github.com/opendilab/PsyDI/blob/main/assets/anya.png\"\u003e\u003c/a\u003e      |\n| [Jinx (League of Legends)](http://xhslink.com/Bpt45F) | Jinx is an anarchic and explosively playful marksman in \"League of Legends,\" known for her chaotic streak and dual-wielding firearms that unleash a hailstorm of chaos on the battlefield. |ESFP     |  \u003cimg width=\"120px\" height=\"auto\" src=\"https://github.com/opendilab/PsyDI/blob/main/assets/jinx.png\"\u003e\u003c/a\u003e      |\n| [Viktor (League of Legends)](http://xhslink.com/4VaTbH) | Victor is a brilliant and relentless inventor in \"League of Legends,\" who wields his advanced Hex Core technology to manipulate the battlefield and eradicate his enemies with a blend of strategic disintegration and relentless augmentation. | INTJ   | \u003cimg width=\"120px\" height=\"auto\" src=\"https://github.com/opendilab/PsyDI/blob/main/assets/viktor.png\"\u003e\u003c/a\u003e      |\n| [Phoebe Buffay (Friends)](http://xhslink.com/e6wRII) | Phoebe Buffay is a charming character in \"Friends\", known for her quirky, humorous, and unconventional personality, along with a range of unique life experiences and perspectives. Phoebe was once a street performer, crafting songs filled with personal flair and humor. Her relationship with her biological father, her love for animals, and her support and care for her friends all add much joy and vibrancy to the show. | ENFP   | \u003cimg width=\"120px\" height=\"auto\" src=\"https://github.com/opendilab/PsyDI/blob/main/assets/phoebe.png\"\u003e\u003c/a\u003e      |\n| [Twilight (SPY×FAMILY)](http://xhslink.com/WydWHL) | Twilight (Loid Forger) is the top spy from the West Country. In order to carry out his espionage mission, he temporarily formed a family and adopted Anya, who was originally an orphan. As time goes by, Loid, who was originally focused on the mission, began to genuinely care about the temporary family and started to seriously consider how to permanently settle them after the mission and conceal the secret that he is a spy. | INTJ   | \u003cimg width=\"120px\" height=\"auto\" src=\"https://github.com/opendilab/PsyDI/blob/main/assets/loid.png\"\u003e\u003c/a\u003e      |\n| [Chandler (Friends)](http://xhslink.com/A6N6lM) | Chandler Bing is a character from \"Friends\". He is Ross's college roommate, known for his humorous and witty remarks, often making fun of himself to entertain others. He develops a romantic relationship with Monica and eventually marries her. Known for his wit and humor, Chandler is the comic relief of the series. | ENTP   | \u003cimg width=\"120px\" height=\"auto\" src=\"https://github.com/opendilab/PsyDI/blob/main/assets/chandler.png\"\u003e\u003c/a\u003e      |\n| [An Lingrong (Empresses in the Palace)](http://xhslink.com/Q5aN5M) | Originally a friend of Zhen Huan, An Lingrong grows jealous and schemes against her due to family pressure to win the Yongzheng Emperor's favor and manipulation by other imperial consorts. | ISFJ   | \u003cimg width=\"120px\" height=\"auto\" src=\"https://github.com/opendilab/PsyDI/blob/main/assets/anlingrong.PNG\"\u003e\u003c/a\u003e      |\n| [Emperor and Empress (Empresses in the Palace)](http://xhslink.com/8yglPN) | In the setting of the TV drama \"The Legend of Zhen Huan,\" Emperor Yongzheng and the Empress were a young married couple, having tied the knot when Yongzheng was still the Prince of Yong. However, as time passed, their relationship became complex and tortuous. | ESTJ/ISTJ   | \u003cimg width=\"120px\" height=\"auto\" src=\"https://github.com/opendilab/PsyDI/blob/main/assets/emperor.png\"\u003e\u003c/a\u003e      |\n| [Rafayel (Love and Deep Space)](http://xhslink.com/etQHwQ) | Rafayel is one of the character in \"Love and Deep Space,\" hailing from the oceanic civilization of Lemuria. He is a unique and gifted artist, embodying innocence and deep affection. Although he may appear stubborn and somewhat unapproachable at times, his heart is filled with a strong sense of responsibility and a profound regard for emotions. | INFP   | \u003cimg width=\"120px\" height=\"auto\" src=\"https://github.com/opendilab/PsyDI/blob/main/assets/qiyu.png\"\u003e\u003c/a\u003e      |\n| [Xavier (Love and Deep Space)](http://xhslink.com/0l2HwQ) | Xavier is one of the male protagonists in \"Love and Deep Space,\" currently serving as a Deep Space hunter for the Hunter Association. He exhibits extraordinary patience and a detached, Buddhist-like attitude towards life, interacting with the world in a gentle and peaceful manner while maintaining a moderate distance in interpersonal relationships. | ISTP   | \u003cimg width=\"120px\" height=\"auto\" src=\"https://github.com/opendilab/PsyDI/blob/main/assets/shenxinghui.png\"\u003e\u003c/a\u003e      |\n| [Sylus (Love and Deep Space)](http://xhslink.com/a/xvzhf8cSkQzX) | Sylus is one of the male protagonists in \"Love and Deep Space.\" He is the highest-bounty criminal in the history of Pheros Star and the only one who has successfully escaped from the temporal prison. He demonstrates deep care and a strong sense of responsibility for important people with his firm leadership, decisive action, and thoughtful decision-making.   | ENTJ | \u003cimg width=\"120px\" height=\"auto\" src=\"https://github.com/opendilab/PsyDI/blob/main/assets/qinche.png\"\u003e\u003c/a\u003e |\n| [Zayne (Love and Deep Space)](http://xhslink.com/a/HDi13AmEMEzX) | Zayne is one of the male protagonists in \"Love and Deep Space,\" a talented heart surgeon. He values solitude and self-reflection, facing challenges with calm analysis and strategic planning, showing deep care and a strong sense of responsibility for important people.   | INTJ | \u003cimg width=\"120px\" height=\"auto\" src=\"https://github.com/opendilab/PsyDI/blob/main/assets/lishen.png\"\u003e\u003c/a\u003e |\n| [Sho Yamanaka (Haikyuu!!)](http://xhslink.com/a/nqZTCNwKeLzX) | Sho Yamanaka is the male protagonist in \"Haikyuu!!,\" the setter of the Karasuno High School Volleyball Club. He infects others with his open and energetic nature, showing tenacious fighting spirit and adaptability, becoming a core in the team with warm support and encouragement, reflecting his emphasis on interpersonal relationships and love for life. | ESFP | \u003cimg width=\"120px\" height=\"auto\" src=\"https://github.com/opendilab/PsyDI/blob/main/assets/rixiang.png\"\u003e\u003c/a\u003e |\n| [Gojo Satoru (Jujutsu Kaisen)](http://xhslink.com/a/secOD0ZlNQzX) | Gojo Satoru is a character in \"Jujutsu Kaisen,\" a Special Grade Jujutsu Sorcerer. He communicates with others in a relaxed and humorous way, showing a proud light of wisdom, while demonstrating an indomitable fighting spirit and strategic thinking in the face of challenges. Although he shows calmness and calculation in battle, he shows deep care and support for his students and companions. | ENTP | \u003cimg width=\"120px\" height=\"auto\" src=\"https://github.com/opendilab/PsyDI/blob/main/assets/wutiaowu.png\"\u003e\u003c/a\u003e |\n\n## Outline\n\n- [Introduction to PsyDI](#introduction-to-psydi)\n- [News](#boom-news)\n- [Outline](#outline)\n- [Quick Start](#star_struck-quick-start)\n- [PsyDI Mini Pipeline](#key-psydi-mini-pipeline)\n- [Introduction](#books-introduction)\n  - [Evaluation Framework](#evaluation-framework)\n  - [Process Description](#process-description)\n  - [Iterative Refinement](#iterative-refinement)\n- [Evaluation](#bar_chart-evaluation)\n- [Roadmap](#roadmap)\n- [Running Frontend Locally](#running-frontend-locally)\n- [Acnowledgements](#acnowledgements)\n- [Feedback and Contribution](#feedback-and-contribution)\n- [Citation](#citation)\n- [License](#license)\n\n\n## :star_struck: Quick Start\n\nGetting started with PsyDI is easy! Follow these simple steps to begin your journey of self-discovery:\n\n:rocket: **Accessing PsyDI Online:** Visit our [website](https://psydi.opendilab.org.cn/) to access PsyDI directly online. No downloads or installations required!\n\n:memo: **Beginning the Quiz:**\n   - Upon entering the quiz, you'll be prompted to choose a label that best represents you. This helps PsyDI tailor the assessment to your personality.\n   - Next, you'll be asked to share one of your recent favorite songs and your most recent thoughts. This information provides valuable insights into your current mindset and preferences.\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg width=\"1000px\" height=\"auto\" src=\"https://github.com/opendilab/PsyDI/blob/main/assets/init_part_en.png\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n:bulb: **Exploring Your Personality:**\n   - In the Explore chapter, PsyDI will ask you a series of questions to gain a basic understanding of who you are based on your provided tags. This initial interaction sets the stage for deeper exploration.\n\n:speech_balloon: **Interactive Chatting:**\n   - PsyDI will chat with you to delve deeper into topics mentioned earlier. This interactive process typically consists of 12-15 questions, allowing PsyDI to get to know you better.\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg width=\"1000px\" height=\"auto\" src=\"https://github.com/opendilab/PsyDI/blob/main/assets/choose_part_en.png\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n:sparkles: **Detailed Analysis:**\n   - Finally, PsyDI will provide you with a comprehensive analysis of your Myers-Briggs Type Indicator (MBTI) and characteristics. This analysis offers valuable insights into your personality traits and tendencies.\n   - Additionally, you'll receive a generated image that matches your temperament, adding a visual element to your understanding of yourself.\n\nNow that you know the basics, dive in and start your journey with PsyDI today!\n\n## :key: PsyDI Mini Pipeline\n\nWe offer a mini version of the PsyDI pipeline as a demo, making it accessible for everyone to use. This mini pipeline allows users to input several initial posts and generates an initial MBTI score table. It then selects posts with the highest likelihood of having deep meaning to initiate a multi-turn dialogue with the user. After the dialogue, the pipeline updates the user's MBTI score table. Such mini pipeline is the core module of PsyDI as mentioned in the [Introduction](#books-introduction).\n\nIn this mini pipeline, we apply [DeepSeek](https://www.deepseek.com/) as a large language model example to provide multi-turn dialogue. Users can also replace it with any other language model with multi-turn dialogue capabilities.\n\n## Installation\n```shell\npip3 install -r requirements.txt\n```\n\n## Usage\nMini Pipeline with Our [Released Score Model](https://huggingface.co/OpenDILabCommunity/PsyDI-RM-v0.1-zh)\n```shell\nREWARD_MODEL_PATH=\u003crm-path\u003e API_KEY=\u003cyour-api-key\u003e API_URL=https://api.deepseek.com MODEL_NAME=deepseek-chat python3 psydi_mini_agent.py\n```\n\nMini Pipeline with Fake Debug Score Model\n```shell\nDEBUG=true API_KEY=\u003cyour-api-key\u003e API_URL=https://api.deepseek.com MODEL_NAME=deepseek-chat python3 psydi_mini_agent.py\n```\n\n## :books: Introduction\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg width=\"1000px\" height=\"auto\" src=\"https://github.com/opendilab/PsyDI/blob/main/assets/psydi_pipeline.png\"\u003e\u003c/a\u003e\n\u003c/div\u003e\nPsyDI operates on the principle that understanding a user's expressed thoughts involves delving deeper into the underlying cognitive processes. By uncovering these cognitive processes, PsyDI can identify the user's commonly used cognitive styles and ultimately determine their Myers-Briggs Type Indicator (MBTI).\n\n### Evaluation Framework\n\nAt the core of PsyDI's evaluation process is a table of MBTI scores, following established psychological testing methods. Each row of this table represents the probability of the current user being assigned to a specific MBTI type, ranging from 0 to 100.\n\n### Process Description\n\nPsyDI first converts the user's multimodal information into text form. The score model then evaluates these textual expressions, providing probabilities for each sentence being associated with any MBTI type. PsyDI iterates through the following three steps until determining the user's MBTI:\n\n1. **Post Selection:**\n    PsyDI selects the post with the highest scores under both of the two MBTI types with the Top-2 probabilities. This step aims to pinpoint the most ambiguous information and prompt further questions to clarify.\n\n2. **Dialog Interaction:**\n    PsyDI engages the user in multiple rounds of dialog, utilizing three interaction formats: multiple choice, forced choice, and free question and answer. All the question and answer pairs are integrated into a new post.\n\n3. **Table Update:**\n    PsyDI updates the MBTI score table with the new post, incorporating the insights gained from the dialog interaction.\n\n### Iterative Refinement\n\nPsyDI iterates through these steps until it reaches a confident determination of the user's MBTI, continually refining its understanding through each interaction.\n\n## Evaluation\n\n### Score Model Evaluation\nWe have constructed a pair-wise MBTI dataset and compared the performance of multiple closed-source and open-source models with PsyDI on this dataset. PsyDI has demonstrated superior results over existing language models across various MBTI datasets, as shown in the following:\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg width=\"1000px\" height=\"auto\" src=\"https://github.com/opendilab/PsyDI/blob/main/assets/benchmark.png\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n### Pipeline Evaluation\nWe assessed the accuracy of the PsyDI Pipeline compared to existing MBTI tests in evaluating MBTI bots, with the results displayed on the left side of the figure below. Additionally, we evaluated the degree of dependence of the PsyDI Pipeline on initial dynamics and found that PsyDI can determine the user's true MBTI in subsequent conversations even under random initial dynamics, with the results shown on the right side of the figure:\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg width=\"1000px\" height=\"auto\" src=\"https://github.com/opendilab/PsyDI/blob/main/assets/rank_random.png\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n## Roadmap\n- [x] Online deployment of PsyDI\n- [x] Release all the frontend code and deployment scripts\n- [x] MBTI evaluation gallery\n- [x] Other language support (English)\n- [x] Release the backend code examples and prompts\n- [ ] Release the generated datasets\n- [x] Release the trained reward model\n- [x] Technical report arxiv link\n- [ ] More multi-modal and interactive questions and examples\n\n## Running Frontend Locally\n\nYou will first need to use the environment variables [defined in `.env.example`](.env.example) to run PsyDI agent.\n\n\u003e Note: You should not commit your `.env` file or it will expose secrets that will allow others to control access to your various OpenAI and authentication provider accounts.\n\nThen you need to install node.js (v18.17.0 is recommended) and npm on your machine. \n\nAfter setting up all the prerequisites, you can run the following commands to start the frontend:\n```bash\nnpm install -g pnpm\npnpm install\npnpm dev --port 3001\n```\n\nYour app template should now be running on [localhost:3001](http://localhost:3001/).\n\n## Acnowledgements\n\n- Thanks JAAAAACKKKKKY for her contributions to the UI/UX design and artistic materials for this project.\"\n- [vercel/ai-chatbot](https://github.com/vercel/ai-chatbot)\n\n## Feedback and Contribution\n\n- [File an issue](https://github.com/opendilab/PsyDI/issues/new) on Github\n- Discuss on PsyDI's WeChat group (i.e. add us on WeChat: ding314assist)\n\n  \u003cimg src=https://github.com/opendilab/PsyDI/blob/main/assets/wechat.jpeg width=35% /\u003e\n- Contact our email (opendilab@pjlab.org.cn)\n\nWe appreciate all the feedbacks and contributions to improve PsyDI, both algorithms and system designs.\n\n## Citation\n\n```latex\n@article{li2024psydi,\n    title={PsyDI: Towards a Personalized and Progressively In-depth Chatbot for Psychological Measurements},\n    author={Li, Xueyan and Chen, Xinyan and Niu, Yazhe and Hu, Shuai and Liu, Yu},\n    journal={arXiv preprint arXiv:2408.03337},\n    year={2024}\n}\n```\n\n## License\n\nPsyDI is released under the Apache 2.0 license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopendilab%2Fpsydi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopendilab%2Fpsydi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopendilab%2Fpsydi/lists"}