arXiv(opens in a new tab)physics.soc-phAug 2026

Manuscript Offprint

arXiv:2608.26221

Prompt Sensitivity of Generative Agents: Evidence from an Epidemic Model

Ross Williams, Niyousha Hosseinichimeh

Abstract

As generative AI gains traction, researchers are investigating its potential to serve as proxies for humans. From undergoing cognitive psychology experiments to experiencing an epidemic, generative agents, agents powered by generative AI models, produce realistic human behavior when prompted. This study explores the sensitivity of these generative agents' behavior to prompt modifications and varied persona names of the agents. To assess this sensitivity, we use a generative agent epidemic model, wherein each agent is prompted daily on whether it wants to isolate or commingle with other agents. We found that using synonymous prompts results in negligible changes to the model's outcomes. However, minor variations in prompts, as well as contextual changes, do influence the model's results. Lastly, our data indicates that different persona names assigned to generative agents, specifically those imbued with personas, do not significantly impact epidemic outcomes.

One-Sentence Summary: In an epidemic model, generative agents exhibit behavior that is insensitive to synonymous prompt and persona name modifications but have behavior that is sensitive to slight and contextual prompt modifications.

Keywords: Prompt Sensitivity, Generative Artificial Intelligence, Large Language Models, Agent Based Model, Generative Agent Based Model, Computational Social Science, ChatGPT, Sensitivity Analysis, LLM-based agents

1. Introduction

Over the past year, the study of generative artificial intelligence (AI) has seen significant advances (26). Generative AI refers to AI models that can create content such as text, images, videos, and music in response to user prompts. Since these models are trained on massive amounts of human-generated data (5), social scientists have explored their ability to roleplay as a representative proxy for human behavior.

From exploring tacit collusion (1) to creating more humanistic thinking chatbots (2-8), the possibilities of modeling human behavior using agents powered by large language models (LLM) seems increasingly likely (9). A generative agent is an entity that uses LLMs to personify itself and simulate realistic human behavior (2). To interact with the generative agent, the author feeds text prompts as inputs to the LLM (1, 2, 10–12). The LLM then proceeds to generate text responses as outputs (5). In some applications of generative AI, the survey-like experiment ends there, and the output responses are analyzed (13, 14, 18–20). For other experiments, researchers have conducted dynamic experiments with generative agents on social science models such as information diffusion (2) and epidemic models (10) to test their believability as proxies for human behavior.

For the information diffusion model, generative agents are placed in a virtual, pixelated world to go about their daily lives (2, 26). In this seminal paper, generative agents have names and traits; together, the agents make up a small-town named Smallville. In this community, an agent can interact with other agents, the environment, and even itself. The agent recalls its actions and conversations through a memory architecture, which in turn helps the agent plan and act in future time steps (15). To test information diffusion in this simulation, the authors implanted a thought in a single agent of throwing a Valentine’s Day party. With time, the agent—as well as other invited guests—spread the word of the Valentine’s Day party, resulting in many agents attending the event.

While the information diffusion model is a proof-of-concept that generative agents can operate in social-science experiments, the epidemic model quantitatively studies an epidemic in Dewberry Hollow, a virtual town full of generative agents (10). Here, agents are informed daily about their own health as well as the fictional virus spreading within their community. Feeding this information in the form of a prompt to ChatGPT, these agents, personified with the Big Five traits, make decisions on whether they want to isolate or commingle. These individuals' decisions exhibited heterogeneous risk-tolerances, and collectively, their behavior creates multiple waves of an epidemic.

Other dynamic models incorporating generative agents have also begun to emerge. In some game theory applications, generative agents compete against each other in the Prisoner’s Dilemma (11, 12) as well as the Battle of the Sexes (11). For the study of social networks, researchers have agents dynamically react to each other’s posts and comments in a Reddit-like setting (16). Like the Reddit paper, another model named S3S^{3} creates a social-network as well as realistic human-personas from data-sources (17). Furthermore, they calibrate the agent-to-agent social media interactions to replicate information diffusion found on social media for two events: the Japan Nuclear Waste Water Release Event and the Chained Eight-child Mother event.

