Agent-based modeling (ABM) offers powerful insights into complex systems, but its practical utility has been limited by computational constraints and simplistic agent behaviors, especially when simulating large populations. Recent advancements in large language models (LLMs) could enhance ABMs with adaptive agents, but their integration into large-scale simulations remains challenging. This work introduces a novel methodology that bridges this gap by efficiently integrating LLMs into ABMs, enabling the simulation of millions of adaptive agents. We present LLM archetypes, a technique that balances behavioral complexity with computational efficiency, allowing for nuanced agent behavior in large-scale simulations. Our analysis explores the crucial trade-off between simulation scale and individual agent expressiveness, comparing different agent architectures ranging from simple heuristic-based agents to fully adaptive LLM-powered agents. We demonstrate the real-world applicability of our approach through a case study of the COVID-19 pandemic, simulating 8.4 million agents representing New York City and capturing the intricate interplay between health behaviors and economic outcomes. Our method significantly enhances ABM capabilities for predictive and counterfactual analyses, addressing limitations of historical data in policy design. By implementing these advances in an open-source framework, we facilitate the adoption of LLM archetypes across diverse ABM applications. Our results show that LLM archetypes can markedly improve the realism and utility of large-scale ABMs while maintaining computational feasibility, opening new avenues for modeling complex societal challenges and informing data-driven policy decisions.
翻译:基于代理的建模(ABM)为复杂系统提供了强大的洞察力,但其实际应用一直受限于计算约束和过于简化的代理行为,尤其是在模拟大规模群体时。大型语言模型(LLM)的最新进展有望通过自适应代理增强ABM,但将其整合到大规模模拟中仍然面临挑战。本研究提出了一种新颖的方法论,通过高效地将LLM集成到ABM中来弥合这一差距,从而实现数百万自适应代理的模拟。我们提出了LLM原型技术,该技术在行为复杂性与计算效率之间取得平衡,使得大规模模拟中能够呈现细腻的代理行为。我们的分析探讨了模拟规模与个体代理表现力之间的关键权衡,比较了从简单的基于启发式的代理到完全自适应的LLM驱动代理等不同代理架构。我们通过对COVID-19大流行的案例研究展示了该方法的实际适用性,模拟了代表纽约市的840万个代理,并捕捉了健康行为与经济结果之间复杂的相互作用。我们的方法显著增强了ABM在预测性和反事实分析方面的能力,解决了政策设计中历史数据的局限性。通过在开源框架中实现这些进展,我们促进了LLM原型技术在各种ABM应用中的采用。研究结果表明,LLM原型能够在保持计算可行性的同时,显著提升大规模ABM的真实性和实用性,为建模复杂的社会挑战和制定数据驱动的政策决策开辟了新途径。