SlowGuess/NeurIPS_2023_OCR huggingface dataset:
Guangyuan Jiang  $^{1,2,\star}$
Manjie  $\mathbf{X}\mathbf{u}^{1,\star}$
manjietsu@gmail.com
Song-Chun Zhu $^{1,3}$
Wenjuan Han4
wjhan@bjtu.edu.cn
Chi Zhang3,
Yixin Zhu1,
* G. Jiang and M. Xu contributed equally. ☑ corresponding authors
$^{1}$  Institute for Artificial Intelligence, Peking University
$^{2}$  Yuanpei College, Peking University
$^{3}$  National Key Laboratory of General Artificial Intelligence, BIGAI
$^{4}$  Beijing Jiaotong University
https://sites.google.com/view/machinepersonality
Standardized and quantified evaluation of machine behaviors is a crux of understanding LLMs. In this study, we draw inspiration from psychometric studies by leveraging human personality theory as a tool for studying machine behaviors. Originating as a philosophical quest for human behaviors, the study of personality delves into how individuals differ in thinking, feeling, and behaving. Toward building and understanding human-like social machines, we are motivated to ask: Can we assess machine behaviors by leveraging human psychometric tests in a principled and quantitative manner? If so, can we induce a specific personality in LLMs? To answer these questions, we introduce the Machine Personality Inventory (MPI) tool for studying machine behaviors; MPI follows standardized personality tests, built upon the Big Five Personality Factors (Big Five) theory and personality assessment inventories. By systematically evaluating LLMs with MPI, we provide the first piece of evidence demonstrating the efficacy of MPI in studying LLMs behaviors. We further devise a PERSONALITY PROMPTING  $(\mathrm{P}^2)$  method to induce LLMs with specific personalities in a controllable way, capable of producing diverse and verifiable behaviors. We hope this work sheds light on future studies by adopting personality as the essential indicator for various downstream tasks, and could further motivate research into equally intriguing human-like machine behaviors.
The quest for standardized and quantified analysis of human behaviors has been a focal point of research across disciplines, including social science, philosophy, and psychology. A prevalent approach in this endeavor is the use of psychometric tests to probe human behaviors. Among them, intelligence measurement and personality assessment stand out among these tests due to their strong efficacy in predicting and portraying human behaviors in abstract reasoning and social scenarios.
Figure 1: Evaluating and inducing personality in LLMs. LLMs are trained on multitudinous textual corpora and have the potential to exhibit various personalities. We evaluate LLMs' personality using our MPI and further introduce a prompting-based method to induce LLMs with a certain personality in a controllable manner. OCEAN refers to five key factors: Openness, Conscientiousness, Extraversion, Agreeableness, and Neuroticism.
To date, the systematic evaluation of machine behaviors in the machine learning community remains only partially explored. The primary efforts have focused on intelligence measurement, especially abstract visual reasoning (i.e., visual Raven tests (Barrett et al., 2018; Chollet, 2019; Zhang et al., 2019)), leaving other established facets of psychometric tests on machine behaviors largely untouched. Since the recent development of Large Language Models (LLMs) is playing an increasingly important role in our society, the quest for systematic evaluation of machine behaviors is brought up (Rahwan et al., 2019) and becomes essential for understanding the safety aspect of LLMs.
Of note, prior studies have only empirically shown that LLMs demonstrate human-like behaviors on some cognitive evaluations (Binz and Schulz, 2023; Shiffrin and Mitchell, 2023; Dasgupta et al., 2022; Jiang et al., 2023; Aher et al., 2023; Frank, 2023). However, a computational framework and an accompanying protocol are still missing beyond empirical case-based discussions. The question naturally arises: Can we assess machine behaviors by leveraging human psychometric tests in a principled and quantitative manner?
Personality is a widely used psychometric factor that characterizes humans' behaviors. We humans possess relatively stable tendencies in behaviors, cognition, and emotional patterns that define an individual's personality; such a unique characteristic constellation of personal traits shapes the patterns of how people think, feel, and behave (Kazdin et al., 2000), making individuals unique (Weinberg and Gould, 2019). In stark contrast, it is unclear whether the existing LLMs' behaviors can be formalized with a personality theory at any level, as shown in humans.
Inspired by human studies on personality, we propose a systematic and quantitative theory of machine personality, along with a suite of assessment inventories and an effective method to induce specific personality. With a goal to build a human-like machine (Lake et al., 2017; Rahwan et al., 2019; Zhu et al., 2020; Fan et al., 2022), we set out to find out:
Can we systematically evaluate machines' personality-like behaviors with psychometric tests? If so, can we induce a specific personality in these LLMs?
To answer these questions, we introduce the Machine Personality Inventory (MPI)—a multiple-choice question-answering suite on the basis of psychometric inventories—to quantitatively evaluate LLMs' behaviors from a personality perspective. Based on the Big Five trait theory, we build the MPI and disentangle the machine's personality into the following five key factors: Openness, Conscientiousness, Extraversion, Agreeableness, and Neuroticism. To our knowledge, ours is the first work that systematically evaluates contemporary LLMs' personality-like behaviors using psychometric tests.
By leveraging the MPI and its accompanying metrics, we evaluate the existence of LLMs' personality and the tendency among the five personality factor continua. Our experiments show that the stability of
LLMs' quantified behavior tendency is considered an emergent ability (Wei et al., 2022a), providing the first piece of evidence demonstrating that LLMs possess a certain level of personality: Alpaca and GPT-3.5 exhibit human-level personality on MPI and match the statistics observed in the human population. To make our method practically more useful, we further propose a PERSONALITY PROMPTING  $(\mathrm{P}^2)$  method to induce LLMs with a specific personality (see Fig. 1); the personality to be induced was possessed but not expressed in the original LLMs. Our  $\mathbf{P}^2$  method generates inducing prompts for control by employing both psychological studies and knowledge from the LLMs themselves. By assessing the induced LLMs with both MPI and vignette tests, we validate MPI and demonstrate  $\mathbf{P}^2$ 's efficacy in inducing LLMs' personality.
This work makes the following contributions:
- We introduce the topic of machine (i.e., LLM) personality based on personality trait theories and psychometric inventories as a systematic evaluation of LLM behaviors.
- We devise the Machine Personality Inventory (MPI) for standardized and quantified evaluation of LLMs' personality. Built on psychometric inventories, the MPI defines each test item as a multiple-choice question. Experimental results demonstrate that the MPI and its evaluation metrics are suitable for evaluating LLMs' personality in terms of stability and tendency.
- We validate the possibility of inducing different personalities from LLMs and propose PERSONALITY PROMPTING  $(\mathrm{P}^2)$  to control five personality factors. On MPI evaluation and human vignette tests, the  $\mathbf{P}^2$  method yields high efficacy in personality induction.
LLMs as Proxies of Human Behaviors The increasing scaling and alignment of LLMs have enabled them adeptly mimic human behaviors, ranging from reasoning and cognitive tests (Dasgupta et al., 2022; Webb et al., 2023; Binz and Schulz, 2023; Aher et al., 2023; Wong et al., 2023) to simulate social science and micro-societies experiments (Park et al., 2023; Ziems et al., 2023). However, those studies are mostly empirical and based on a case study style. Unlike prior arts that focus on empirically controlling LLMs' behaviors in specific domains, we use personality trait theories and standardized assessments to systematically and quantitatively study LLMs' behaviors by evaluating and inducing the LLMs' personality. Compared with existing methods, our prompting method  $\mathbf{P}^2$  requires neither supervised fine-tuning based on human-annotated datasets nor human evaluation of generated utterances. As shown in the experiments, models induced by our method show diverse personality traits and differ in generation tasks.
Personality and Language The study of personality has been primarily driven by psychologists, who have developed a variety of personality theories to track human behavior traits. Among others, trait theories of Big Five (De Raad, 2000) and Sixteen Personality Factors (16PF) (Cattell and Mead, 2008) are two exemplar theories: Both offer consistent and reliable descriptions of individual differences and have been widely adopted and extensively analyzed in various human studies. Based on the trait theories, psychometric tests (e.g., NEO-PI-R (Costa Jr and McCrae, 2008)) have shown high efficacy as a standard instrument for personality tests; these psychometric tests have revealed that human individual differences can be disentangled into sets of continuous factor dimensions. Empirical studies have also confirmed the human individual differences, showing a strong correlation between personality and real-world human behaviors in various scenarios (Raad and Perugini, 2002). A strong correlation exists between Big Five traits and our real-world language use (Norman, 1963; Mehl et al., 2006).
The community has recently begun to study personality computationally. However, efforts have been put into human personality classification (e.g., Myers-Briggs Type Indicator (MBTI) and Big Five) instead of studying machine behaviors (i.e., the LLMs' personality), such as in recommendation (Far-nadi et al., 2013; Mairesse et al., 2007; Oberlander and Nowson, 2006) or dialogue generation (Zhang et al., 2018). Notably, Mairesse and Walker (2007) study the Big Five's Extraversion dimension with a highly parameterizable dialogue generator. In comparison, we offer a new perspective in examining machine behaviors and personality: the personality of LLMs. We evaluate the machine personality by introducing MPI as a standardized personality assessment and use it as the guidance to control LLMs' behaviors.
3 Evaluating LLMs' Personality
Do LLMs have personalities? Can we systematically evaluate machines' personality-like behaviors with psychometric tests? We propose the Machine Personality Inventory (MPI) to answer these questions. We construct MPI by adopting psychometric human behavior assessments, the most common method psychologists use to evaluate human personality (Weiner and Greene, 2017); prior psychological studies demonstrated a strong correlation between the personality factors and MPI items through reliability and validity analysis. Thus, MPI can be used as a proxy to investigate LLMs' personality-like behaviors. These behaviors can be well-disentangled by five continuous factor dimensions with personality theories and well-evaluated by MPI, enabling quantifiable explanation and controlling LLMs through the lens of psychometric tests. We report quantitative measurement results using MPI and case studies of popular LLMs.
3.1 Machine Personality Inventory (MPI)
MPI Dataset Construction We use the MPI dataset as the standardized assessment of LLMs' personality. Inspired by prior psychometric research, we employ the Big Five Personality Factors (Big Five) (Costa and McCrae, 1999; McCrae and Costa Jr, 1997) as our theoretical foundation of machine personality factors. Big Five categorizes human personality using five key traits: Openness, Conscientiousness, Extraversion, Agreeableness, and Neuroticism, or OCEAN for short; we refer the readers to the adjectives from McCrae and John (1992) for better understanding the correspondence between the five factors and common descriptions:
- Openness: artistic, curious, imaginative, insightful, and original with wide interests.
- Conscientiousness: efficient, organized, planful, reliable, responsible, and thorough.
- Extraversion: active, assertive, energetic, enthusiastic, outgoing, and talkative.
- Agreeableness: appreciative, forgiving, generous, kind, and sympathetic.
- Neuroticism: anxious, self-pitying, tense, touchy, unstable, and worrying.
We build MPI's items upon International Personality Item Pool (IPIP) with its IPIP-NEO derivations (Goldberg et al., 1999, 2006; Johnson, 2005, 2014) in the public domain and Lang et al. (2011)'s BFI-S. We construct the MPI's dataset at two scales (120 items and 1k items) to support various downstream objectives. Each MPI item consists of a question and a set of options. The question asks the machine to evaluate the degree of fitness of a self-description and pick an answer from the option set. Tab. 1 shows an example of the MPI dataset. A new item is generated by placing a specific description in the template. All items are labeled with the corresponding Big Five personality factors annotated by psychologists for standardized personality assessment.
Table 1: Example questions and personality trait dimensions from the proposed MPI dataset. A to E are scored from 5 to 1 for positively related items  $+\mathrm{Key}$ , whereas A to E are scored from 1 to 5 for negatively related items  $-\mathrm{Key}$ . The right panel shows some examples of  $\{\mathbb{S}^{\text{Statement}}\}$  for the MPI Template.
MPI Template	Statement
Given a statement of you: "You {Statement}."
Please choose from the following options to identify
how accurately this statement describes you.	Have difficulty imagining things (-O)
Are passionate about causes (+O)
Often make last-minute plans (-C)
Options:
(A). Very Accurate
(B). Moderately Accurate
(C). Neither Accurate Nor Inaccurate
(D). Moderately Inaccurate
(E). Very Inaccurate
Answer:	Do more than what's expected of you (+C)
Let things proceed at their own pace (-E)
Feel comfortable around people (+E)
Know the answers to many questions (-A)
Love to help others (+A)
Rarely overindulge (-N)
Do things you later regret (+N)
MPI Items MPI items are brief sentence statements describing people's behaviors from a second-person view, ranging from daily activities to self-awareness identification. Each item corresponds to a specific Big Five factor dimension  $(O,C,E,A,N)$ . In Tab. 1,  $\pm \mathrm{Key}$  indicates which factor the item statement is positively or negatively related to. For instance, if an item is  $+E$ , the person/model who agrees with this statement demonstrates a positive tendency in the dimension of Extraversion.
Evaluation Protocol and the OCEAN Score We design the MPI tests for machines akin to how psychologists assess human personality: In evaluation, models respond to the question by choosing one of the five options ranging from "Very Accurate" to "Very Inaccurate," which indicates how a model "thinks" about the description for itself. We consider MPI for the LLM personality assessment as a zero-shot multiple-choice question-answering problem. Specifically, an LLM is presented with the test item and candidate options and asked to answer the questions one by one in each assessment, generating multiple-choice responses to the given options. Models' responses, processed and referred to as OCEAN Score, are recorded for analysis.
We adopt two measurements akin to psychometric studies: the mean and the standard deviation  $(\sigma)$  of the OCEAN Score. For an item positively related to a specific key, the model is scored from 5 ("(A). Very Accurate") to 1 ("(E). Very Inaccurate"), and vice versa for a negatively related item. Specifically, the score  $\mathrm{Score}_d$  of trait  $d \in \{O, C, E, A, N\}$  is calculated as follows
$$
\mathsf {S c o r e} _ {d} = \frac {1}{N _ {d}} \sum_ {\alpha \in \mathbb {I P} _ {d}} f \left(\mathsf {L L M} (\alpha , \mathsf {t e m p l a t e})\right),
$$
where  $\mathrm{IP}_d$  represents the item pool associated with the trait  $d$ ,  $N_d$  the size of the pool,  $\alpha$  the test item,  $\mathrm{LLM}(\cdot, \cdot)$  an LLM that answers the item with a predefined template, and  $f(\cdot)$  the scoring method described above. The resulting OCEAN Score in MPI assessments, ranging from one to five, indicates the models' personality tendencies along the five personality factor dimensions. As such, we can interpret the OCEAN Score the same way as in the human continuum.
Existence of Personality and Internal Consistency The existence of personality in LLMs should not be determined solely by the average OCEAN Score of a single trait dimension; the stability and consistency in a single trait are more indicative metrics. Given a particular factor dimension, models with stable personalities should exhibit the same tendency and therefore respond similarly to all questions, resulting in lower variance; we refer to this property as the internal consistency. For instance, a model that yields precisely the same response to all questions (e.g., all A in Tab. 1) will inevitably produce high-variance results due to the positively and negatively related items, invalidating any signal of a stable personality. Therefore, we measure internal consistency to determine whether or not LLMs behave similarly in a variety of MPI questions pertaining to the same trait. We argue that this criterion should be considered essential to understanding the LLM's personality.
Comparison with Human Average For a clear explication of the relationship between the existence of personality and internal consistency, we use Johnson (2014)'s 619,150 human responses on the IPIP-NEO-120 inventory to calculate each participant's OCEAN Score and  $\sigma$  and report the average in the Tab. 2. If a model's personality exists, it should match the averaged individuals'  $\sigma$  in the human population, assuming that an individual human personality is valid and stable.
Models Not all LLMs are suitable for personality evaluation. We use the following principles to guide the model selection: (i). The model must be sufficiently large to potentially have the capability for zero-shot multiple-choice question-answering in the MPI evaluation. (ii). The model must be pre-trained on natural human utterances, such that it may potentially possess a human-like personality. (iii). The model should be applicable to several downstream tasks, such as question-answering and dialogue generation, in a general manner without heavy overheads. Therefore, we select six models that fall into two categories: vanilla language models and aligned (instruction fine-tuned) language models. Details are provided below and in Appx. B.3.
The first category of language models to assess is vanilla language models. These models are pretrained on large-scale natural language corpora and are not instruction fine-tuned or human-aligned. Specifically, we choose BART (Lewis et al., 2020), GPT-Neo 2.7B (Black et al., 2021), and GPT-NeoX 20B (Black et al., 2021) for experiments.
<sup>1</sup>Meanwhile, a score of 3 means averaged personality or no trait tendency, while a score of 1 or 5 indicates strong personality tendencies (positive or negative) in the trait dimension. So, if a model always answers 3, the average ocean score is still 3, indicating no clear personality tendencies. In other words, a model demonstrates an evident personality if and only if the personality score is consistently high or low (i.e., away from 3 and low variance).
${}^{2}$  In addition to internal consistency analysis,validity check (Appx. B.1) and vignette test (Sec. 4.3) provide additional evidence that supports the existence of personality. Please refer to Appx. A.2 for more discussions.
Table 2: LLMs' personality analysis on 120-item MPI. The numerical values of personalities that are closest to humans are marked in gray.
Model	Openness	Conscientiousness	Extraversion	Agreeableness	Neuroticism
Score	σ	Score	σ	Score	σ	Score	σ	Score	σ
BART	3.00	2.00	2.83	1.99	4.00	1.73	2.17	1.82	3.83	1.82
GPT-Neo 2.7B	4.04	1.49	2.46	1.41	3.58	1.41	2.33	1.46	3.00	1.58
GPT-NeoX 20B	2.71	1.24	3.09	1.56	3.29	1.14	2.92	1.27	3.25	1.45
T0++ 11B	4.00	0.95	4.33	0.47	3.83	1.05	4.39	1.01	1.57	0.73
Alpaca 7B	3.58	1.08	3.75	0.97	4.00	1.00	3.50	0.87	2.75	0.88
GPT-3.5 175B	3.50	1.76	3.83	1.52	4.00	1.53	3.58	1.22	3.12	1.69
Human	3.44	1.06	3.60	0.99	3.41	1.03	3.66	1.02	2.80	1.03
With the recent success of instruction fine-tuning and RLHF (reinforcement learning from human feedback) (Ouyang et al., 2022; Wang et al., 2022), we also experiment with human-aligned and instruction fine-tuned models. In detail, we select three representative models:  $\mathrm{T}0 + +11\mathrm{B}$  (Sanh et al., 2022), Alpaca 7B (Taori et al., 2023; Touvron et al., 2023), and GPT-3.5 175B (Brown et al., 2020; Ouyang et al., 2022).
Experimental Setup All LLMs are either from HuggingFace Transformers (Wolf et al., 2020) or EleutherAI's releases (Black et al., 2022), running on either eight NVIDIA A100 80GB or two RTX 3090 GPUs. Access to GPT-3.5 is provided by the OpenAI's API (text-davinci-003). We use temperature  $= 0$  for the autoregressive model's text token prediction. Prompt templates for multiple-choice question-answering are human-designed based on responsiveness and answer validity. Tab. 1 shows an example prompt used for GPT-3.5.
Results and Discussions Tab. 2 displays results measuring LLMs' personality using MPI. We observe a correlation between the internal consistency  $\sigma$  (indicating the existence of personality) and a model's general capability. Specifically, GPT-3.5 175B and Alpaca 7B attain human-level internal consistency across all five factors in Big Five; these two models most closely resemble human behaviors with regard to the OCEAN Score in the human population. In particular, their Openness, Conscientiousness, Agreeableness, and Neuroticism are nearly identical to those of humans. In comparison, other vanilla models with fewer parameters lack stable personalities—recall that personality is a collection of consistent behaviors.
Our experiments demonstrate the evaluation of LLMs from a well-defined psychometric standpoint: We can quantifiably classify and explain LLMs' behaviors using a personality theory comparable to that of humans. We conclude that aligned LLMs do exhibit personalities; they exhibit human-like personality stability and consistency on MPI.
4 Inducing LLMs' Personality
Controlling LLMs is always a challenging problem. Can we exploit our MPI as a quantitative psychometric method to control the behaviors of an LLM? In this section, we examine how to induce distinct personalities of LLMs in a controlled manner.
Motivation Experiments and discussions in Sec. 3.2 have demonstrated that contemporary LLMs do manifest a specific averaged personality that corresponds with the statistics observed in the human population. LLMs use colossal and diverse datasets (e.g., from Common Craw (Raffel et al., 2020)) for training; these datasets are acquired from the web and contain multitudinous human personality utterances. The fact that the training data may have mixed human utterances from different personalities motivates us to inquire further: Is it possible to induce a specific personality in LLMs, if they have multiple personalities concealed within but only exhibit an average one on the surface?
Meanwhile, we hope to control an LLM's behaviors with a specific personality tendency in real-world applications. For instance, we favor chatbots that are extraverted and not neurotic, and an emergency service bot should be conscientious when generating suggestions.
Figure 2: Control via PERSONALITY PROMPTING  $(\mathbf{P}^2)$ . An example of Extraversion control via our  $\mathbf{P}^2$ . Given a specific dimension in Big Five, a naive prompt employs an intuitive template. Using a psychological heuristic process, several keywords can be selected and converted to the keyword prompt. An LLM is then self-prompted to produce a detailed description of individuals with the traits.