Abstract
Purpose: This study explores the potential of generative AI models to aid experts in developing scripts for pharmacokinetic (PK) models, with a focus on constructing a two-compartment population PK model using data from Hosseini et al. (2018). Methods: Generative AI tools ChatGPT v3.5, Gemini v2.0 Flash and Microsoft Copilot free could help pharmacokinetics professionals— even those without programming experience—learn the programming languages and skills needed for PK modeling. To evaluate these free AI tools, PK models were created in R Studio, covering key tasks in pharmacometrics and clinical pharmacology, including model descriptions, input requirements, results, and code generation, with a focus on reproducibility. Results: ChatGPT demonstrated superior performance compared to Copilot and Gemini, highlighting strong foundational knowledge, advanced concepts, and practical skills, including PK code structure and syntax. Validation indicated high accuracy in estimated and simulated plots, with minimal differences in clearance (Cl) and volume of distribution (V c and V p) compared to reference values. The metrics showed absolute fractional error (AFE), absolute average fractional error (AAFE), and mean percentage error (MPE) values of 0.99, 1.14, and -1.85, respectively. Conclusion: These results show that generative AI can effectively extract PK data from literature, build population PK models in R, and create interactive Shiny apps for visualization, with expert support.