# Large Language Model-Empowered Agents
for Simulating Macroeconomic Activities

Nian Li, Chen Gao, Yong Li, Qingmin Liao
Tsinghua University
<EMAIL_ADDRESS>{chgao96, liyong07<EMAIL_ADDRESS>
###### Abstract

The advent of the Web has brought about a paradigm shift in traditional
economics, particularly in the digital economy era, enabling the precise
recording and analysis of individual economic behavior. This has led to a
growing emphasis on data-driven modeling in macroeconomics. In macroeconomic
research, Agent-based modeling (ABM) emerged as an alternative, evolving
through rule-based agents, machine learning-enhanced decision-making, and,
more recently, advanced AI agents. However, the existing works are suffering
from three main challenges when endowing agents with human-like decision-
making, including agent heterogeneity, the influence of macroeconomic trends,
and multifaceted economic factors. Large language models (LLMs) have recently
gained prominence in offering autonomous human-like characteristics.
Therefore, leveraging LLMs in macroeconomic simulation presents an opportunity
to overcome traditional limitations. In this work, we take an early step in
introducing a novel approach that leverages LLMs in macroeconomic simulation.
We design prompt-engineering-driven LLM agents to exhibit human-like decision-
making and adaptability in the economic environment, with the abilities of
perception, reflection, and decision-making to address the abovementioned
challenges. Simulation experiments on macroeconomic activities show that LLM-
empowered agents can make realistic work and consumption decisions and emerge
more reasonable macroeconomic phenomena than existing rule-based or AI agents.
Our work demonstrates the promising potential to simulate macroeconomics based
on LLM and its human-like characteristics.

##  1 Introduction

The advent of the Web has indeed altered the research paradigm in traditional
economics jorgenson2001information . Specifically, in the digital economy era,
each individual’s economic behavior can be well recorded and analyzed, leading
to an increasing emphasis on individual data-driven modeling in
macroeconomics. These data may include consumption habits, online shopping,
social media activity, search histories, and more, which economists can
utilize to understand better individual economic behavior rather than relying
solely on traditional macroeconomic indicators schorfheide2015real .

Economic research in macroeconomics aims to analyze and predict economic
variables quantitatively. Early empirical statistical models, such as the
Phelps Model phelps1967phillips , and the work of Kydland and Prescott
kydland1982time , focused on data-driven analysis and policy outcome
prediction. Dynamic Stochastic General Equilibrium (DSGE) models
christiano2005nominal  were introduced to capture economic dynamics but
assumed a perfect world. Agent-based modeling (ABM) emerged as a promising
alternative, allowing diverse agents and institutions to interact without
assuming a predetermined equilibrium farmer2009economy . ABM accommodates
nonlinear behaviors and allows policymakers to simulate various policy
scenarios and assess their economic impacts. The evolution of ABM in
macroeconomics can be divided into three stages: early models
tesfatsion2006handbook ; brock1998heterogeneous  relied on rule-based agent
behavior but oversimplified interactions; integration of machine learning
techniques improved agent decision-making with more data-driven behavior
geanakoplos2010leverage ; farmer2009economy ; recent advancements involve
neural networks, deep learning, and reinforcement learning to create
sophisticated and adaptive AI agents trott2021building ; zheng2022ai .

However, the macroeconomic simulation still suffers the critical challenges
from three aspects. First, the intrinsic heterogeneity of agents plays a
pivotal role in the emergence of macroeconomic phenomena, posing significant
challenges for effective modeling. Second, when delving into the dynamic
interplays within labor, consumption, and financial markets, capturing the
impacts of overarching macroeconomic trends on individual agent decision-
making becomes a hard task. Third, there are multifaceted economic factors
shaping decision-making processes, such as the expected income, the tax paid,
etc.

Recently, the field of artificial intelligence has seen the rise of large
language models (LLMs) zhao2023survey . Building on this advancement, agents
powered by these LLMs have been exhibiting an ability to interact, reason, and
make decisions. LLM-based agents have the potential to overcome traditional
limitations by offering more realistic and adaptable decisions, thereby
providing a more comprehensive simulation. First, the LLM agent is able to
behave autonomously, i.e., adaptively react and perform tasks based on the
environment without explicit instructions autogpt ; babyagi . Second, the LLM
agent has enough intelligence that it can respond like a human and even
actively take actions with self-oriented planning and scheduling
wang2023survey ; xi2023rise . Last, the LLM agent has the ability to interact
and communicate with humans or other AI agents park2023generative .

In this study, we introduce a novel approach to macroeconomic simulation by
leveraging large language models. First, we build a detailed simulation
environment that mirrors the essential components and dynamics of a real-world
economy. In this environment, we deploy a prompt-engineering-driven LLM agent
designed with the abilities of perception, reflection, and decision-making
based on the context of real-world economic environments. Specifically, we
enrich agents with heterogeneous real-world profiles and characterize real
economic environments in the perception module to foster the emergence of
macroeconomic behaviors, addressing the first challenge. To make agents grasp
market dynamics, we design a memory module to simulate the impact of broad
macroeconomic trends on agents’ decision-making. Last, by harnessing the LLM’s
semantic perception, we prompt the agent to make decisions considering
multiple economic variables in the action module without necessitating pre-
defined rules.

During our experiments, classic macroeconomic phenomena are reproduced and
more reasonable compared to traditional rule-based or AI agents, such as
inflation in the consumption market and unemployment rate in the labor market.
We also observed that the LLM agents exhibited human-like decision-making
patterns, echoing the intricacies of human economic behavior. These agents
showcased swift adaptability when meeting shifts in the internal environment.

The contribution of this paper can be summarized as follows.

  * •

In this paper, we take the pioneering step of integrating large language
models into the domain of macroeconomic simulations, bridging two seemingly
disparate fields into a cohesive research avenue.

  * •

We construct an environment and design LLM-empowered agents, which not only
emulate real-world economic actors but also emerge classic macroeconomic
phenomena.

  * •

The results show that our approach not only enhances the realism and depth of
macroeconomic simulations but also provides a promising avenue for future
research, potentially reshaping how we study and understand the intricacies of
global economies.

##  2 Related Work

###  2.1 Simulation in Economy Research

Economic research, especially for macroeconomics, tries to obtain quantitative
analysis or prediction for the economic variables. The earliest works of
empirical statistical models hendry1982formulation , such as Phelps Model
phelps1967phillips , study the data-driven analysis for the macroeconomic
phenomenon, by revealing the relations between some critical variables.
Kydland and Prescott kydland1982time  designed a computational model for
predicting the outcome of the policy. After that, Dynamic Stochastic General
Equilibrium (DSGE) models christiano2005nominal , are designed to capture the
dynamics of various economic variables, such as output, inflation,
consumption, and investment, while accounting for the uncertainty and
randomness inherent in economic processes. However, as pointed out by
farmer2009economy , ”these models assume a perfect world, and by their very
nature rule out crises of the type we are experiencing now.”

Different from these models, Agent-based modeling (ABM) is a more promising
solution, in which diverse agents and institutions interact based on rules or
computational models, avoiding the assumption of a predetermined economic
equilibrium. These models allow for a wide range of nonlinear behaviors,
enabling policymakers to simulate different policy scenarios and
quantitatively assess their impacts on the economy. The paradigm of agent-
based modeling in macroeconomics can also be regarded as a simulation-based
approach, of which the related research can be divided into three stages: In
the early stages of agent-based modeling tesfatsion2006handbook ;
brock1998heterogeneous , models were primarily rule-based, with agents
following predetermined sets of rules. These models were characterized by
their simplicity and reliance on heuristic decision rules. While they provided
valuable insights into emergent system behaviors, they often oversimplified
agent behavior and interactions. After that, with the progress of machine
learning, researchers integrated machine learning techniques into agent-based
models. To be specific, machine learning algorithms were employed to enhance
agent decision-making processes, allowing for more data-driven and realistic
agent behaviors geanakoplos2010leverage ; farmer2009economy . However, these
models still had limitations in capturing the full complexity of economic
systems. Recently, researchers have leveraged neural networks, deep learning,
and reinforcement learning to create more sophisticated and adaptive AI agents
trott2021building ; zheng2022ai .

In this work, we explore leveraging large language models, which are
considered as sparks of artificial general intelligence (AGI) to construct
agents for simulation-based research on macroeconomics.

###  2.2 Large Language Model-empowered Agents

As mentioned above, the simulation system has widely utilized the paradigm of
agent-based modeling. Recently, large language models such as ChatGPT chatgpt
, LLaMA touvron2023llama , Alphca alpaca , and GLM zeng2023glm  have achieved
a huge breakthrough, considered as a sparkle of artificial general
intelligence (AGI) bubeck2023sparks ; yang2023dawn . To be specific, these
large language models trained with large-scale corpus have shown human-level
abilities in three aspects, and provide the basis for using LLM to construct
agents for simulation wang2023survey ; xi2023rise .

First, the LLM agent is able to adaptively react and perform tasks based on
the environment without predefined explicit instructions autogpt ; babyagi .
In addition, during the simulation process, the LLM agent can even burst new
ideas, solutions, goals, etc, franceschelli2023creativity . For example,
AutoGPT can automatically schedule plans when given a set of available tools
and the final task goal, exemplifying the significant potential of LLMs in
constructing autonomous agents. BabyAGI babyagi  created an LLM-driven script
running an infinite loop, which continuously maintains a task list, in which
each task is completed the task by ChatGPT API chatgpt  based on the task
context. Second, the LLM agent has enough intelligence that it can respond
like a human and even actively take actions with self-oriented planning and
scheduling wang2023survey ; xi2023rise . The environment input is not limited
to the textual input; instead, the recent multi-modal fusion methods can feed
other types of information, such as image or audio, to the LLM agent
zhu2023minigpt . The action space of the LLM agent is neither limited to
texts, for which the tool usage and internal action module allow the agent to
take various actions schick2023toolformer . Last, the LLM agent has the
ability to interact and communicate with humans or other AI agents
park2023generative . In the simulation, especially agent-based simulation, the
communication ability promotes the individual simulation to community-level
gilbert2005simulation . For an LLM-driven agent, it can generate texts, which
can be received and understood by another agent, which provide the basis for
interpretable communication among agents or between humans and agents
park2023generative . Moreover, the simulation at the community level requires
heterogeneity in agents, and the LLM agents can well meet the requirements
with different prompts or demonstrations for playing different roles in
society qian2023communicative .

With the three aspects of strong abilities, LLM agents have been widely used
in many areas, including social science park2022social ; li2023you ;
li2023quantifying ; park2023generative ; kovavc2023socialai ; lin2023agentsims
; kovavc2023socialai ; gao2023s ; jinxin2023cgmi , natural science
boiko2023emergent ; bran2023chemcrow , etc. Social science is one of the most
promising areas for adopting LLM agents for simulation, which is the science
of society and social activities. For example, Social Simulacra park2022social
simulates an online social community and explores the potential of utilizing
agent-based simulations to aid decision-makers in improving community
regulations. Some other works li2023you ; li2023quantifying  investigate the
potential impacts of different behavioral characteristics of LLM-based agents
in social networks. Generative Agents park2023generative  and AgentSims
lin2023agentsims  construct multiple agents in a virtual town to simulate
human daily life. SocialAI School kovavc2023socialai  employs LLM-based agents
to simulate and investigate the fundamental social cognitive skills during the
course of child development. S3 gao2023s  builds a social network simulator,
focusing on the propagation of information, emotion, and attitude. CGMI
jinxin2023cgmi  is a framework for multi-agent simulation. CGMI maintains the
personality of the agents through a tree structure and constructs a cognitive
model. The authors simulated a classroom scenario using CGMI.

It is worth mentioning there are some works that consider the use of LLM in
economic research. Horton et al. horton2023large  studied the bias in
decision-making with several decision-making experiments in the economy. Bran
et al. brand2023using  studied some individual features of LLM agents, such as
willing-to-pay. Bybee et al. bybee2023surveying  studied the LLM agent’s
ability to understand the financial and macroeconomic variables based on news
from the Wall Street Journal. In short, these existing works have conducted
several attempts to evaluate LLM’s economic characteristics, such as
rationality, and the perception of investor sentiment. However, these works
only consider individual one-step behavior, without experimenting on multi-
step behaviors within a multi-agent simulation environment, which is the focus
of our work.

##  3 System Overview

In this section, we present the overall system of the macroeconomic
simulation. It follows the well-acknowledged simulation model and provides an
environment for large language model-empowered agents. The overall framework
is illustrated in Figure 1. Macroeconomics encompasses four components: labor,
consumption, financial markets, and government taxation, covering the primary
components of existing macroeconomic simulations. In this work, we simulate
the two most critical decisions individuals make in real life: work and
consumption, which subsequently influence the fiscal revenues of the
government and impact the dynamics of labor and consumption markets.
Accordingly, banks adjust interest rates based on market inflation or
deflation. In the following, we shed light on the system’s design, mechanics,
and anticipated capabilities, as well as the challenges of simulating real-
world agent decisions.

Figure 1: The illustration of our simulation framework and large language
model-based agents.

###  3.1 System Design and Mechanics

Our framework encompasses 1) agents’ labor supply and consumption decisions
gatti2011macroeconomics ; wolf2013multi ; dawid2018agent , 2) government
taxation zheng2022ai ; trott2021building ; dawid2018agent , 3) dynamics in the
labor and consumption markets lengnick2013agent ; deissenberg2008eurace ;
dawid2012eurace , and 4) adjustments in bank interest rates wolf2013multi ;
dawid2018agent . Important notations are shown in Table 1.

