E con A gent: Large Language Model-Empowered Agents for Simulating Macroeconomic Activities (2024)

Abstract: The advent of artificial intelligence has led to a growing emphasis on data-driven modeling in macroeconomics, with agent-based modeling (ABM) emerging as a prominent bottom-up simulation paradigm. In ABM, agents (*e.g.*, households, firms) interact within a macroeconomic environment, collectively generating market dynamics. Existing agent modeling typically employs predetermined rules or learning-based neural networks for decision-making. However, customizing each agent presents significant challenges, complicating the modeling of agent heterogeneity. Additionally, the influence of multi-period market dynamics and multifaceted macroeconomic factors are often overlooked in decision-making processes.In this work, we introduce **EconAgent**, a large language model-empowered agent with human-like characteristics for macroeconomic simulation. We first construct a simulation environment that incorporates various market dynamics driven by agents’ decisions regarding work and consumption. Through the perception module, we create heterogeneous agents with distinct decision-making mechanisms. Furthermore, we model the impact of macroeconomic trends using a memory module, which allows agents to reflect on past individual experiences and market dynamics.Simulation experiments show that EconAgent can make realistic decisions, leading to more reasonable macroeconomic phenomena compared to existing rule-based or learning-based agents. Our codes are released at https://github.com/tsinghua-fib-lab/ACL24-EconAgent.

## introduction the advent of artificial intelligence (ai) has indeed transformed the research paradigm in traditional economics @xcite . in the digital economy era, individual economic behavior can be elaborately recorded and analyzed, leading to a growing * corresponding author. in the last two decades, agent-based modeling (abm) has emerged as a promising paradigm for simulating macroeconomics from the bottom up, allowing diverse agents to interact in a complex system @xcite without assuming a predetermined equilibrium @xcite . the evolution of abm in macroeconomics can be divided into two stages. early models @xcite relied on predetermined rules but made oversimplified assumptions about agent behaviors. later learning-based models @xcite @xcite , were trained with large-scale behavioral data. essentially, these models transform multifaceted economic factors into agent decisions. however, customizing decisionmaking mechanisms for each agent presents substantial difficulties. using customized rules requires extensive expert knowledge and sophisticated model calibration @xcite . similarly, employing customized neural networks leads to a sharp increase in network parameters and difficulties in model training @xcite . these difficulties raise the challenge of modeling agent heterogeneity. additionally, existing models typically focus on the individual situations of the current period, making it difficult to consider past periods, their variations, and multifaceted macroeconomic factors. this complicates the modeling of the influence of macroeconomic trends and dynamics. recently, the field of ai has witnessed the rise of large language models (llms) @xcite . leveraging this advancement, llm-empowered agents have demonstrated capabilities in reasoning, planning, and decision-making. in this work, we design econagent, a llm-empowered agent with human-like characteristics for macroeconomic simulations. we first construct a simulation environment that includes labor and consumption market dynamics driven by agents' decisions on working and consumption, as well as fiscal and monetary policies. using a perception module that targets agent profiles and mirrors real-world economic situations, we create heterogeneous agents automatically exhibiting different decision-making mechanisms. additionally, we model the influence of macroeconomic trends with a memory module, enabling agents to reflect on past individual experiences and market dynamics. in our experiments, classic macroeconomic phenomena, such as inflation in the consumption market and the unemployment rate in the labor market, are reproduced more reasonably compared to traditional rule-based or learning-based agents. we also observe that the econagent exhibits humanlike decision-making patterns, reflecting the complexities of human economic behavior. these agents demonstrate swift adaptability in response to changes in the internal and external environment. the contributions of this work can be summarized as follows: ## framework overview in this section, we present the overall framework of the macroeconomic simulation. as illustrated in figure 1 , it follows the well-acknowledged simulation frameworks and provides an environment driven by econagent. the simulation encompasses four primary components: labor, consumption, financial markets, and government taxation. we simulate the two most critical decisions individuals make in real life: work and consumption @xcite , which subsequently influence the fiscal revenues of the government @xcite and impact the dynamics of labor and consumption markets @xcite @xcite . accordingly, banks adjust interest rates based on market inflation or deflation @xcite . ## econagent 3.1 perception module to harness the semantic awareness and real-world knowledge capabilities of llm, we endow each agent with real-world profiles, including name, age, and job. names are generated by the llm and randomly assigned to each agent. the age distribution of agents follows the 2018 u.s. population distribution for ages @xcite . for wage and job assignments, we first adjust the parameters of the hourly wage's pareto distribution to align the monthly wage distribution with 2018 u.s. economic data and tax brackets @xcite . furthermore, we prompt the llm to generate ten job titles for each decile of the monthly wage distribution, mirroring the real-world scenario where different jobs have significant wage differences. agents are initially assigned jobs based on this monthly wage and their jobs are dynamically adjusted throughout the simulation. if an agent chooses to work in the previous month, the job remains unchanged in the following month. if they are unemployed, an offer, based on the current monthly wage, is randomly presented to them. the generated age distribution, monthly wage distribution, and jobs are provided in the supplementary materials. in addition, we characterize the entire economic environment in a manner closely mirroring the real world, enabling llm to thoroughly grasp various economic factors. we integrate variations of key economic variables into the prompts and incorporated typical economic keywords to ensure the llm could fully perceive dynamics in the economic landscape and employ relevant economic principles in its decision-making. for instance, if the agent chose not to work in the previous month, we would supplement the prompt with, in the previous month, you became unemployed and had no income. now, you are invited to work as a(an) @xcite with a monthly salary of @xcite . in the prompt, offer and wage are dynamically adjusted along with the simulation. such prompting enables the agent to recognize the risks associated with 'unemployment', thereby increasing its inclination to work in the subsequent month. more similar designs of prompting are also considered, such as 'shortage of goods' when the demand for agents can not be met. the perception module enables agents to act as heterogeneous households in the real economic environment, contributing to the emergence of macroeconomic phenomena. ## experiments in this section, we conduct experiments to study the ability of econagent, aiming to answer the following research questions (rq). ## conclusion in this work, we ventured into the novel integration of llms with macroeconomic simulation, designing econagent with the abilities of perception, reflection, and decision-making based on the context of real-world economic environments. classic macroeconomic phenomena are reproduced and more reasonable compared to traditional rule-based or learning-based agents. through this endeavor, it has become evident that the capabilities of llms offer a promising avenue to simulate more realistic macroeconomics.