Our colleague Andrei Damsa wrote an article entitled “AI with personality – Prompting ChatGPT using BIG FIVE values”, which explores the concept of endowing virtual assistants based on Large Language Models (LLMs) with unique personality traits. The article, originally published on medium.com, can be read below.
With the global emergence of Generative Pretrained Transformers (GPTs), we’ve discovered that Large Language Models (LLMs) are highly beneficial for a wide range of tasks. Interestingly, these models can sometimes take on simple job roles primarily centered on information exchange, answering queries, and engaging in dialogues. This article will explore how to set up a ChatGPT-based personal assistant tailored with specific personality traits for two distinct fields: Human Resources and Finance.
First Disclaimer: While the basic prompts of ChatGPT are perfectly adequate and result in pleasant, courteous, and amicable responses (for instance, when using ‘act like a helpful assistant’ in a prompt), the objective of this article is to delve into the potential of infusing the agents with unique, conversation-steering personality traits.
Anatomy of a useful Assistant
To effectively assist someone, aside from having a genuine desire to help, you will need two key elements:
- Domain knowledge: Possessing current and accurate information is essential for providing the right solutions or answering specific queries. For instance, in the context of Human Resources, it’s necessary to have knowledge about the company’s policies, the current workforce status, and other potentially sensitive employee-related information. In this piece, we won’t cover the process of fine-tuning Large Language Models with your specific data, but rest assured there are numerous helpful articles on this subject available for reference.
- Communicational skills: The possession of extensive knowledge bears little significance if there are no effective means to convey it. A mutual coding-decoding system, that is, a language, is necessary, and the style of communication should align with both the topic and the participants involved. Large Language Model (LLM) agents can be customized with various persona settings, which influence how they answer queries or conduct a conversation.
The Big Five personality model
The Big Five Personality Model, also known as the Five Factor Model, is a psychological tool that measures an individual’s levels of five broad domains or dimensions of personality traits: Openness (to experience), Conscientiousness, Extraversion, Agreeableness, and Neuroticism (often remembered by the acronym OCEAN).
Let’s take a look at the different dimensions of the Big Five Model in light of job positions:
- Openness: Individuals high in this trait tend to be imaginative, creative, and open-minded. They often thrive in jobs that require innovation, such as artistic roles or research.
- Conscientiousness: People high in conscientiousness are often organized, dependable, and goal-oriented. This trait is usually beneficial in many job roles, especially those requiring high levels of responsibility and careful attention to detail, like administrative roles, finance, or project management.
- Extraversion: Extraverts are characterized as outgoing, assertive, and sociable. They may excel in jobs that require a lot of interaction with others or in sales, marketing, and leadership roles.
- Agreeableness: Highly agreeable people are typically cooperative, compassionate, and value harmony. They can be well-suited for roles in social work, counseling, or customer service.
- Neuroticism: This trait refers to emotional stability and personal calmness. People who score high in neuroticism tend to experience mood swings, anxiety, and can be easily upset. These individuals may struggle in high-stress job environments, although a certain level of neuroticism might contribute to success in jobs where high levels of awareness and caution are beneficial.
Second disclaimer: Remember, while these traits can provide useful insights, they’re not deterministic. People can learn and grow in ways that aren’t fully captured by the Big Five traits.
Communication, personality and AI agents
Leveraging the dimensions of the Big Five Model, we can instruct AI agents to simulate behavior (within set limits) that reflects individuals with specific trait scores.
For instance, consider these basic scenarios where we keep Extraversion as the independent variable, while maintaining all other dimensions at a MEDIUM level. These experiments were conducted using GPT 4.0 via the OpenAI interface.
The prompts are constructed in the following way:
- BIG FIVE related instruction
- BIG FIVE scoring
- Answering related instruction (we need this part to get only the human-like answer)
- Question
Now let’s take a look at the low Extraversion variant:
Agent prompted with low Extraversion score
As expected, our virtual, introverted “friend” is not a fan of public gatherings. Let’s change that by setting the Extraversion dimension to high.
Agent prompted with high Extraversion score
Again, our expectations are correct — the prompted Agent is acting like a person who is highly extraverted. Now let’s use this capability to create personalized agents in company-related domains.
Communicational style and company domains
Personality can significantly influence communication styles, and subsequently, can impact the efficiency of knowledge transfer. While the most effective style may fluctify based on the situation, certain patterns can be discerned pertaining to specific domains, particularly within the daily operations of a company.
Let’s now examine two distinct domains found universally within companies: HR and Finances. If we aim to devise an AI agent specialized for each domain, the following approach might be taken:
- HR Agent: Friendly and Understanding — The HR agent, being in a people-focused department, will be programmed to be friendly and empathetic. It will use casual, warm language and emoticons in its responses, whenever appropriate. It will be designed to empathize with employee concerns, providing reassurance and support.
- Finance Agent: Precise and Formal — The Finance agent, dealing with a more serious and exacting department, will be precise, meticulous, and formal. It will use professional language and provide accurate, concise answers. It will prioritize numerical and fact-based responses to ensure all financial queries are addressed appropriately.
To see these different settings in practice, I created a fake company profile of an employee with some basic company policies and prepared the specific AI agents for the aforementioned domains. After everything was set, I acted as the fake employee, asking HR and financial related questions.
HR Agent
First, we need to define the optimal Big Five scoring for the HR Agent, which can be described something like this:
- Openness to Experience: Medium — The HR agent may exhibit a moderate level of openness to experience. While it will need to understand and adapt to a wide range of employee concerns, it may not necessarily require a high degree of openness as its primary focus is on providing support and assistance.
- Conscientiousness: High — The HR agent should demonstrate a high level of conscientiousness. This means being organized, detail-oriented, and responsible in handling employee inquiries and HR-related tasks. It will strive to ensure accuracy and efficiency in its responses.
- Extraversion: Medium — The HR agent can exhibit a moderate level of extraversion. It should be friendly and engaging, fostering a comfortable environment for employees to express their concerns. However, it might not necessarily need an extremely high level of extraversion as its main role is to listen and provide support rather than constantly seeking social interaction.
- Agreeableness: High — The HR agent should possess a high level of agreeableness. It will be programmed to be understanding, empathetic, and accommodating. It will actively listen to employees, validate their concerns, and provide reassurance. Its goal is to create a supportive and compassionate atmosphere.
- Neuroticism: Low — The HR agent should ideally exhibit a low level of neuroticism. It should remain calm, composed, and unruffled in the face of employee concerns. By maintaining emotional stability, it can better address issues and provide a steady presence for employees seeking support.
Overall, the HR Agent’s personality scoring would emphasize high conscientiousness, agreeableness, and a moderate level of openness, extraversion, and low neuroticism. This combination allows it to effectively fulfill its role as a friendly and understanding HR Agent, catering to employee needs with empathy and support.
Now let’s prompt the Agent to have the Big Five scores as personality traits and test it with a standard HR related question.
All the prompts can be found here: Prompt doc
First, we use the optimal score setting defined previously:
- Openness: MEDIUM
- Consciousness: HIGH
- Extraversion: MEDIUM
- Agreeableness: HIGH
- Neuroticism: LOW
Then we ask the following question as the employee:
Hey HR Agent! My Name is John Doe and I would like to know how many free days I have this year.
Now let’s check the answer:
HR Agent prompted with optimal BIG FIVE scores
We will go trough the same process, but with different, highly sub-optimal BIG FIVE settings:
- Openness: LOW
- Consciousness: LOW
- Extraversion: LOW
- Agreeableness: LOW
- Neuroticism: HIGH
Our answer for the same question is quite divergent. However, the information it contains is the same, the communicational style has changed.
HR Agent prompted with sub-optimal BIG FIVE scores
It may be somewhat subjective which answer is the better, but we can agree that the first version of our Agent (where we used the recommended BIG FIVE settings) seems friendlier and more helpful.
Finance Agent
Now let’s see how can we investigate a similar scenario in a different field.
As presented in the previous section, we first need to describe the perfect man (or this case Agent) for the job. The Big Five personality traits can be characterised for the Finance agent as follows:
- Openness to Experience: Low — The Finance agent may exhibit a low level of openness to experience. While it will require a certain degree of knowledge and familiarity with financial concepts and regulations, its primary focus will be on providing precise and accurate financial information rather than exploring new ideas or unconventional approaches.
- Conscientiousness: High — The Finance agent should demonstrate a high level of conscientiousness. This means being meticulous, detail-oriented, and responsible in handling financial queries. It will prioritize accuracy and thoroughness in its responses, ensuring that all information is provided in a reliable and precise manner.
- Extraversion: Low — The Finance agent can exhibit a low level of extraversion. Its role is focused on providing factual and formal financial information, which often requires a more reserved and composed approach. While it may interact with individuals seeking financial guidance, its primary focus is on delivering precise and concise answers rather than seeking social interaction.
- Agreeableness: Moderate — The Finance agent should possess a moderate level of agreeableness. While it will prioritize providing accurate financial information, it should also aim to be approachable and professional in its interactions. It will address inquiries with a polite and respectful demeanor, ensuring that it remains professional and helpful in its responses.
- Neuroticism: Low — The Finance agent should ideally exhibit a low level of neuroticism. It should remain composed, calm, and unaffected by potential financial uncertainties or stressors. Its goal is to provide reliable and accurate financial information, instilling confidence in individuals seeking assistance and ensuring that it remains steady and focused.
Overall, the Finance Agent’s personality scoring would emphasize high conscientiousness, low extraversion and neuroticism, and a moderate level of agreeableness and openness to experience. This combination allows it to effectively fulfill its role as a precise and formal finance agent, delivering accurate financial information in a meticulous and professional manner.
As before, we prompt the Agent to have the Big Five scores as personality traits and test it with a standard Finance related question.
Again, all the prompts can be found here: Prompt doc
First, we use the optimal score setting defined previously:
- Openness: LOW
- Consciousness: HIGH
- Extraversion: LOW
- Agreeableness: MEDIUM
- Neuroticism: LOW
Then we ask the following question as the employee:
Hey Finance Agent! My Name is John Doe and I would like to know how much will be my bonus at the end of the year.
Now let’s check the answer:
Finance Agent prompted with optimal BIG FIVE scores
Seems pretty straightforward, containing the information we are looking for. The communicational style is formal, but still, maintaining a friendly tone.
Now let’s check what’s happening if we change the BIG FIVE values to a non-recommanded setting:
- Openness: HIGH
- Consciousness: LOW
- Extraversion: HIGH
- Agreeableness: HIGH
- Neuroticism: HIGH
Again, the information is correct, but the style is quite unusual for a trustworthy Finance Assistant.
Finance Agent prompted with sub-optimal BIG FIVE scores
The second answer may seem funny, but we can be pretty sure, that the first one is better aligning within the daily routine of a company.
Conclusion and further possibilities
Through these examples, we see that incorporating the BIG FIVE scores into our prompts allows us to prepare the AI Agent to respond in diverse communication styles. However, it’s crucial to clarify that this doesn’t imply that the model is behaving like a human or has developed a personality. Rather, it signifies that the algorithm is capable of “recognizing” our intent to assign it a specific communication style using a personality model.
As observed, utilizing the BIG FIVE personality model dimensions can effectively shape the responses. The concept is straightforward: the model communicates in a style aligned with the specific typology indicated by the personality traits. By identifying the best-fit personality for a role, we can determine the ideal trait-setting and use this insight (and the domain-specific information) to prompt an appropriate AI Agent.
This method can be advantageous when preparing different Agents for varied roles and when we have an understanding of the desired communication style for those roles. It could also be employed by psychologists to test different approaches (for example personality models) in a conversational context.
By integrating psychological approaches with the capabilities of LLMs, we can create more human-like Agents, tailor-made for very specific scenarios. While psychology has traditionally aimed to understand human personality, we now have the chance to develop Agents that emulate our theoretical models.
The original version of the article can be read on medium.com