Table 1: Important notations. $N$ | The number of agents
---|---
$p^{w}_{i},l_{i}$ | Work propensity, whether to work
$p^{c}_{i}$ | Consumption propensity
$w_{i},v_{i},z_{i},\hat{z}_{i},s_{i}$ |  Hourly wage, monthly wage (expected income), income, post-tax income, savings
$P$ | The price of essential goods.
$r,\pi,u$ | Interest rate, inflation rate, unemployment rate
$r^{n},\pi^{t},u^{n}$ |  Natural interest rate, target inflation rate, natural unemployment rate

####  3.1.1 Agent Decisions

Labor supply and consumption are necessary agent decisions in macroeconomic
simulations. In our system, each simulation step indicates one month, in which
agent $i$ decides,

  * •

whether to work $l_{i}\sim Bernoulli(p_{i}^{w})$, where $p_{i}^{w}$ is the
work propensity. If they decide to work ($l_{i}=1$), they receive a monthly
wage as the income, which varies among agents. Each agent is initialized with
an hourly wage $w_{i}$ following the Pareto distribution zheng2022ai , and the
monthly wage $v_{i}$ is calculated by multiplying $168$ hours (21 working days
at 8 hours/day lengnick2013agent ). Those who abstain from work ($l_{i}=0$)
have an income of zero.

  * •

the consumption propensity $p_{i}^{c}$, indicating the proportion of their
wealth (including their current savings and income in this month) they wish to
spend for essential goods.

As one of the challenges of simulating agent decisions and emerging coherent
macroeconomic phenomena, there are multifaceted economic factors influencing
decisions, such as the expected income, the tax paid, etc. However,
conventional simulations typically model a limited number of factors via pre-
defined equations lengnick2013agent ; gatti2011macroeconomics ; wolf2013multi
.

####  3.1.2 Government Taxation

The government assumes the responsibility of taxation and provision of public
services in society, as well as fiscal redistribution to ensure social equity.
Taxes are collected from all the agents’ income111We only consider income tax
in this work and leave other taxes for future work, such as value-added tax..
The progressive tax for income $z_{i}$ is calculated as follows,

$\displaystyle T(z_{i})$
$\displaystyle=\sum_{k=1}^{B}\tau_{k}\left(\left(b_{k+1}-b_{k}\right)\mathbf{1}\left[z_{i}>b_{k+1}\right]\right.$
$\displaystyle\left.+\left(z_{i}-b_{k}\right)\mathbf{1}\left[b_{k}<z_{i}\leq
b_{k+1}\right]\right),$ (1)

where $b_{k}$ is the $k$-th tax bracket, $\tau_{k}$ is corresponding tax rate,
and $\mathbf{1}[\cdot]$ is indicator function. The tax brackets and rates are
set as the 2018 U.S. Federal tax schedule.

The tax revenue is then evenly redistributed among all the agents. Therefore,
the post-tax income is

$\hat{z}_{i}=z_{i}-T(z_{i})+z^{r}=z_{i}-T(z_{i})+\frac{1}{N}\sum_{j=1}^{N}T(z_{j}),$
(2)

where $z^{r}$ indicates the redistribution. The individual savings for the
agent are then updated as follows,

$s_{i}\leftarrow s_{i}+\hat{z}_{i}$ (3)

####  3.1.3 Productivity and Consumption

Incorporating agent decisions and government taxation, we simulate labor and
consumption market dynamics based on economic principles. First, working
agents contribute 168 hours of productivity monthly, translating to the
production of essential goods222Note that we leave the simulation of firms as
future work.. The inventory of goods $G$ is then updated as,

$G\leftarrow G+S=G+\sum_{j=1}^{N}l_{j}\times 168\times A,$ (4)

where $S$ denotes the production volume from agents’ labor supply, and $A$ is
a universal productivity. As for the consumption, the total demand of goods
is,

$D=\sum_{j=1}^{N}d_{j}=\sum_{j=1}^{N}\frac{c_{j}}{P}=\sum_{j=1}^{N}\frac{p_{j}^{c}s_{j}}{P},$
(5)

