Artigo em revista científica Q1
Can large language models implement agent-based models? An ODD-based replication study
Nuno Fachada (Fachada, N.); Daniel Fernandes (Fernandes, D.); Carlos M. Fernandes (Fernandes, C. M.); João P. Matos-Carvalho (Matos-Carvalho, J. P.);
Título Revista
Ecological Modelling
Ano (publicação definitiva)
2026
Língua
Inglês
País
Países Baixos (Holanda)
Mais Informação
Web of Science®

N.º de citações: 0

(Última verificação: 2026-07-13 18:06)

Ver o registo na Web of Science®

Scopus

N.º de citações: 0

(Última verificação: 2026-07-08 16:21)

Ver o registo na Scopus

Google Scholar

Esta publicação não está indexada no Google Scholar

Esta publicação não está indexada no Overton

Abstract/Resumo
Large language models (LLMs) can now synthesize non-trivial executable code from textual descriptions, raising an important question: can LLMs reliably implement agent-based models from standardized specifications in a way that supports replication, verification, and validation? We address this question by evaluating 17 contemporary LLMs on a controlled ODD-to-code translation task, using the PPHPC predator–prey model as a fully specified reference. Generated Python implementations are assessed through staged executability checks, model-independent statistical comparison against a validated NetLogo baseline, and quantitative measures of runtime efficiency and maintainability. Results show that behaviorally faithful implementations are achievable but not guaranteed, and that executability alone is insufficient for scientific use. GPT-4.1 consistently produces statistically valid and efficient implementations, with Claude 3.7 Sonnet performing well but less reliably. Overall, the findings clarify both the promise and current limitations of LLMs as model engineering tools, with implications for reproducible agent-based and ecological modeling.
Agradecimentos/Acknowledgements
--
Palavras-chave
Natural language model specification,Specification-to-code translation,Code generation,Computational reproducibility,Verification and validation
  • Ciências da Terra e do Ambiente - Ciências Naturais
  • Ciências Biológicas - Ciências Naturais
Registos de financiamentos
Referência de financiamento Entidade Financiadora
UID/PRR/00408/2025 Fundação para a Ciência e a Tecnologia
UID/PRR/50008/2025 Fundação para a Ciência e a Tecnologia
UID/06486/2025 Fundação para a Ciência e a Tecnologia
PID2023-147409NB-C21 Ministerio de Ciencia, Innovación y Universidades
UID/00408/2025 Fundação para a Ciência e a Tecnologia
UID/50008/2025 Fundação para a Ciência e a Tecnologia
COFAC/ILIND/COPELABS/1/2024 Instituto Lusófono de Investigação e Desenvolvimento
2023.15441.TENURE.051/CP00003/CT00029 Fundação para a Ciência e a Tecnologia
UID/PRR2/06486/2025 Fundação para a Ciência e a Tecnologia
CEECINST/00002/2021/CP2788/CT0001 Fundação para a Ciência e a Tecnologia
UID/PRR2/50008/2025 Fundação para a Ciência e a Tecnologia
UID/PRR/06486/2025 Fundação para a Ciência e a Tecnologia