G en S im: A General Social Simulation Platform with Large Language Model based Agents (2025)

Abstract: With the rapid advancement of large language models (LLMs), recent years have witnessed many promising studies on leveraging LLM-based agents to simulate human social behavior. While prior work has demonstrated significant potential across various domains, much of it has focused on specific scenarios involving a limited number of agents and has lacked the ability to adapt when errors occur during simulation. To overcome these limitations, we propose a novel LLM-agent-based simulation platform called GenSim, which: (1) Abstracts a set of general functions to simplify the simulation of customized social scenarios; (2) Supports one hundred thousand agents to better simulate large-scale populations in real-world contexts; (3) Incorporates error-correction mechanisms to ensure more reliable and long-term simulations. To evaluate our platform, we assess both the efficiency of large-scale agent simulations and the effectiveness of the error-correction mechanisms. To our knowledge, GenSim represents an initial step toward a general, large-scale, and correctable social simulation platform based on LLM agents, promising to further advance the field of social science.

## introduction social science, which focuses on human behavior, communication, and organization, is playing an increasingly significant role as world civilization advances. one important research paradigm in social science is collecting real human data. for instance, to study the effectiveness of positive psychology interventions, @xcite recruited over 6,000 participants to observe their responses to controlled experiments. while the paradigm of collecting real human data is widespread in social science research, it suffers from significant drawbacks, such as high cost, poor controllability, and challenges in reproducibility, which have troubled researchers for a long time. in the field of artificial intelligence (ai), researchers have discovered that language serves as a crucial carrier of intelligence @xcite , and the objective of "next-token prediction" using a massive training corpus (i.e., large language models, llms) has the potential to achieve humanlike intelligence. with the advent of these highintelligence models, a new "ai for social science" direction has emerged: leveraging llms as proxies for real humans to conduct social science experiments @xcite . this approach provides the opportunities to fundamentally address the above challenges faced by social science research, potentially paving the way for an entirely new research paradigm. for instance, generative agents @xcite leverages 25 agents to simulate human daily life, and finds that these agents can autonomously host parties and conduct mayoral election. recagent @xcite ) simulates user online behaviors, and studies the phenomenons of information cocoon and conformity behaviors. econagent @xcite studies the macroeconomic behaviors using llm-based agents in the context of dynamic markets. while the above methods have shown promising results, they are primarily limited to specific scenarios and small-scale simulations. moreover, when discrepancies arise between simulated behaviors and those observed in the real world, existing methods lack effective error-correction mechanisms. to address these limitations, we introduce gensim, a general social simulation platform based on llm agents. in specific, to avoid reinventing the wheel in simulating various social scenarios, we propose a general programming framework composed of three key modules on single-agent construction, multi-agent scheduling, and environment setup. additionally, we provide three default scenarios as references to help users quickly implement their customized simulations. to achieve large-scale simulations in real-world scenarios, we leverage distributed parallel technology to support one hundred thousands of agents in our platform. finally, we design several error-correction mechanisms, allowing the platform to first perform self-evaluation or seek human feedback, and then fine-tune itself to ensure more reliable simulation. the comparison between our framework and the previous work can be seen in figure 1. in summary, the main contributions of this paper are as follows: (1) we propose a general, largescale and correctable social simulation platform based on llm agents. (2) we provide detailed usage examples to illustrate the capabilities of our platform. (3) we conduct a series of experiments to evaluate the platform's effectiveness and efficiency. ## features of gensim there are several unique features of our platform. to begin with, we abstract a set of general functions to facilitate any customized simulation scenario according to the users' requirements. then, our platform supports one hundred thousand agents to better simulate large-scale populations in realworld contexts. at last, we provide a series of error-correction mechanisms to ensure more reliable simulation. the first two can be seen as static features from the generality and scalability perspectives, respectively, while the last one extends previous work from the dynamic perspective, mak-ing sure our platform can continually correct and improve itself. ## usages of gensim in this section, we introduce the basic methods for running a default scenario. for more details, readers can refer to a short live demonstration of our platform on youtube https://www.youtube. com/watch?@xmath0. the complete interfaces of our platform are presented in figure 5 . in specific, the user needs to click the 'get started' button to initiate our platform. the user can then configure the simulation by specifying scenarios, agent profile, memory type, number of agents, llm parameters, etc. once configured, the platform can be launched. the simulation interface consists of three sections: at the top, there is a search box that allows the user to search for an agent to observe its status and track its behavior. in the middle, there is a display window where the behaviors of multiple agents are shown. on the right, there is a functionality window where users can view agent profiles, intervene in the system, and interact with agents. after running the platform for several rounds, the user can stop the simulation and label the results. finally, the backbone llms can be fine-tuned based on the labeled results and used in the subsequent simulation. ## conclusions in this paper, we introduce a general, large-scale, and correctable social simulation platform based on llm agents. this is the initial version of our platform, we believe there is still much room left for improvement. in the future, we plan to incorporate more advanced simulation accelerating strategies, and develop more adaptive self-correction mechanisms to improve the simulation performance.