where $d_{j}$ is the intended demand of agent $j$, $c_{j}$ is the intended
consumption, $s_{j}$ is current savings, and $P$ is the price of essential
goods. Furthermore, both labor and consumption markets evolve based on the
imbalance between supply and demand. Specifically, the imbalance is defined
as,

$\bar{\varphi}=\frac{D-G}{\max(D,G)},$ (6)

When the essential goods are in shortage, i.e., the supply can not meet the
demand, the worker’s wage should be increased to stimulate production. Due to
the rise in labor costs for firms, they will also increase the goods price to
ensure a certain profit margin lengnick2013agent ; dawid2018agent ;
wolf2013multi . The hourly wage is adjusted as follows,

$w_{i}\leftarrow
w_{i}\times(1+\varphi_{i}),\varphi_{i}\sim\begin{cases}Uniform(0,\alpha_{w}\bar{\varphi}),&\bar{\varphi}\geq
0\\\ Uniform(\alpha_{w}\bar{\varphi},0),&\bar{\varphi}<0\end{cases},$ (7)

and the price is adjusted as follows,

$P\leftarrow
P\times(1+\varphi_{P}),\varphi_{P}\sim\begin{cases}Uniform(0,\alpha_{P}\bar{\varphi}),&\bar{\varphi}\geq
0\\\ Uniform(\alpha_{P}\bar{\varphi},0),&\bar{\varphi}<0\end{cases},$ (8)

where $\alpha_{w}$ and $\alpha_{P}$ are the maximum rate of change when
adjusting the wage and price, respectively. We also simulate the dynamics of
goods consumption. Specifically, an agent $j$ is randomly selected to consume
essential goods, and real consumption goods and money are limited by current
inventory of goods,

$\hat{d}_{j}=\min(d_{j},G),\hat{c}_{j}=\hat{d}_{j}\times P$ (9)

which means the demand is met if, and only if, there is a sufficient supply.
The inventory of total goods also decreases,

$G\leftarrow G-\hat{d}_{j}.$ (10)

The process continues until every agent has consumed goods once.

####  3.1.4 Financial Market

Annually, the savings of each agent increase based on the interest rate set by
the bank,

$s_{i}\leftarrow s_{i}\times(1+r).$ (11)

Furthermore, in the first month of each year, the bank adjusts the interest
rate based on the inflation in the consumption market and the unemployment
rate in the labor market. Specifically, we adopt the widely-used Taylor rule
to set the interest rate wolf2013multi ; dawid2018agent ,

$r=\max(r^{n}+\pi^{t}+\alpha^{\pi}(\pi-\pi^{t})+\alpha^{u}(u^{n}-u),0),$ (12)

where $r^{n}$ and $u^{n}$ indicate the natural interest rate and unemployment
rate, respectively. Besides, $\pi^{t}$ is the target inflation rate. The
interest rate is adjusted adaptively according to annual inflation rate $\pi$
and unemployment rate $u$, where $\alpha^{\pi}$ and $\alpha^{u}$ denote
inflation and unemployment adaptation coefficients, respectively. We define
the inflation and unemployment rate as follows,

$\pi=\frac{\bar{P}_{n}-\bar{P}_{n-1}}{\bar{P}_{n-1}},u=\frac{\sum_{m=1}^{12}\sum_{j=1}^{N}(1-l_{j})}{12N},$
(13)

where $\bar{P}_{n}$ is the average goods price over the $n$-th year, and $m$
denotes the $m$-th month.

When considering the dynamics of labor, consumption, and financial markets,
the influence of these macroeconomic trends on agent decision-making is also
seldom considered, raising the second challenge. Moreover, the heterogeneity
of agents, which is vital for the emergence of macro phenomena, is also
challenging to handle. Existing models often lack of flexibility to simulate
heterogeneous agents and assume one or a few representative decision-making
rules axtell2022agent .

Leveraging the semantic understanding of LLM, the automatic perception of
economics in the real world, and memory and reflection capabilities, we can
achieve human-like simulation of agent decisions.

###  3.2 System Capabilties

  * •

Replication of economic phenomena. Our system encapsulates the essence of
economic behaviors and dynamics, such as labor market inflation and financial
market fluctuations, as well as how people respond to them farmer2009economy ;
dawid2018agent ; axtell2022agent . Classic and important economic phenomena
can be replicated under reasonable agent decision-making.

  * •

Extensibility. Beyond mere replication of economic phenomena, it provides a
robust framework for incorporating a broader range of simulation entities and
economic activities, such as firm hiring and production. By introducing more
realistic economic actions and corresponding data, we can simulate economic
phenomena that are closer to real-world scenarios deissenberg2008eurace ;
dawid2012eurace .

  * •

Policy analysis. It affords a lens to scrutinize potential effects of
macroeconomic policy within this constructed ecosystem, which can effectively
replicate the potential impacts of certain policies on the economics
dawid2018agent ; dosi2013income ; dosi2015fiscal .

##  4 LLM-empowered Agents

Given the constructed simulation environment introduced above, we are able to
deploy agents empowered by large language models, encompassing three modules
within the prompting engineering.

###  4.1 Perception Module

To harness the semantic awareness and real-world knowledge capabilities of
LLM, we endowed 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 18-60. Given our simulation spans 20 years, agents’ ages also increase
annually. We then provide a brief overview of the mechanism of government
taxation, including tax collection and redistribution. 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 zheng2022ai . 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 the
mechanics of economic dynamics. 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) [offer] with a monthly salary of [wage].

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 persons in the
real economic environment, contributing to the emergence of macroeconomic
phenomena.

###  4.2 Memory Module

Considering that decision-making within the economic environment is a
sequential task, wherein past experiences and economic dynamics play pivotal
roles in present decisions, the incorporation of a memory module can assist
the agent in fully accounting for market dynamics and in acquiring valuable
decision-making insights. Specifically, We dynamically maintain the memory
pool with $2L+1$ conversations, encompassing the economic environment and
agent decisions from the previous $L$ months. Besides, at the end of each
quarter, we input dialogues of this quarter into the LLM, prompting it to
‘reflect’ on the economic phenomena and to respond to how these phenomena
might influence its subsequent decisions. The prompts we design are as
follows,

Given the previous quarter’s economic environment, reflect on the labor,
consumption, and financial markets, as well as their dynamics. What
conclusions have you drawn?

The following is an example of the reflection from the LLM.

Based on the previous quarter’s data, the labor market experienced
deflation…The consumption market also saw a decrease in prices for essential
goods…The financial market’s interest rates remained unchanged at 3.00%.
Overall, the quarter highlighted the need for careful financial planning and
adaptability in response to market fluctuations.

Obviously, after reflection, agents can fully perceive past market dynamics
and adaptively adjust their strategies to maintain daily life and cope with
future uncertainties.

The memory module allows the agent to comprehend dynamics in the market and
glean reflections from past experiences, modeling the influence of
macroeconomic trends.

###  4.3 Action Module

When prompting the LLM for decision-making, we explicitly incorporated
considerations of living costs, future aspirations, and economic trends into
the prompts. We prompt the LLM to respond with a value in the range [0, 1] to
indicate the propensity of working and consumption. We provide a complete
prompt in the supplementary materials.

The action module empowers the agent to automatically account for the
influence of various economic factors when making decisions, such as income
and savings, leveraging the semantic perception capabilities of LLM. It only
requires the inclusion of relevant economic variables in the prompts, without
the need for specially designed decision rules.

##  5 Experiments

In this section, we conduct experiments to study the ability of LLM agents,
aiming to answer the following research questions (RQ).

  * •

RQ1: How do the LLM-empowered agents behave in the simulation environment,
compared with the traditional agents?

  * •

RQ2: How about LLM agent’s strategy? Could it provide reasonable explanations
for the actions?

###  5.1 Experimental Setup

We commence by defining the experimental landscape. We investigate some
phenomena of paramount interest in macroeconomics, including several
macroeconomics indicators and two macroeconomics regularities. For comparative
analysis, we select two representative macroeconomic simulations and adopt
their carefully designed rules of working and consumption as baselines
lengnick2013agent ; gatti2011macroeconomics .

####  5.1.1 Definition of macroeconomics indicators

Monthly nominal GDP is defined as $S\times P$. As for real GDP, we set the
first year in the simulation as the reference year and define it as $S\times
P_{0}$, where $P_{0}$ is the goods price in the reference year. The definition
of the annual (price) inflation rate and the unemployment rate is shown in Eq.
13. For wage inflation, the definition is similar to that of price inflation,
where the average price is replaced with the average monthly wage across all
the agents.

####  5.1.2 Baselines

We select LEN lengnick2013agent  and CATS gatti2011macroeconomics  as the
baselines because 1) they partially reproduce the aforementioned
macroeconomics phenomena within their own (more complex) simulation
frameworks, and 2) carefully designed decision rules of working and
consumption are representative, reflecting typical decision-making observed in
real-life scenarios.

Consumption. In LEN, the consumption decision is memory-based, which means
that consumption is influenced not only by current income but also by past
accumulated savings. Besides, the goods price is another important factor.

