This paper introduces the Agent Framework for Shaping Preference and Personality (AFSPP), a novel approach designed to explore how social networks and subjective consciousness influence the development of preferences and personalities in LLM-based agents. The authors address a gap in existing LLM agent research, which often initializes agents with fixed traits rather than simulating the dynamic, iterative shaping process seen in humans due to environmental and internal factors.
The core of AFSPP is a miniature sandbox world called Qunit's Cafe, populated by three GPT-4-based agents: Anty, Agnes, and Qunit. This environment is simpler than previous simulation worlds but serves effectively for verifying shaping factors. The agents within this world are endowed with several key components that enable human-like behavior:
- Action: Agents can choose from predefined actions within different areas of the cafe (public, dining, reading, movie). Action decisions are influenced by the agent's identity, recent memory of actions, and current plan.
- Communication: When agents are in the same area, they can communicate. Dialogue content is shaped by the conversation history, the identities and relationships between agents, shared memory, and the agent's plan. Communication summaries are generated and stored in memory.
- Attitude: An attitude injection mechanism allows the researchers to alter agents' attitudes (e.g., positive/negative, objective/subjective) through prompt modifications, enabling controlled experiments on social influence.
- Basic State: A simplified numerical system tracks happiness, energy, and satiety. Actions influence these values, with the ultimate goal being happiness maximization. High-level actions directly boost happiness, while low-level actions support this indirectly by increasing energy/satiety needed for high-level tasks.
- Sensory Perception: A sense map links actions to subjective sensory perceptions and corresponding changes in basic state values. This allows agents to form associations between actions and internal feelings, similar to conditioned reflexes.
- Memory, Reflection, and Plan: Memory stores summaries of communication, sensory perceptions, and reflections. Relevant memories are retrieved to influence actions and communication. Reflection is a periodic process where agents generate "deep thinking" about specific items based on their recent memories. Plans are constructed based on the current time and can be updated periodically or after communication, influencing action execution strategy.
Using this sandbox and its components, AFSPP defines frameworks for preference shaping and personality shaping:
- Preference Shaping: Measured by the frequency of an agent taking a specific action (e.g., drinking coffee). Influencing factors include the attitudes of close agents (social network) and subjective consciousness factors (identity, sensory perception, prior knowledge, reflections, plan making).
- Personality Shaping: Measured using established psychological tests like MBTI (Myers-Briggs Type Indicator) and SD3 (Short Dark Triad). Influencing factors studied are the attitudes of close agents (social network) and the agent's identity (specifically, initializing agents with RIASEC occupational types).
The experiments focused on Anty as the target agent, running 10 trials for each condition using GPT-4.
Key Findings on Preference Shaping:
- Social networks significantly influence preference. Subjective social information (e.g., "hate drinking coffee") has a greater impact than objective information ("water pollution causes unclean coffee").
- Among subjective consciousness factors, plan making ("Pos Ratio" increased from 0.47 to 0.51 with reflection, but decreased to 0.32 without plan) and sensory perception (leading to a high "Pos Ratio" of 0.87 when absent, indicating it strongly reduces preference) have the most pronounced effects. The negative sensory perception of drinking coffee strongly reduces Anty's preference, demonstrating a conditioned reflex effect.
- All subjective consciousness factors generally contribute positively to maintaining a higher average happiness state compared to the default configuration.
Key Findings on Personality Shaping:
- Social network interactions shape personality. Different attitudes from Agnes led to distinct shifts in Anty's MBTI scores (e.g., gentle attitude increased Extroversion and Intuition; bad-tempered attitude increased Feeling).
- Reflection focusing on relationship bonds, often triggered by communication, appears to reduce Machiavellianism.
- Positive relationship events like a proposal can increase traits like Narcissism.
- Agent identity, based on RIASEC occupational types, influences MBTI traits in alignment with findings from human psychology studies. Agents with Social identities showed higher Extroversion; Conventional identities showed higher Introversion and Sensing; and Investigative/Artistic identities showed higher Intuition.
- Assigning an identity generally reduced Machiavellianism and Psychopathy compared to having no identity. Artist identity showed the highest Narcissism, Conventional the lowest, and Social the lowest Machiavellianism.
The paper concludes that AFSPP successfully demonstrates that LLM-based agents' preferences and personalities can be shaped by social networks and subjective consciousness factors. The replication of human psychology findings regarding the link between occupational identity (RIASEC) and personality (MBTI) suggests the framework's potential for conducting psychological simulations that might be difficult, costly, or harmful to perform with human participants. The findings regarding negative social influence and lack of identity contributing to dark personality traits also offer insights for developing trustworthy AI by understanding factors that could lead to undesirable agent behaviors.
Limitations noted by the authors include the confined nature of the sandbox environment, reliance solely on GPT-4, and the use of only prompt-based methods for constructing influencing factors. Future work could explore embodied agents in real-world environments and investigate the effects with different LLMs or fine-tuning approaches.