Regardless of whether the generative agent application is static or dynamic, all these models lack one thing: robust sensitivity analysis. As LLMs have grown in popularity, concerns about their sensitivity to text-input have emerged (21, 22). However, according to Wang et al.'s comprehensive literature review of generative agents, there is no unified way to prompt LLMs nor to conduct prompt sensitivity analysis (15). Compared to traditional sensitivity analysis, generative agent sensitivity analysis must have prompt sensitivity analysis in addition to regular parameter sensitivity analysis. Prompt sensitivity analysis has a significantly larger dimensional space due to the infinite possibilities of linguistic expression that can convey the same meaning. Given that LLMs are designed to predict the next word in a sequence, it is critical that variations in prompts do not drastically change the generative agent's behavior. Concerns about sensitivity of prompt modifications stem from researchers post-processing LLM text outputs to determine the decision the generative agent shall take (2, 10, 16, 17); hence, if a minor prompt change impacts the agent decision, the results from the model would not be robust. Therefore, it is vital to assess the sensitivity of these LLMs to different input prompts to understand how it influences the generative agents' behavioral response.

This paper is a step toward generative agent sensitivity analysis. As it is impossible to explore the entire prompt sensitivity space for an LLM, we will use the generative agent epidemic model as an example model to test prompt sensitivity analysis (10). This model was selected amongst other generative agent models for two distinct reasons. First, this model has a mostly non-changing vignette-style prompt fed into a LLM each time step for each agent. Comparatively, some models, like the Valentine's Day information diffusion model, have generative agents with memory architecture, which in turn creates more input prompt variability (1, 2, 16, 17). Therefore, the epidemic model prompt helps reduce the potential amount of prompt dimensionality juxtaposed with other models. Secondly, the epidemic model has an easy to measure impact from the prompt: the resulting mobility curve. Mobility curves (seen in Figure 2 and Figure 3) compare the mobility of people at the current time step to the percent of new active case infections that happened the previous time step. If the prompt is sensitive to alterations, then the resulting mobility curve will have a different shape as well as values. To comprehensively analyze the robustness of the prompt (10), three types of prompt sensitivity analysis will be conducted: semantic variation sensitivity, contextual shift sensitivity, and persona name sensitivity.

Semantic variation sensitivity analysis modifies parts of the prompt by substituting them with terms or phrases that are similar semantically to assess any resulting changes in the LLM’s response. When using synonymous phrases in prompts (e.g., “knows about” and “is aware of”), we hypothesize that the agent’s behavior will not change; thereby, not altering the mobility curve. In contrast, we hypothesize that using nonsynonymous phrasing (e.g., “knows” and “learns”) will result in different agent behavior.

Contextual shift sensitivity analysis involves altering the scenario the generative agent faces by modifying the prompt. To test the epidemic model’s contextual shift sensitivity, we examine if agents, facing less fiscal pressure, react differently compared to the baseline prompt. We hypothesize that the resulting agent’s behavior will change as the agents confront a different scenario.

Lastly, for persona name sensitivity analysis, generative agents’ names are substituted for other names to evaluate the differences in the LLM’s response based on name change (e.g. “Betty” versus “Jamal”). A major concern that researchers have when leveraging AI models is perpetuating racial and sex biases (23). In 2015, Amazon shut down its recruiting AI tool as it was found to be biased against women (24). Similarly, in 2020, Google apologized for its Vision AI model mislabeling objects as guns held by darker-skinned individuals, while identifying them as different objects for lighter-skinned individuals (25). Hence, it is vital to ensure LLMs are not biased by generative agents’ names: names which may subtly hint at sex and race. We hypothesize that when generative agents have personality traits, such as the Big Five personality traits, their names are not a significant factor. The logic is that human-traits will be the primary driver of how the generative agent acts versus that of their name.

Through several experiments, we present compelling evidence and statistically significant results. For semantic variation sensitivity analysis, we find that synonymous phrasing produces no statistically significant deviations from the baseline. For nonsynonymous phrasing, statistically significant deviations were noted. Similarly, our contextual shift sensitivity analysis showed a statistically significant different mobility curve than the baseline. Lastly, all tests conducted for name sensitivity analysis resulted in no statistically significant deviation from the baseline results.

References (26)