Conversely, in CATS, it is non-memory-based consumption decisions suggesting
that consumption is solely related to the current income. The agent aims to
keep a desired ratio between savings and income, and consumption is only a
proportion of the income. For more human-like decisions, we also introduce the
influence of interest rate in the decision rule.

Work. The rule of working in LEN and CATS can not be directly used in our
simulation framework because we don’t simulate firms. Therefore, we follow the
intuitions of their designs and define a formula implying that a higher
expected income, lower savings, or a lower interest rate lead to a greater
propensity to work.

Considering the importance of agents’ heterogeneity in macroeconomic
simulation, we also combine these two baselines as an additional baseline
Composite, where each agent randomly adopts one rule of them.

Besides, we also select an AI method, AI-Economist zheng2022ai  as a baseline
AI-Eco, which builds on the assumption of rational decision-making and employs
reinforcement learning (RL) arulkumaran2017deep  to maximize the agent’s
utility. The utility is a satisfaction function positively correlated with
savings and consumption but negatively correlated with labor. Maximizing
utility implies that the agent always desires more savings and consumption but
prefers less labor. The policy network for the agent’s work and consumption
decisions is a multi-layer perceptron (MLP), where the input includes various
environment information, such as monthly wage, interest rate, goods price, tax
rates, etc.

The details of decision rules in LEN and CATS and the training process of AI-
Economist are provided in the supplementary materials.

####  5.1.3 Simulation parameters

We simulate $N=100$ agents. The productivity is set as $A=1$ for simplicity.
The initial goods price is the average hourly wage across all the agents. For
the labor and consumption dynamics, $\alpha_{w}=0.05$ and $\alpha_{P}=0.10$.
For the financial market, $r^{n}=0.01$, $\pi^{t}=0.02$, $u^{n}=0.04$, and
$\alpha^{\pi}=\alpha^{u}=0.5$. Note that our results and conclusions are not
sensitive to these parameters.

Our simulation is implemented with Python. We use GPT-3.5-turbo provided by
OpenAI API as the LLM333https://platform.openai.com/. Other detailed
simulation parameters, crucial for replicability and deeper understanding, are
provided in the supplementary materials.

###  5.2 Comparison with Baselines

The LLM agent’s performance was juxtaposed with representative rule-based
baselines, as detailed in two referenced works and their combination
lengnick2013agent ; gatti2011macroeconomics . Our evaluation encapsulates a
broad spectrum of macroeconomic indicators and regularities lengnick2013agent
; gatti2011macroeconomics ; dawid2018agent ; axtell2022agent .

Macroeconomic indicators. In Figure 2, we depict the fluctuations of the
annual inflation rate, unemployment rate, nominal GDP, and growth rate of
nominal GDP. Note that the unreasonable unemployment rate (around 46%) and
nominal GDP for AI-Eco are not reported. Both rule-based and RL-driven
baselines produce anomalous indicators and large fluctuations. In contrast,
agent decision-making based on the LLM has manifested more stable and
numerically plausible macroeconomic phenomena across multiple facets, even
without fine-grained calibration. Specifically, the inflation rate
consistently fluctuated within a -5% to 5% range after the 3-th year, whereas
the baselines exhibited significantly larger oscillations, at times even
surpassing 20%. This indicates that LLM-based decision-making more closely
emulates real-world human choices, leading to easier attainment of equilibrium
in the consumer market. The unemployment rate generally varied between 2% and
12%, which aligns well with real-world economic activities
gatti2011macroeconomics . Both the nominal GDP and its growth rate also
fluctuated within more reasonable numerical bounds like the inflation rate
does. We also provide quarterly indicators in the supplementary materials.

[Inflation Rate] [Unemployment Rate] [Nominal GDP] [Nominal GDP Growth Rate]

Figure 2: Annual variations of macroeconomic indicators.

Macroeconomic regularities. As the two most commonly used regularities in
macroeconomic simulations for validating the plausibility of simulation
results, the Phillips Curve phelps1967phillips  and Okun’s Law
okun1963potential  respectively describe the negative correlations between the
annual unemployment rate and wage inflation, and the annual growth rate of
unemployment and real GDP growth. As shown in Figure 3, the decision-making of
agents based on the LLM has correctly manifested phenomena in accordance with
these two regularities (Pearson correlation coefficient is -0.619, $p<0.01$
and -0.918, $p<0.001$). Notably, the rule-based baseline method displayed an
incorrect positive relationship on the Phillips Curve. We attribute this
advantage to the LLM’s accurate perception that consumption should be reduced
when unemployed, a point which will be elaborated upon in the subsequent
section. Note that the Phillips Curve for AI-Eco is not shown due to the very
large unemployment rate.

Figure 3: Phillips Curve and Okun’s Law.

###  5.3 Decision-Making Abilities

Our experiments further zoomed into the LLM agent’s decision-making abilities,
spanning various economic actions.

####  5.3.1 Decision Rationality

Given that an agent’s decisions, including their propensities of working and
consumption, might be influenced by multiple economic variables such as income
and savings, we employ regression analysis to delve into the factors affecting
these decisions. Specifically, the regression equation is as follows:

$p^{w}_{i},p^{c}_{i}\sim v_{i}+\hat{c}_{i}+T(z_{i})+z^{r}+P+s_{i}+r,$ (14)

where $\hat{c}_{i},T(z_{i}),z^{r}$ denotes real consumption, the tax paid, and
redistribution in the previous month. These independent variables are embedded
in the LLM prompts to influence the agent’s decisions. We have conducted
individual regression analyses on all $N=100$ agents’ 240 decisions (spanning
20 years) after applying z-score normalization on all the variables and
tabulated the significance of the impact of each economic variable on their
decisions. Table 2 presents the number of agents for whom the effects of the
variables are statistically significant, i.e., $p\leq 0.05$. We observe that
1) the effects of taxation, redistribution, and expected monthly income on the
work propensity of the majority of agents were significant, 2) in comparison
to work propensity, the previous month’s consumption, current savings, and
bank interest rates significantly influence the consumption propensity of a
greater number of agents, and 3) goods price has a significant impact on both
work and consumption propensity for most agents. These phenomena are
consistent with economic common sense about how people make decisions in daily
life. Consequently, we delve further into analyzing how these economic
variables impact the propensity of working and consumption.

Table 2: The number of agents for whom the effects of the variables on decisions are statistically significant. | $v_{i}$ | $\hat{c}_{i}$ | $T(z_{i})$ | $z^{r}$ | $P$ | $s_{i}$ | $r$
---|---|---|---|---|---|---|---
$p^{w}_{i}$ | 60 | 37 | 60 | 65 | 58 | 56 | 31
$p^{c}_{i}$ | 65 | 73 | 51 | 52 | 62 | 100 | 49

Work propensity. Figure 4 presents the regression coefficients with respect to
the tax paid, redistribution (left), and expected monthly income (right,
empirical cumulative distribution function, (eCDF)), where $p\leq 0.05$.
Clearly, when agents paid less tax in the previous month or received greater
redistribution, their propensity to work increases. The overall negative
correlation between these two coefficients also suggests that agents sensitive
to taxation are equally responsive to redistribution when considering their
propensity to work. Besides, the coefficients of income are greater than zero
for more than 60% of agents, indicating that when agents anticipate a higher
income for the current month, their propensity to work also rises.

Figure 4: Rationality of the LLM agent’s work decisions in relation to the tax
paid, redistribution, and expected monthly income.

Consumption propensity. Figure 5 shows the coefficient eCDF of savings,
consumption in the previous month, and interest rate, as well as agents’ real
consumption $\hat{c}_{j}$ along with the simulation. We observe that with
greater savings, an agent’s consumption propensity decreases, represented as
the ratio of consumption to savings and income. Further inspection of average
consumption trends throughout the simulation reveals that agents tend to
stabilize their consumption within a consistent range. Moreover, although the
impact of consumption in the previous month is significant for more than 60%
of agents, the absolute value of the coefficient does not exceed 0.05. This
confirms that agents tend to not change consumption propensity when other
economic factors like savings remain stable, reflecting certain status quo
bias kahneman1991endowment . Fiscal policies also influence agents’
consumption decisions slightly. When interest rates increase, savings yield
greater returns, making agents more willing to spend.

Figure 5: Rationality of the LLM agent’s consumption decisions in relation to
current savings, consumption in the previous month, and interest rate.

The impact of goods price. As a key indicator reflecting the dynamics of the
consumption market, the impact of goods prices on agent decisions is a crucial
aspect of measuring decision-making rationality. Figure 6 presents the
coefficient eCDF. Compared to the coefficients associated with the
aforementioned factors, the coefficient of goods prices is noticeably larger,
indicating that agents pay much more attention to inflation or deflation in
the consumption market when making decisions. Moreover, during inflation,
around 60% agents tend to reduce consumption and work propensity, representing
a pessimistic view of the consumption market.

