Coder Social home page Coder Social logo

opendilab / psydi Goto Github PK

View Code? Open in Web Editor NEW
55.0 2.0 1.0 24.2 MB

PsyDI: A MBTI agent that helps you understand your personality type through a relaxed multi-modal interaction.

Home Page: https://psydi.opendilab.org.cn

License: Apache License 2.0

TypeScript 92.21% JavaScript 3.62% CSS 0.40% Python 3.77%
chatbot mbti reinforcement-learning llm vlm

psydi's Introduction

PsyDI

English | 简体中文(Simplified Chinese)

Introduction to PsyDI

PsyDI 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!

PsyDI can now be accessed directly via our web link.

💥 News!

  • We've recently refreshed our collection of classical character galleries:
Character Introduction MBTI Figure
Yor Forger (SPY×FAMILY) 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
Anya Forger (SPY×FAMILY) 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
Jinx (League of Legends) 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
Viktor (League of Legends) 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
Phoebe Buffay (Friends) 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
Twilight (SPY×FAMILY) 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
Chandler (Friends) 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
An Lingrong (Empresses in the Palace) 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

Outline

🤩 Quick Start

Getting started with PsyDI is easy! Follow these simple steps to begin your journey of self-discovery:

🚀 Accessing PsyDI Online: Visit our website to access PsyDI directly online. No downloads or installations required!

📝 Beginning the Quiz:

  • 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.
  • 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.

💡 Exploring Your Personality:

  • 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.

💬 Interactive Chatting:

  • 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.

Detailed Analysis:

  • 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.
  • Additionally, you'll receive a generated image that matches your temperament, adding a visual element to your understanding of yourself.

Now that you know the basics, dive in and start your journey with PsyDI today!

🔑 PsyDI Mini Pipeline

We 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.

In this mini pipeline, we apply DeepSeek 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.

Installation

pip3 install -r requirements.txt

Usage

Mini Pipeline with Our Released Score Model

REWARD_MODEL_PATH=<rm-path> API_KEY=<your-api-key> API_URL=https://api.deepseek.com MODEL_NAME=deepseek-chat python3 psydi_mini_agent.py

Mini Pipeline with Fake Debug Score Model

DEBUG=true API_KEY=<your-api-key> API_URL=https://api.deepseek.com MODEL_NAME=deepseek-chat python3 psydi_mini_agent.py

📚 Introduction

PsyDI 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).

Evaluation Framework

At 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.

Process Description

PsyDI 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:

  1. Post Selection: 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.

  2. Dialog Interaction: 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.

  3. Table Update: PsyDI updates the MBTI score table with the new post, incorporating the insights gained from the dialog interaction.

Iterative Refinement

PsyDI iterates through these steps until it reaches a confident determination of the user's MBTI, continually refining its understanding through each interaction.

Roadmap

  • Online deployment of PsyDI
  • Release all the frontend code and deployment scripts
  • MBTI evaluation gallery
  • Other language support (English/Korean/Japanese)
  • Release the backend code examples and prompts
  • Release the generated datasets and the trained reward model
  • Technical report arxiv link
  • More multi-modal and interactive questions and examples

Running Frontend Locally

You will first need to use the environment variables defined in .env.example to run PsyDI agent.

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.

Then you need to install node.js (v18.17.0 is recommended) and npm on your machine.

After setting up all the prerequisites, you can run the following commands to start the frontend:

npm install -g pnpm
pnpm install
pnpm dev --port 3001

Your app template should now be running on localhost:3001.

Acnowledgements

  • Thanks JAAAAACKKKKKY for her contributions to the UI/UX design and artistic materials for this project."
  • vercel/ai-chatbot

Feedback and Contribution

We appreciate all the feedbacks and contributions to improve PsyDI, both algorithms and system designs.

Citation

@misc{psydi,
    title={Psydi: A MBTI agent that helps you understand your personality type through a relaxed multi-modal interaction.},
    author={PsyDI Contributors},
    publisher={GitHub},
    howpublished={\url{https://github.com/opendilab/PsyDI}},
    year={2024},
}

License

PsyDI is released under the Apache 2.0 license.

psydi's People

Contributors

karroyan avatar paparazz1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

qianqccc

psydi's Issues

There is still a lot of room for improvement !!! But i like your work !!!

First of all, thank you very much for sharing your excellent work!
But there is still a lot of room for improvement, and I will only express my ideas from the user's perspective.
In previous tests, my MBTI personality was ENFJ. And the answer PsyDI gave me is ISTJ, and I respect this answer, after all, personality changes with time and events. But I am an E-person (in my personal opinion), and no matter what, I don't think I will be classified as an I-person.
Here are some suggestions:

  1. You can try to slowly create a scene and have users answer around it. For example, guiding users to the company and preparing for the most tedious group meetings every day! Your best friend publicly rejected your proposal yesterday, what do you want to do now??? Instead of a rigid question being left to the user to try reading comprehension.
  2. I don't think it's a good way to mobilize the user's emotions in the early stage, rather than directly asking them to express their recent thoughts.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.