Autonomous Construction of Excel-Based Health Economic Models by a Large Language Model: A Novel Agentic Method
Author(s)
William Rawlinson, MPhysPhil.
Principal AI Scientist, Estima Scientific, London, United Kingdom.
Principal AI Scientist, Estima Scientific, London, United Kingdom.
OBJECTIVES: The use of Large Language Models (LLMs) to automate health economic modelling is an area of growing interest. The majority of research has focused on programmatic models. However, most health-economic analysis is performed in Microsoft Excel due to its familiarity among stakeholders. The objective of this study was to develop and validate a method that enables LLMs to autonomously construct well-formatted health economic models in Excel.
METHODS: An agentic method was developed to automate the construction of Markov models in Excel using an LLM. The process constructs models in segments (small regions of cells called ‘modules’). The agent maintains overall context through tools that provide: a summary of existing modules, the ability to inspect modules, and the ability to inspect named ranges. The method addresses two primary challenges in LLM-driven spreadsheet modeling: (1) translating spreadsheet content into text that an LLM can interpret, and (2) generating accurate, well-formatted spreadsheet content from LLM-produced text. Both challenges are reduced when limiting the scope of interpretation and construction to small regions of cells. To validate the method, we autonomously constructed a simple, exercise-book Markov model in Excel using claude-sonnet-3.5-v2 (without human intervention), starting from a natural language description of the input data and model structure.
RESULTS: Claude autonomously built the simple Markov model in Excel with a high degree of accuracy, and clear and consistent formatting. For example, using informative named ranges for all input values, colour-coding cells, and adding descriptive notes for calculation cells.
CONCLUSIONS: This study provides a framework for automating construction of Excel models using an LLM, which is a novel contribution. The study suggests that automation has the potential to increase consistency and efficiency in spreadsheet modelling. Further research could build upon this approach and validate accuracy and reliability on complex, real-world models.
METHODS: An agentic method was developed to automate the construction of Markov models in Excel using an LLM. The process constructs models in segments (small regions of cells called ‘modules’). The agent maintains overall context through tools that provide: a summary of existing modules, the ability to inspect modules, and the ability to inspect named ranges. The method addresses two primary challenges in LLM-driven spreadsheet modeling: (1) translating spreadsheet content into text that an LLM can interpret, and (2) generating accurate, well-formatted spreadsheet content from LLM-produced text. Both challenges are reduced when limiting the scope of interpretation and construction to small regions of cells. To validate the method, we autonomously constructed a simple, exercise-book Markov model in Excel using claude-sonnet-3.5-v2 (without human intervention), starting from a natural language description of the input data and model structure.
RESULTS: Claude autonomously built the simple Markov model in Excel with a high degree of accuracy, and clear and consistent formatting. For example, using informative named ranges for all input values, colour-coding cells, and adding descriptive notes for calculation cells.
CONCLUSIONS: This study provides a framework for automating construction of Excel models using an LLM, which is a novel contribution. The study suggests that automation has the potential to increase consistency and efficiency in spreadsheet modelling. Further research could build upon this approach and validate accuracy and reliability on complex, real-world models.
Conference/Value in Health Info
2025-11, ISPOR Europe 2025, Glasgow, Scotland
Value in Health, Volume 28, Issue S2
Code
P15
Topic
Economic Evaluation, Health Technology Assessment, Methodological & Statistical Research
Topic Subcategory
Budget Impact Analysis
Disease
No Additional Disease & Conditions/Specialized Treatment Areas