Figure 6: The impact of goods price on the LLM agent’s work and consumption
decisions.

####  5.3.2 Interactive Analysis

Through interactions with the model, we decipher the underlying reasons for
the emergence of negative correlations in the Phillips curve. We first
calculate the average consumption propensity across all the agents of two
years with the highest and lowest unemployment rates. Figure 7 shows the
comparison results, where *** denotes a significant disparity with $p<0.001$.
Obviously, high unemployment leads to low consumption propensity
significantly. To delve deeper into the reasons why agents opt to reduce
consumption in the labor market of high unemployment rates, we randomly select
an agent and input its conversations with LLM from the year with the highest
unemployment rate back into the LLM. We then prompt the LLM to summarize the
economic dynamics for each quarter and provide rationales for the consumption
decisions made. The following responses demonstrate that agents will be
cautious about their spending when facing deflation in the labor market under
a high unemployment rate.

In the last quarter, I have adjusted my willingness to work and my planned
expenditures on essential goods slightly downwards. This decision is primarily
influenced by the continued deflation in the labor market, resulting in a
decrease in my expected income. With a lower income, I need to be cautious
about my spending and ensure that I have enough savings for future expenses
and unforeseen circumstances…

Figure 7: High unemployment leads to low consumption propensity.

##  6 Conclusion and Future Works

In this study, we ventured into the novel integration of large language models
(LLMs) with macroeconomic simulation, designing LLM-empowered agents 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 AI
agents. Through this endeavor, it has become evident that the capabilities of
LLMs offer a promising avenue to simulate more realistic macroeconomics.

Moving forward, our vision for future work encompasses several promising
avenues. We see potential in the deeper integration of evolving LLMs with
reinforcement learning paradigms, enabling the agent to adaptively learn and
optimize within the macroeconomic simulation. The applicability of our methods
can be extended to other economic sectors and interdisciplinary subjects
intersecting with economics. Additionally, introducing multiple LLM-empowered
agents could offer insights into collaborative and competitive dynamics in a
shared environment. Moreover, paramount to our progression will be addressing
and mitigating any biases in LLMs, ensuring that our simulations remain
ethically sound and representative of diverse real-world scenarios. The
horizon of LLM-driven economic simulations, we believe, is vast and teeming
with transformative potential.

## References

  * (1) Kai Arulkumaran, Marc Peter Deisenroth, Miles Brundage, and Anil Anthony Bharath.  Deep reinforcement learning: A brief survey.  IEEE Signal Processing Magazine, 34(6):26–38, 2017.
  * (2) Robert L Axtell and J Doyne Farmer.  Agent-based modeling in economics and finance: Past, present, and future.  Journal of Economic Literature, 2022.
  * (3) Daniil A Boiko, Robert MacKnight, and Gabe Gomes.  Emergent autonomous scientific research capabilities of large language models.  arXiv preprint arXiv:2304.05332, 2023.
  * (4) Andres M Bran, Sam Cox, Andrew D White, and Philippe Schwaller.  Chemcrow: Augmenting large-language models with chemistry tools.  arXiv preprint arXiv:2304.05376, 2023.
  * (5) James Brand, Ayelet Israeli, and Donald Ngwe.  Using gpt for market research.  Available at SSRN 4395751, 2023.
  * (6) William A Brock and Cars H Hommes.  Heterogeneous beliefs and routes to chaos in a simple asset pricing model.  Journal of Economic dynamics and Control, 22(8-9):1235–1274, 1998\.
  * (7) Sébastien Bubeck, Varun Chandrasekaran, Ronen Eldan, Johannes Gehrke, Eric Horvitz, Ece Kamar, Peter Lee, Yin Tat Lee, Yuanzhi Li, Scott Lundberg, et al.  Sparks of artificial general intelligence: Early experiments with gpt-4.  arXiv preprint arXiv:2303.12712, 2023.
  * (8) Leland Bybee.  Surveying generative ai’s economic expectations.  arXiv preprint arXiv:2305.02823, 2023.
  * (9) Lawrence J Christiano, Martin Eichenbaum, and Charles L Evans.  Nominal rigidities and the dynamic effects of a shock to monetary policy.  Journal of political Economy, 113(1):1–45, 2005.
  * (10) Herbert Dawid and Domenico Delli Gatti.  Agent-based macroeconomics.  Handbook of computational economics, 4:63–156, 2018.
  * (11) Herbert Dawid, Simon Gemkow, Philipp Harting, Sander Van der Hoog, and Michael Neugart.  The eurace@ unibi model: An agent-based macroeconomic model for economic policy analysis.  2012\.
  * (12) Christophe Deissenberg, Sander Van Der Hoog, and Herbert Dawid.  Eurace: A massively parallel agent-based model of the european economy.  Applied mathematics and computation, 204(2):541–552, 2008.
  * (13) Giovanni Dosi, Giorgio Fagiolo, Mauro Napoletano, and Andrea Roventini.  Income distribution, credit and fiscal policies in an agent-based keynesian model.  Journal of Economic Dynamics and Control, 37(8):1598–1625, 2013\.
  * (14) Giovanni Dosi, Giorgio Fagiolo, Mauro Napoletano, Andrea Roventini, and Tania Treibich.  Fiscal and monetary policies in complex evolving economies.  Journal of Economic Dynamics and Control, 52:166–189, 2015.
  * (15) J Doyne Farmer and Duncan Foley.  The economy needs agent-based modelling.  Nature, 460(7256):685–686, 2009.
  * (16) Giorgio Franceschelli and Mirco Musolesi.  On the creativity of large language models.  arXiv preprint arXiv:2304.00008, 2023.
  * (17) Chen Gao, Xiaochong Lan, Zhihong Lu, Jinzhu Mao, Jinghua Piao, Huandong Wang, Depeng Jin, and Yong Li.  S3: Social-network simulation system with large language model-empowered agents.  arXiv preprint arXiv:2307.14984, 2023.
  * (18) Domenico Delli Gatti, Saul Desiderio, Edoardo Gaffeo, Pasquale Cirillo, and Mauro Gallegati.  Macroeconomics from the Bottom-up, volume 1.  Springer Science & Business Media, 2011.
  * (19) John Geanakoplos.  The leverage cycle.  NBER macroeconomics annual, 24(1):1–66, 2010.
  * (20) Nigel Gilbert and Klaus Troitzsch.  Simulation for the social scientist.  McGraw-Hill Education (UK), 2005.
  * (21) David F Hendry and Jean-Francois Richard.  On the formulation of empirical models in dynamic econometrics.  Journal of Econometrics, 20(1):3–33, 1982.
  * (22) John J Horton.  Large language models as simulated economic agents: What can we learn from homo silicus?  Technical report, National Bureau of Economic Research, 2023.
  * (23) Shi Jinxin, Zhao Jiabao, Wang Yilei, Wu Xingjiao, Li Jiawen, and He Liang.  Cgmi: Configurable general multi-agent interaction framework.  arXiv preprint arXiv:2308.12503, 2023.
  * (24) Dale W Jorgenson.  Information technology and the us economy.  American Economic Review, 91(1):1–32, 2001.
  * (25) Daniel Kahneman, Jack L Knetsch, Richard H Thaler, et al.  The endowment effect, loss aversion, and status quo bias.  Journal of Economic perspectives, 5(1):193–206, 1991.
  * (26) Grgur Kovač, Rémy Portelas, Peter Ford Dominey, and Pierre-Yves Oudeyer.  The socialai school: Insights from developmental psychology towards artificial socio-cultural agents.  arXiv preprint arXiv:2307.07871, 2023.
  * (27) Finn E Kydland and Edward C Prescott.  Time to build and aggregate fluctuations.  Econometrica: Journal of the Econometric Society, pages 1345–1370, 1982.
  * (28) Matthias Lengnick.  Agent-based macroeconomics: A baseline model.  Journal of Economic Behavior & Organization, 86:102–120, 2013\.
  * (29) Chao Li, Xing Su, Chao Fan, Haoying Han, Cong Xue, and Chunmo Zheng.  Quantifying the impact of large language models on collective opinion dynamics.  arXiv preprint arXiv:2308.03313, 2023.
  * (30) Siyu Li, Jin Yang, and Kui Zhao.  Are you in a masquerade? exploring the behavior and impact of large language model driven social bots in online social networks.  arXiv preprint arXiv:2307.10337, 2023.
  * (31) Jiaju Lin, Haoran Zhao, Aochi Zhang, Yiting Wu, Huqiuyue Ping, and Qin Chen.  Agentsims: An open-source sandbox for large language model evaluation.  arXiv preprint arXiv:2308.04026, 2023.
  * (32) Arthur M Okun.  Potential GNP: its measurement and significance.  Cowles Foundation for Research in Economics at Yale University, 1963.
  * (33) OpenAI.  Introducing chatgpt.  https://openai.com/blog/chatgpt, 2022.  (Accessed on 01/10/2023).
  * (34) Joon Sung Park, Joseph C O’Brien, Carrie J Cai, Meredith Ringel Morris, Percy Liang, and Michael S Bernstein.  Generative agents: Interactive simulacra of human behavior.  arXiv preprint arXiv:2304.03442, 2023.
  * (35) Joon Sung Park, Lindsay Popowski, Carrie Cai, Meredith Ringel Morris, Percy Liang, and Michael S Bernstein.  Social simulacra: Creating populated prototypes for social computing systems.  In Proceedings of the 35th Annual ACM Symposium on User Interface Software and Technology, pages 1–18, 2022.
  * (36) Edmund S Phelps.  Phillips curves, expectations of inflation and optimal unemployment over time.  Economica, pages 254–281, 1967.
  * (37) Chen Qian, Xin Cong, Cheng Yang, Weize Chen, Yusheng Su, Juyuan Xu, Zhiyuan Liu, and Maosong Sun.  Communicative agents for software development.  arXiv preprint arXiv:2307.07924, 2023.
  * (38) Timo Schick, Jane Dwivedi-Yu, Roberto Dessì, Roberta Raileanu, Maria Lomeli, Luke Zettlemoyer, Nicola Cancedda, and Thomas Scialom.  Toolformer: Language models can teach themselves to use tools.  arXiv preprint arXiv:2302.04761, 2023.
  * (39) Frank Schorfheide and Dongho Song.  Real-time forecasting with a mixed-frequency var.  Journal of Business & Economic Statistics, 33(3):366–380, 2015\.
  * (40) John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov.  Proximal policy optimization algorithms.  arXiv preprint arXiv:1707.06347, 2017.
  * (41) Rohan Taori, Ishaan Gulrajani, Tianyi Zhang, Yann Dubois, Xuechen Li, Carlos Guestrin, Percy Liang, and Tatsunori B. Hashimoto.  Stanford alpaca: An instruction-following llama model.  https://github.com/tatsu-lab/stanford_alpaca, 2023.
  * (42) AutoGPT Team.  Autogpt: the heart of the open-source agent ecosystem.  https://github.com/Significant-Gravitas/AutoGPT, 2022.  (Accessed on 01/10/2023).
  * (43) Leigh Tesfatsion and Kenneth L Judd.  Handbook of computational economics: agent-based computational economics.  Elsevier, 2006.
  * (44) Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, et al.  Llama: Open and efficient foundation language models.  arXiv preprint arXiv:2302.13971, 2023.
  * (45) Alexander Trott, Sunil Srinivasa, Douwe van der Wal, Sebastien Haneuse, and Stephan Zheng.  Building a foundation for data-driven, interpretable, and robust policy design using the ai economist.  arXiv preprint arXiv:2108.02904, 2021.
  * (46) Lei Wang, Chen Ma, Xueyang Feng, Zeyu Zhang, Hao Yang, Jingsen Zhang, Zhiyuan Chen, Jiakai Tang, Xu Chen, Yankai Lin, et al.  A survey on large language model based autonomous agents.  arXiv preprint arXiv:2308.11432, 2023.
  * (47) Sarah Wolf, Steffen Fürst, Antoine Mandel, Wiebke Lass, Daniel Lincke, Federico Pablo-Marti, and Carlo Jaeger.  A multi-agent model of several economic regions.  Environmental modelling & software, 44:25–43, 2013.
  * (48) Zhiheng Xi, Wenxiang Chen, Xin Guo, Wei He, Yiwen Ding, Boyang Hong, Ming Zhang, Junzhe Wang, Senjie Jin, Enyu Zhou, et al.  The rise and potential of large language model based agents: A survey.  arXiv preprint arXiv:2309.07864, 2023.
  * (49) Zhengyuan Yang, Linjie Li, Kevin Lin, Jianfeng Wang, Chung-Ching Lin, Zicheng Liu, and Lijuan Wang.  The dawn of lmms: Preliminary explorations with gpt-4v (ision).  arXiv preprint arXiv:2309.17421, 2023.
  * (50) Yoheinakajima.  Babyagi.  https://github.com/yoheinakajima/babyagi, 2023.  (Accessed on 01/10/2023).
  * (51) Aohan Zeng, Xiao Liu, Zhengxiao Du, Zihan Wang, Hanyu Lai, Ming Ding, Zhuoyi Yang, Yifan Xu, Wendi Zheng, Xiao Xia, et al.  Glm-130b: An open bilingual pre-trained model.  In The Eleventh International Conference on Learning Representations, 2023.
  * (52) Wayne Xin Zhao, Kun Zhou, Junyi Li, Tianyi Tang, Xiaolei Wang, Yupeng Hou, Yingqian Min, Beichen Zhang, Junjie Zhang, Zican Dong, et al.  A survey of large language models.  arXiv preprint arXiv:2303.18223, 2023.
  * (53) Stephan Zheng, Alexander Trott, Sunil Srinivasa, David C Parkes, and Richard Socher.  The ai economist: Taxation policy design via two-level deep multiagent reinforcement learning.  Science advances, 8(18):eabk2607, 2022.
  * (54) Deyao Zhu, Jun Chen, Xiaoqian Shen, Xiang Li, and Mohamed Elhoseiny.  Minigpt-4: Enhancing vision-language understanding with advanced large language models.  arXiv preprint arXiv:2304.10592, 2023.

