GeoBridge

LLM辅助工作流助力基于智能体模型复现

GeoAI · 空间智能4 阅读原文发布 2026/10/26编译收录 2026/10/31

复现是科学可信度的基石,但在基于智能体建模(ABM)领域,由于跨平台重新实现模型需要大量时间、精力与技术专长,复现实践仍不普遍。近日,一项研究探索了大型语言模型(LLM)能否降低这些障碍,支持ABM的复现。研究者提出了两种LLM辅助工作流,并在Python的Mesa框架中复现了三个模型,验证了LLM在辅助模型复现方面的显著潜力。 研究者协调型工作流将LLM分为两个角色:一个负责规划与评估,另一个负责源代码实现。规划与评估LLM检查源材料,将整体复现与验证任务分解为阶段,指定验收标准(例如复现模型是否与原模型具有相同的空间配置),并基于这些标准评估已完成的工作。实现LLM则将每个阶段转化为目标源代码,并处理评估发现的问题。人类研究者监督整个过程,并裁决模糊之处(例如原模型与复现模型之间的差异)。两个LLM的中间输出(如任务列表、进度日志、发现和设计决策)均以书面记录形式保存在单独文件中。

技能辅助工作流则结合了可重用的提示策略与基于LLM的协调过程。该方法旨在通过预定义的技能(如代码生成、测试、调试等)和协调机制,更自动化地完成复现任务。两种工作流各有侧重,研究者协调型更依赖人类监督,而技能辅助型则更注重自动化与可重用性。 研究团队使用这些工作流在Mesa框架中复现了三个模型。验证采用了适用于每个模型的结构、行为、视觉和统计比较。在所有三个案例中,Mesa实现均再现了原始工作中报告的关键机制、关系和涌现模式。在源代码和统计结果可用的情况下,复现输出与原始实现 closely matched。这表明LLM能够从不同级别的源材料中大幅协助模型复现。

例如,在复现Ya-TASERPS模型时,研究者协调型工作流通过分工协作,成功完成了复现任务。规划与评估LLM将复现任务分解为多个阶段,并设定了明确的验收标准,实现LLM则根据这些标准生成代码。人类研究者负责监督和裁决歧义,确保复现的准确性。中间输出记录为后续分析提供了详细轨迹。

技能辅助工作流则通过可重用的提示策略和LLM协调过程,进一步提升了复现的自动化程度。该方法将复现任务分解为一系列技能,如代码生成、测试和调试,并通过LLM协调这些技能的执行。这种工作流减少了对人类干预的依赖,同时保持了复现的可靠性。

研究结果表明,LLM辅助工作流能够显著提升ABM社区的可重复性、透明度和知识转移。通过降低复现的技术门槛,LLM有望促进更广泛的模型验证和科学合作。作者总结道,LLM辅助工作流为改进基于智能体建模的可重复性提供了一条有前景的途径。 欲了解两种工作流的详细设计、三个案例研究的完整结果以及复现代码和技能材料,请点击原文链接查看完整论文。

编译自 GIS and Agent-Based Modeling,原文链接

原文摘要

LLM-Assisted Workflows for Replicating Agent-Based Models

In a previous post we discussed how Large Language Models (LLMs) can be used in replicating models.  Keeping with this theme but also taking advantage of the developments in LLMs we have continued with this line of research which has led to a new paper entitled "Large Language Model-Assisted Workflows for Replicating Agent-Based Model" which we (Boyu Wang and myself ) will be presenting at the 2026 International Conference of the Computational Social Science Society of the Americas.  In this paper we discuss two forms of role-separated LLM assistance to replicate agent-based models: a researcher-mediated workflow and a skill-assisted workflow.  For the researcher-mediated workflow, which we applied to the Ya-TASERPS model, two LLMs were assigned distinct roles, with one LLM for planning and evaluation, and the other for source code implementation. The planning and evaluation LLM inspected the source materials, divided overall replication and validation tasks into phases, specified acceptance criteria (e.g., if the replications shared the same spatial configuration of the original model), and assessed completed work based on these criteria. While the implementation LLM translated each phase into target source code and addressed evaluation findings. In this workflow, a human researcher oversees their work and adjudicated ambiguities (e.g., discrepancies between the original model and replication). Intermediary outputs from both LLMs such as task list, progress log, findings and design decisions were kept as written records in separate files. In the skill-assisted workflow which we used to replicate the Sakoda's checkerboard model and the Slumulation model, the LLMs were also tasked with their own designated roles. In addition to source materials such as NetLogo code and paper, LLM skills were also supplied as input, where researcher pre-defined reusable prompts specifying planning, implementation, and verification procedures for the LLMs. Inspired by an emerging prac