Evaluation of prompt engineering strategies for pharmacokinetic data analysis with the ChatGPT large language model
Authors: Shin Euibeom , Ramanathan Murali 
Published: February 2025

ABSTRACTObjectives: To systematically assess the ChatGPT large language model on diverse tasks relevant to pharmacokinetic data analysis.Methods: ChatGPT was evaluated with prototypical tasks related to report writing, code generation, non-compartmental analysis, and pharmacokinetic word problems. The writing task consisted of writing an introduction for this paper from a draft title. The coding tasks consisted of generating R code for semi-logarithmic graphing of concentration-time profiles and calculating area under the curve and area under the moment curve from time zero to infinity. Pharmacokinetics word problems on single intravenous, extravascular bolus, and multiple dosing were taken from a pharmacokinetics textbook. Chain-of-thought and problem separation were assessed as prompt engineering strategies when errors occurred.Results: ChatGPT showed satisfactory performance on the report writing, code generation tasks and provided accurate information on the principles and methods underlying pharmacokinetic data analysis. However, ChatGPT had high error rates in numerical calculations involving exponential functions. The outputs generated by ChatGPT were not reproducible: the precise content of the output was variable albeit not necessarily erroneous for different instances of the same prompt. Incorporation of prompt engineering strategies reduced but did not eliminate errors in numerical calculations.Conclusions: ChatGPT has the potential to become a powerful productivity tool for writing, knowledge encapsulation, and coding tasks in pharmacokinetic data analysis. The poor accuracy of ChatGPT in numerical calculations require resolution before it can be reliably used for PK and pharmacometrics data analysis.Citations: 1. OpenAI (2023) ChatGPT (June 26 version) Large languagemodel2. Google AI (2023) Bard Large language model3. Kimko HC, Duffull SB (2003) Simulation for designing clinicaltrials: a pharmacokinetic-pharmacodynamic modeling perspective drugs and the pharmaceutical sciences, vol 127. MarcelDekker, New York4. Kimko HC, Peck CC, American Association of PharmaceuticalScientists (2011) Clinical trial simulations: applications andtrends. AAPS advances in the pharmaceutical sciences series, vol1. AAPS Press, Springer, New York5. Bonate PL, Barrett JS, Ait-Oudhia S, Brundage R, Corrigan B,Duffull S, Gastonguay M, Karlsson MO, Kijima S, Krause A,Lovern M, Neely M, Ouellet D, Plan EL, Rao GG, Standing J,Wilkins J, Zhu H (2023) Training the next generation of pharmacometric modelers: a multisector perspective. J PharmacokinetPharmacodyn. https://doi.org/10.1007/s10928-023-09878-46. Michelet R, Aulin LBS, Borghardt JM, Costa TD, Denti P, IbarraM, Ma G, Meibohm B, Pillai GC, Schmidt S, Hennig S, Kloft C(2023) Barriers to global pharmacometrics: educational challenges and opportunities across the globe. CPT PharmacometricsSyst Pharmacol 12(6):743–747. https://doi.org/10.1002/psp4.129407. White J, Fu Q, Hays S, Sandborn M, Olea C, Gilbert H, ElnasharA, Spencer-Smith J, Schmidt DC (2023) A prompt pattern catalogto enhance prompt engineering with ChatGPT. arXiv:2302:113828. Harrold JM, Abraham AK (2014) Ubiquity: a framework forphysiological/mechanism-based pharmacokinetic/pharmacodynamic model development and deployment. J PharmacokinetPharmacodyn 41(2):141–151. https://doi.org/10.1007/s10928014-9352-69. R Core Team (2017) R: a language and environment for statistical computing. R Foundation for Statistical Computing, Vienna10. Rowland M, Tozer TN (1995) Clinical pharmacokinetics: concepts and applications, 3rd edn. Williams & Wilkins, Baltimore11. Alkaissi H, McFarlane SI (2023) Artificial hallucinations inChatGPT: implications in scientific writing. Cureus J Med Sci15(2):e35179. https://doi.org/10.7759/cureus.3517912. Athaluri SA, Manthena SV, Kesapragada V, Yarlagadda V, DaveT, Duddumpudi RTS (2023) Exploring the boundaries of reality:investigating the phenomenon of artificial intelligence hallucination in scientific writing through ChatGPT references. Cureus15(4):e37432. https://doi.org/10.7759/cureus.3743213. Beutel G, Geerits E, Kielstein JT (2023) Artificial hallucination:GPT on LSD? Crit Care 27(1):148. https://doi.org/10.1186/s13054-023-04425-614. Gabrielsson J, Weiner D (2007) Pharmacokinetic–pharmacodynamic data analysis: concepts and applications, 4th edn. SwedishPharmaceutical Press, Stockholm15. Gabrielsson J, Weiner D (2016) Pharmacokinetic–pharmacodynamic data analysis: concepts and applications, 5th edn. SwedishPharmaceutical Press, Stockholm16. Wickham H (2009) ggplot2: elegant graphics for data analysis.Use R:1–212. https://doi.org/10.1007/978-0-387-98141-317. Frieder S, Pinchetti L, Chevalier A, Griffiths R-R, Salvatori T,Lukasiewicz T, Petersen PC, Berner J (2023) Mathematicalcapabilities of ChatGPT. arXiv:2301.13867v1386218. Yuan Z, Yuan H, Tan C, Wang W, Huang S (2023) How well dolarge language models perform in arithmetic tasks? arXiv:2304.0201519. Nair R, Mohan DD, Frank S, Setlur S, Govindaraju V, Ramanathan M (2023) Generative adversarial networks for modellingclinical biomarker profiles with race/ethnicity. Br J Clin Pharmacol 89(5):1588–1600. https://doi.org/10.1111/bcp.1562320. Nair R, Mohan DD, Setlur S, Govindaraju V, Ramanathan M(2023) Generative models for age, race/ethnicity, and diseasestate dependence of physiological determinants of drug dosing.J Pharmacokinet Pharmacodyn 50(2):111–122. https://doi.org/10.1007/s10928-022-09838-421. Wei J, Wang X, Schuurmans D, Bosma M, Ichter B, Xia F, ChiEH, Le QV, Zhou D Chain-of-thought prompting elicits reasoning in large language models. In: 36th conference on neuralinformation processing systems (NeurIPS 2022). New Orleans,LA, 2022. vol 1. NeuroIPS Foundation, pp xvi, 53822. Shakarian P, Koyyalamudi A, Ngu N, Mareedu L (2023) Anindependent evaluation of ChatGPT on mathematical wordproblems (MWP). arXiv:2302.13814v1381223. Chen J, Chen L, Huang H, Zhou T (2023) When do you needchain-of-thought prompting for ChatGPT? arXiv:2304.03262v0326224. Cloesmeijer M, Janssen A, Koopman S, Cnossen M, Mathot R(2023) ChatGPT in pharmacometrics? Potential opportunities andlimitations