##  Appendix A Appendix

###  A.1 LLM-empowered Agents

Agent profiles. The initialization of LLM agents’ profiles is shown in Figure
8, including age distribution (left) and monthly wage distribution (right), as
well as the tax brackets and rates of U.S. federal government in 2018,
represented by the gray dotted line. As for the generated jobs aligned with
the monthly wage, we show some examples as follows,

  * •

$[0,2454)$: Dog Walker, House Cleaner, Newspaper Delivery$\ldots$

  * •

$[2454,4838)$: Barista, Cashier, Fast Food Worker$\ldots$

  * •

$[35469,52370)$: Psychiatrist, Pediatrician, Anesthesiologist$\ldots$

Economic prompts. We provide a full prompt to illustrate our consideration of
economic principles, as well as other details not mentioned in the main text.

You’re Adam Mills, a 40-year-old individual living in New York City, New York.
As with all Americans, a portion of your monthly income is taxed by the
federal government. This taxation system is tiered, income is taxed
cumulatively within defined brackets, combined with a redistributive policy:
after collection, the government evenly redistributes the tax revenue back to
all citizens, irrespective of their earnings. Now it’s 2001.02. In the
previous month, you worked as a(an) Professional Athlete. If you continue
working this month, your expected income will be $84144.58, which is decreased
compared to the last month due to the deflation of the labor market. Besides,
your consumption was $49825.69. Your tax deduction amounted to $28216.98.
However, as part of the government’s redistribution program, you received a
credit of $6351.29. In this month, the government sets the brackets: [0.00,
808.33, 3289.58, 7016.67, 13393.75, 17008.33, 42525.00] and their
corresponding rates: [0.10, 0.12, 0.22, 0.24, 0.32, 0.35, 0.37]. Income earned
within each bracket is taxed only at that bracket’s rate. Meanwhile, deflation
has led to a price decrease in the consumption market, with the average price
of essential goods now at $135.82. Your current savings account balance is
$12456.42. Interest rates, as set by your bank, stand at 3.00%. With all these
factors in play, and considering aspects like your living costs, any future
aspirations, and the broader economic trends, how is your willingness to work
this month? Furthermore, how would you plan your expenditures on essential
goods, keeping in mind goods price? Please share your decisions in a JSON
format. The format should have two keys: ’work’ (a value between 0 and 1 with
intervals of 0.02, indicating the willingness or propensity to work) and
’consumption’ (a value between 0 and 1 with intervals of 0.02, indicating the
proportion of all your savings and income you intend to spend on essential
goods).

Figure 8: Age and monthly wage distribution for agent profiles.

###  A.2 Experiments

Baselines. For LEN, the calculation of consumption propensity is as follows,

$p_{i}^{c}=\left(\frac{P}{s_{i}+z_{i}}\right)^{\beta},\beta\in[0,1].$ (15)

For CATS, the calculation is as follows, i.e.,

$\frac{\hat{s}_{i}}{z_{i}}=\frac{(1+r)(s_{i}+(1-c)z_{i})}{z_{i}}=h,p_{i}^{c}=\frac{cz_{i}}{s_{i}+z_{i}},$
(16)

where $\hat{s}_{i}$ denotes the expected savings after consumption in the next
month, $h$ is a constant, and $c$ indicates the consumption proportion of the
current income. Refer to CATS for the calculation of $c$. Note that we
introduce the influence of the interest rate $r$ to endow the agent with the
perception of fiscal policy.

The work propensity is calculated as

$p^{w}_{i}=\left(\frac{v_{i}}{s_{i}(1+r)}\right)^{\gamma},\gamma\in[0,1].$
(17)

For AI-Economist, we modify the utility function to incorporate consumption
and goods price, defined as

