AI for NONMEM Coding in Pharmacometrics Research and Education: Shortcut or Pitfall?

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Zheng, Wenhao, Wang, Wanbing, Kirkpatrick, Carl M. J., Landersdorfer, Cornelia B., Yao, Huaxiu, Zhou, Jiawei
Format: Preprint
Veröffentlicht: 2025
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866918088820129792
author Zheng, Wenhao
Wang, Wanbing
Kirkpatrick, Carl M. J.
Landersdorfer, Cornelia B.
Yao, Huaxiu
Zhou, Jiawei
author_facet Zheng, Wenhao
Wang, Wanbing
Kirkpatrick, Carl M. J.
Landersdorfer, Cornelia B.
Yao, Huaxiu
Zhou, Jiawei
contents Artificial intelligence (AI) is increasingly being explored as a tool to support pharmacometric modeling, particularly in addressing the coding challenges associated with NONMEM. In this study, we evaluated the ability of seven AI agents to generate NONMEM codes across 13 pharmacometrics tasks, including a range of population pharmacokinetic (PK) and pharmacodynamic (PD) models. We further developed a standardized scoring rubric to assess code accuracy and created an optimized prompt to improve AI agent performance. Our results showed that the OpenAI o1 and gpt-4.1 models achieved the best performance, both generating codes with great accuracy for all tasks when using our optimized prompt. Overall, AI agents performed well in writing basic NONMEM model structures, providing a useful foundation for pharmacometrics model coding. However, user review and refinement remain essential, especially for complex models with special dataset alignment or advanced coding techniques. We also discussed the applications of AI in pharmacometrics education, particularly strategies to prevent over-reliance on AI for coding. This work provides a benchmark for current AI agents performance in NONMEM coding and introduces a practical prompt that can facilitate more accurate and efficient use of AI in pharmacometrics research and education.
format Preprint
id arxiv_https___arxiv_org_abs_2507_08144
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle AI for NONMEM Coding in Pharmacometrics Research and Education: Shortcut or Pitfall?
Zheng, Wenhao
Wang, Wanbing
Kirkpatrick, Carl M. J.
Landersdorfer, Cornelia B.
Yao, Huaxiu
Zhou, Jiawei
Other Quantitative Biology
Artificial intelligence (AI) is increasingly being explored as a tool to support pharmacometric modeling, particularly in addressing the coding challenges associated with NONMEM. In this study, we evaluated the ability of seven AI agents to generate NONMEM codes across 13 pharmacometrics tasks, including a range of population pharmacokinetic (PK) and pharmacodynamic (PD) models. We further developed a standardized scoring rubric to assess code accuracy and created an optimized prompt to improve AI agent performance. Our results showed that the OpenAI o1 and gpt-4.1 models achieved the best performance, both generating codes with great accuracy for all tasks when using our optimized prompt. Overall, AI agents performed well in writing basic NONMEM model structures, providing a useful foundation for pharmacometrics model coding. However, user review and refinement remain essential, especially for complex models with special dataset alignment or advanced coding techniques. We also discussed the applications of AI in pharmacometrics education, particularly strategies to prevent over-reliance on AI for coding. This work provides a benchmark for current AI agents performance in NONMEM coding and introduces a practical prompt that can facilitate more accurate and efficient use of AI in pharmacometrics research and education.
title AI for NONMEM Coding in Pharmacometrics Research and Education: Shortcut or Pitfall?
topic Other Quantitative Biology
url https://arxiv.org/abs/2507.08144