$\frac{(s_{i}/P)^{1-\lambda_{s}}-1}{1-\lambda_{s}}\cdot\frac{(\hat{c}_{i}/P)^{1-\lambda_{c}}-1}{1-\lambda_{c}}-\lambda_{l}l_{i},$
(18)

where $\lambda_{s,c,l}$ balance the importance of savings, consumption, and
labor contributing to agent satisfaction. Besides, it’s discouraged to not
work or have no consumption at all, which leads to negative utility. We also
introduce the goods price to make the AI agent perceive the dynamics of the
consumption market.

Simulation parameters. For LEN, CATS, and Composite, we conduct careful grid
search for proper hyperparameters $\beta,\gamma,h$ in decision rules, with the
search spaces of $[0.05,0.1,0.3,0.5],[0.05,0.1,0.3,0.5]$, $[0.5,1,3,5]$,
respectively. The reported results in the main text are obtained with
$\beta=0.1,\gamma=0.1,h=1$, which show the most reasonable macroeconomic
indicators.

Additional results. Figure 10 presents quarterly macroeconomic indicators,
where the conclusion is similar to that of annual ones.

Figure 9: The training process of AI-Economist

For AI-Economist, we follow zheng2022ai  to adopt PPO algorithm
schulman2017proximal  to train the policy network, where the actor and critic
networks have the hidden dimensions of $[128,128]$ and $[128,64,32]$,
respectively. The observation (input) dimension is 173 and the action (output)
dimension is 53, including 2 work actions and 51 consumption actions (0-1 with
an interval of 0.02). The training process is shown in Figure 9, including the
loss and average episode reward, where one episode is a complete simulation of
20 years.

[Inflation Rate] [Unemployment Rate] [Nominal GDP] [Nominal GDP Growth Rate]

Figure 10: Quarterly variations of macroeconomic indicators.


# Costs of Regional Equity and Autarky in a Renewable European Power System

Fabian Neumann<EMAIL_ADDRESS>Institute for Automation and Applied
Informatics (IAI), Karlsruhe Institute of Technology (KIT), Hermann-von-
Helmholtz-Platz 1, 76344, Eggenstein-Leopoldshafen, Germany

###### Abstract

Social acceptance is a multifaceted consideration when planning future energy
systems, yet often challenging to address endogeneously. One key aspect
regards the spatial distribution of investments. Here, I evaluate the cost
impact and changes in optimal system composition when development of
infrastructure is more evenly shared among countries and regions in a fully
renewable European power system. I deliberately deviate from the resource-
induced cost optimum towards more equitable and self-sufficient solutions in
terms of power generation. The analysis employs the open optimisation model
PyPSA-Eur. I show that cost optimal solutions lead to very inhomogenous
distributions of assets, but more uniform expansion plans can be achieved on a
national level at little additional expense below 4%. Yet completely autarkic
solutions, without power transmission, appear much more costly.

###### keywords:

energy system modelling, distributional equity, energy justice, autarky,
renewables, decentralised systems

††journal: N/A

##  1 Introduction

(i) Imbalances in 2018 according to ENTSO-E [1]
(ii) Imbalances in optimised fully renewable system
(GR=308%, NL=360%, DK=874%)

Figure 1: Imbalances today and in optimised renewable system.

Optimising for a renewable power system was observed to entail a very
heterogenous distribution of electricity generation in relation to demand when
compared to national imbalances reported by ENTSO-E for 2018 (Figure 1) [1].
The system is dominated by many distinct net importers and exporters, whereas
few supply just their own demand. This raises concerns about distributional
equity.

Blindly following the cost optimum risks inequitable outcomes and public
headwind, bearing the potential of decelerating the energy transition.
Particularly wind farms and transmission lines spark local opposition, which
was found to be best counteracted by including the public in the planning
process and by sharing profits [2]. Vice versa, also the absence of
investments may have a detrimental impact on local communities.

Beyond the spatial distribution of generation investments, numerous other
dimensions of energy justice and equity principles exist [3]. Equity metrics
can also relate to temporal, income, racial, labor and environmental aspects
[4, 5, 6], and perceptions of fairness vary among stakeholders [7, 8]. Recent
developments of pan-continental models with growing sub-national detail raise
the need for recognising their regional implications [9, 6]. However, aspects
of fairness are challenging to assess in endogenous modelling and analyses
have so far been limited to ex-post analysis [6]. Enhanced collaboration
between social scientists and energy modellers has been encouraged [10].

Moreover, there is a trend towards discussing energy autarky, i.e. the ability
to operate regions partially or completely independently [11, 12]. Positive
associations with autonomy, control and independence drive aspirations for
self-sufficiency for individuals and municipalities alike, and result in a
higher willingness to pay and greater support for projects [13, 14, 15, 12].
The debate also evolves around the resilience of more decentralised systems
[16]. The primary resource-based feasibility of autarkic systems on different
spatial levels was evaluated in Tröndle et al. [17]. High population density
was found to sometimes be a limiting factor for small autarkic systems.
Weinand et al. found that about half of the 6000 municipalities in Germany
have sufficient potentials to become off-grid municipalities [18].

Further related work has assessed the benefit of transmission capacities
between countries [19] and more heterogeneous distributions of generation
assets [20]. It has moreover been evaluated what range of similarly costly but
possibly more socially acceptable power systems can be realised [21] and what
costs are incurred by reducing eligible potentials [22]. Previous work on
distributional equity regarding power generation has however covered only a
single country and neglected the variability of renewable generation and
demand, as well as the interaction between storage and transmission
infrastructure [23, 3]. A cost assessment of regional autarkic systems in
Europe compared to the least-cost system does not appear to exist yet.

In this contribution, I remedy the concerns about spatial scope and temporal
resolution and explore at what cost more evenly distributed, or even autarkic,
power supply could be achieved in Europe, regarding both countries and smaller
regions.

(i) National Requirements | (ii) Nodal Requirements
---|---
Figure 2: Lorenz curves for different equity requirements relating the
cumulative share of electricity generation to the cumulative share of demand
in the 200 regions of the European power system model.

##  2 Model Setup

I use the open European transmission system model PyPSA-Eur with 200 nodes and
4380 snapshots, one for every two hours in a year [24]. I solve a long-term
power system planning problem which seeks to minimise the total annual system
costs comprising generation, transmission and storage infrastructure in a
fully renewable system. The objective is subject to linear constraints that
define limits on (i) the capacities of infrastructure from geographical and
technical potentials, (ii) the availability of variable renewable energy
sources for each location and point in time derived from reanalysis weather
data, and (iii) linearised multi-period optimal power flow (LOPF) constraints
including storage consistency equations.

I add constraints for each country or node to produce on average at least a
given share of their annual consumption; i.e. I explore the sensitivity of
increasing production equity requirements. The extreme cases are (i) every
country or node produces as much as required for the cost-optimal system using
the most productive locations (0%) and (ii) every country or node produces as
much as they consume (100%). The experiments interpolate between the extremes
in steps of 10%.

I further extend this setup by two experiments regarding absolute autarky: (i)
one where there is no cross-border transmission of power between countries but
which includes the intranational transmission grid, and (ii) one where each
node fully supplies its own power demand at any time in isolation. The code to
reproduce all results is available at github.com/fneum/equity-and-autarky.

##  3 Results and Discussion

Figure 3: National annual investment relative to annual demand when every
country produces as much as they consume (100%).
Figure 4: Total system cost impact of autarky on national and nodal levels
compared to optimal solution and maximal equity constraints.

The discussion of results employs system costs, the technology mix, as well as
the distribution of power system infrastructure investments as evaluation
criteria, both regarding equity and autarky considerations.

Figure 5: Sensitivity of system cost and composition to nodal and country-wide
equity requirements.

Foremost, Figure 5 displays the sensitivity of system costs towards nodal and
country-wide equity requirements. Similar graphics were produced regarding the
amount of cross-border transmission capacities by Schlachtberger et al. [19].
National equity constraints cause a limited rise in total system cost. The
cost increase by less than 4% when every country produces as much as they
consume; and by less than 2% when each produces at least 80%. They entail less
grid reinforcement and some more solar installations. Conversely, the cost
sensitivity is considerably higher for nodal equity constraints. When every
node on average produces all they consume, costs inflate by 18%; and already
at equity levels of 50% costs increase by 5%. Note, that the sensitivity is
nonlinear. Nodal requirements shift expansion plans towards onshore wind,
solar and hydrogen storage, while reducing network expansion and offshore wind
capacities. This confirms but also extends on a finding by Sasse et al. [3]:
indeed solar contributes to regional equity, but also onshore wind does. This
is ambivalent since onshore wind is susceptible to local opposition.

The maps of optimal system capacities in Figure 6 show less but still
substantial amounts of transmission expansion in the case of nodal equity.
Compared to the unrestricted optimal solution, the deployment of solar panels
progresses northbound and onshore wind capacities spread in Northern and
Eastern Europe. Moreover, storage infrastructure distributes more evenly.

Figure 2 depicts Lorenz curves as equity measures for different equity
constraints (cf. [3]). They relate the cumulative share of electricity
generation to the cumulative share of demand in the 200 regions of the model.
The Lorenz curve is on the identity line if annual sums of generation and load
are equal at each node. While nodal equity requirements by definition lift the
Lorentz curve, national requirements maintains an unequal distribution of
infrastructure within each country.

According to Li et al. [9], winners are those who receive high per-capita
investments. Results show that, when every country balances generation and
load on average, the national annual investments relative to demand are more
evenly distributed, ranging between 40 and 100 €/MWh (Figure 3). Generation
infrastructure dominates investments followed by storage and transmission. The
absence of extreme winners and losers is favourable.

(i) Optimum (No Requirements)
(ii) National Balance (100%)
(iii) Nodal Balance (100%)

Figure 6: Maps of optimal system capacities for different equity requirements.

While even nodal production equity raises costs only to a limited extent below
20%, absolute autarky is significantly more costly already on a national
level. Figure 4 shows that eliminating cross-border transmission capacities
(i.e. no trade of power between countries) adds costs beyond 40%. Costs rise
even more when each of the 200 regions is fully self-sufficient. With an
additional 85%, costs almost doubled compared to the least-cost solution.

One critical factor concerns the land use requirements for solar in the nodal
autarky scenario. Assuming an even split between utility and rooftop PV,
results reveal that no region uses more than 3% of its area for utility PV and
only one in ten regions uses more than 1%. It further needs to be noted that
hydrogen storage in salt caverns, as the cheaper alternative to steel tanks if
the geological conditions admit it, was neglected. In future work, the autarky
analysis should be repeated for a fully sector-coupled energy system which
includes transport options for chemical energy carriers.

##  4 Conclusion

It is possible to strike a balance between cost-efficiency and fair
distribution of investments at little additional expense. Aligning annual
generation and consumption per country costs less than 4% more; per node the
costs increase by 18%. National balancing however retains inhomogenous
distributions within the countries. Finally, even when each node produces as
much as they consume, power is still extensively transmitted and regions are
not self-sufficient. True autarky solutions without power transmission are in
relation substantially more expensive. Knowledge about the observed degree of
freedom is important considering that more even investment per region can lead
to better political feasibility, quicker implementation, and higher social
acceptance.

## Acknowledgements

F.N. acknowledges funding from the Helmholtz Association under grant no. VH-
NG-1352. The responsibility for the contents lies solely with the author.

## References

  * [1] Statistical Factsheet 2018, Tech. rep., ENTSO-E.
URL https://www.entsoe.eu/publications/statistics-and-data/#statistical-
factsheet

  * [2] J. J. Cohen, J. Reichl, M. Schmidthaler, Re-focussing research efforts on the public acceptance of energy infrastructure: A critical review, Energy 76 (2014) 4–9.  doi:10/f6pw36.
  * [3] J.-P. Sasse, E. Trutnevyte, Distributional trade-offs between regionally equitable and cost-efficient allocation of renewable electricity generation, Applied Energy 254 (2019) 113724.  doi:10/gf69s8.
  * [4] K. Jenkins, D. McCauley, R. Heffron, H. Stephan, R. Rehner, Energy justice: A conceptual review, Energy Research & Social Science 11 (2016) 174–182.  doi:10/gftt5d.
  * [5] E. N. Mayfield, J. L. Cohon, N. Z. Muller, I. M. L. Azevedo, A. L. Robinson, Quantifying the social equity state of an energy system: environmental and labor market equity of the shale gas boom in Appalachia, Environmental Research Letters 14 (12) (2019) 124072.  doi:10/gghf65.
  * [6] M. J. Fell, S. Pye, I. Hamilton, Capturing the distributional impacts of long-term low-carbon transitions, Environmental Innovation and Societal Transitions 35 (2020) 346–356.  doi:10/ggzhnk.
  * [7] S. Batel, P. Devine-Wright, T. Tangeland, Social acceptance of low carbon energy and associated infrastructures: A critical discussion, Energy Policy 58 (2013) 1–5.  doi:10/f4zsr3.
  * [8] P. Lehmann, K. Ammermann, E. Gawel, C. Geiger, J. Hauck, J. Heilmann, J.-N. Meier, J. Ponitka, S. Schicketanz, B. Stemmer, P. Tafarte, D. Thrän, E. Wolfram, Managing spatial sustainability trade-offs: The case of wind power, UFZ Discussion Papers (May 2020).
URL https://EconPapers.repec.org/RePEc:zbw:ufzdps:42020

  * [9] F. G. Li, S. Pye, N. Strachan, Regional winners and losers in future UK energy system transitions, Energy Strategy Reviews 13-14 (2016) 11–31.  doi:10/gg3dxp.
  * [10] E. Trutnevyte, L. F. Hirt, N. Bauer, A. Cherp, A. Hawkes, O. Y. Edelenbosch, S. Pedde, D. P. van Vuuren, Societal Transformations in Models for Energy and Climate Policy: The Ambitious Next Step, One Earth 1 (4) (2019) 423–433.  doi:10/ggfvzr.
  * [11] J. Schmidt, M. Schönhart, M. Biberacher, T. Guggenberger, S. Hausl, G. Kalt, S. Leduc, I. Schardinger, E. Schmid, Regional energy autarky: Potentials, costs and consequences for an Austrian region, Energy Policy 47 (2012) 211–221.  doi:10/f35m37.
  * [12] M. Engelken, B. Römer, M. Drescher, I. Welpe, Transforming the energy system: Why municipalities strive for energy self-sufficiency, Energy Policy 98 (2016) 365–377.  doi:10/f9bmw3.
  * [13] M. O. Müller, A. Stämpfli, U. Dold, T. Hammer, Energy autarky: A conceptual framework for sustainable regional development, Energy Policy 39 (10) (2011) 5800–5810.  doi:10/d5f6zz.
  * [14] F. Ecker, U. J. J. Hahnel, H. Spada, Promoting Decentralized Sustainable Energy Systems in Different Supply Scenarios: The Role of Autarky Aspiration, Frontiers in Energy Research 5 (2017) 14.  doi:10/gg3m9w.
  * [15] C. Rae, F. Bradley, Energy autonomy in sustainable communities—A review of key issues, Renewable and Sustainable Energy Reviews 16 (9) (2012) 6497–6506.  doi:10/f4jwnq.
  * [16] M. Panteli, P. Mancarella, The Grid: Stronger, Bigger, Smarter?: Presenting a Conceptual Framework of Power System Resilience, IEEE Power and Energy Magazine 13 (3) (2015) 58–66.  doi:10/gfvdfn.
  * [17] T. Tröndle, S. Pfenninger, J. Lilliestam, Home-made or imported: On the possibility for renewable electricity autarky on all scales in Europe, Energy Strategy Reviews 26 (2019) 100388.  doi:10/gf69s7.
  * [18] J. M. Weinand, S. Ried, M. Kleinebrahm, R. McKenna, W. Fichtner, Identification of potential off-grid municipalities with 100% renewable energy supply, Working Paper Series in Production and Energy 40 (2020).  doi:10/d3xm.
  * [19] D. P. Schlachtberger, T. Brown, S. Schramm, M. Greiner, The Benefits of Cooperation in a Highly Renewable European Electricity Network, Energy 134 (2017) 469–481.  doi:10/gbvgcf.
  * [20] E. H. Eriksen, L. J. Schwenk-Nebbe, B. Tranberg, T. Brown, M. Greiner, Optimal heterogeneity in a simplified highly renewable European electricity system, Energy 133 (2017) 913–928, arXiv: 1706.00463.  doi:10/gbwppw.
  * [21] F. Neumann, T. Brown, The near-optimal feasible space of a renewable power system model, 21st Power Systems Computation Conference 2020 (2019).
URL https://arxiv.org/abs/1910.01891

  * [22] S. Bolwig, T. F. Bolkesjø, A. Klitkou, P. D. Lund, C. Bergaentzlé, K. Borch, O. J. Olsen, J. G. Kirkerud, Y.-k. Chen, P. A. Gunkel, K. Skytte, Climate-friendly but socially rejected energy-transition pathways: The integration of techno-economic and socio-technical approaches in the Nordic-Baltic region, Energy Research & Social Science 67 (2020) 101559.  doi:10/ggvc9v.
  * [23] M. Drechsler, J. Egerer, M. Lange, F. Masurowski, J. Meyerhoff, M. Oehlmann, Efficient and equitable spatial allocation of renewable power plants at the country scale, Nature Energy 2 (9) (2017) 17124.  doi:10/gf75zb.
  * [24] J. Hörsch, F. Hofmann, D. Schlachtberger, T. Brown, PyPSA-Eur: An open optimisation model of the European transmission system, Energy Strategy Reviews 22 (2018) 207–215, arXiv: 1806.01613.  doi:10/d294.