1 Introduction
Medication errors are among the most frequent and preventable causes of patient harm [1]. According to the National Coordinating Council for Medication Error Reporting and Prevention, a medication error is any preventable event that may cause or lead to inappropriate medication use or patient harm while the medication is under the control of a healthcare professional, patient, or consumer. These errors arise from failures in medication systems and human factors such as fatigue, poor environmental conditions, and staffing shortages that compromise critical steps in the care process, including prescribing, transcription, dispensing, administration, and monitoring. These failures can have serious consequences for patients, leading to severe adverse reactions, permanent disabilities, or, in extreme cases, death [2].
A medical prescription is a written document that provides instructions guiding the patient on medication use during treatment, including dosage, frequency of administration, and duration. Additionally, it must include both the patient’s and the healthcare professional’s information, as this is crucial for ensuring adherence to the prescribed treatment. Therefore, prescriptions should use clear language that aligns with the patient's level of understanding, presenting information in an organized and easily comprehensible manner, along with legible handwriting. Difficulty in understanding a prescription is one of the main factors contributing to non-adherence to treatment, a critical issue in patient safety, as well as a potential cause of medication errors [3].
Furthermore, medication errors can be associated with aspects of professional practice, healthcare products, and systems. They may occur at various stages, including prescribing, order communication, medication labeling and packaging, as well as in the composition, dispensing, and distribution of pharmaceutical products. Additionally, factors such as improper administration, deficiencies in the education of healthcare professionals and patients, ineffective monitoring, and incorrect medication contribute to these adverse events. Ensuring patient safety requires identifying and mitigating these risks at every stage of the medication process [4].
In response to this issue, the World Health Organization (WHO) launched the Third WHO Global Patient Safety Challenge, titled Medication Without Harm, aiming to reduce serious and preventable medication-related harm by 50% globally between 2017 and 2022 [4]. By raising awareness and increasing visibility, this initiative emphasizes that many medication administration issues stem from communication failures. Many patients may be unaware of essential information, such as the medication's name, appearance, purpose, correct dosage and frequency, optimal administration time, treatment duration, potential side effects, actions to take if a dose is missed, possible interactions with other drugs or foods, whether the new medication replaces or complements an existing therapy, and difficulties arising from illegible prescriptions [5,6].
Prescription errors not only impact patients' health and the economy but also have serious consequences for the healthcare professionals involved. Those who commit such errors may experience feelings of shame, guilt, and self-doubt, which, in some cases, can contribute to suicidal tendencies. Additionally, the legal and professional repercussions of a prescription error may lead to the revocation of a professional license, compounding the emotional distress already caused by the mistake. Furthermore, these errors can erode patient and family trust while increasing the risk of criminal charges and disciplinary action by professional boards [1].
To address the challenges posed by medication prescription errors and enhance patient safety, this research explores the adoption of Generative Artificial Intelligence tools, leveraging the knowledge generated by Large Language Models (LLMs). These models, trained on vast amounts of internet data using deep learning methods, can generate various forms of content, including text, video, and audio, and respond to user commands. As a result, LLMs hold great potential in healthcare by enabling instant access to medical information, supporting diagnostic processes, and providing insights into potential treatment options [7].
1.1 LLMs as aids in drug prescribing
The integration of healthcare data science and artificial intelligence (AI) has transformed process management in the field, influencing everything from data collection and storage to processing, interpretation, and clinical and administrative application. Additionally, AI enables the automation of repetitive tasks, optimizes workflows, supports decision-making, and facilitates personalized treatments. In healthcare education, AI also offers significant advantages, such as generating simulation content and clinical case scenarios to help students enhance their clinical reasoning [7-9]. Among its various applications, LLMs stand out for their promising role in drug prescribing. These models assist in formulating safer prescriptions and contribute to reducing medical errors, thereby improving patient safety [7].
LLMs are machine learning models based on deep neural networks, designed to perform natural language processing (NLP) tasks such as translation, summarization, and question answering. Trained on vast amounts of textual data, these models can interpret user commands and generate human-like text. In the context of medical prescribing, LLMs, when integrated with clinical decision support systems, assist healthcare professionals in selecting appropriate medications, identifying potential drug interactions, and providing up-to-date information on dosages and side effects. This integration enhances prescription accuracy and helps reduce the incidence of medical errors [10].
Although LLMs hold promise as valuable tools in addressing healthcare demands, analyzing vast volumes of information to respond to user commands, they are also susceptible to generating inaccurate responses or responses based on non-existent data, a phenomenon known as hallucination. This issue poses a significant risk, particularly in drug prescribing, as it can compromise both the quality and safety of prescriptions. Hallucination occurs when models generate information that appears to be grounded in scientific evidence, but upon closer examination, proves to be incorrect or unfounded. As such, this limitation remains one of the key challenges in applying LLMs in healthcare, especially when precise accuracy is crucial to ensuring the efficacy and safety of drug prescriptions [7].
2 Methods
This study employed a blinded comparative evaluation design to assess the quality of responses generated by multiple Large Language Models (LLMs) in prescription-related clinical scenarios. The unit of analysis was the individual LLM-generated response. Six LLMs were prompted with four predefined prescription questions, resulting in 24 responses. These responses were independently evaluated by a panel of 34 physicians using predefined quality criteria. The methodological workflow comprised three sequential stages: (i) generation of responses by LLMs under standardized prompting conditions, (ii) blinded expert evaluation using structured scoring criteria, and (iii) quantitative aggregation and comparative analysis of scores.
This research used an online form to collect responses from participants through closed-ended questions. This format allows the study to be classified as qualitative research with a quantitative component or as a mixed-methods approach. The adoption of this format is due to the combination of closed-ended questions typically associated with quantitative research, with the qualitative aim of exploring participants' perceptions and experiences. While the use of closed-ended questions may lean toward a quantitative approach, the focus on understanding the meaning of responses and their contextual interpretation aligns with the qualitative nature of the study [11].
The study involved evaluating prescription-related responses generated by LLMs from a panel of 34 physicians. Participants were recruited by convenience sampling and met the inclusion criteria of being licensed physicians with active clinical practice. The panel comprised professionals from a wide range of medical specialties, including internal medicine, geriatrics, cardiology, pulmonology, psychiatry, pediatrics, nephrology, surgery, and others, ensuring heterogeneity of clinical perspectives. Clinical experience among participants ranged from early-career physicians (approximately three years of practice) to senior physicians with over 20 years of professional experience. There were three physicians with up to three years of experience, 13 between three and seven years, two between 13 and 19 years, and finally, 16 with more than 20 years of experience.
All participating physicians independently evaluated the complete set of 24 anonymized responses generated by the LLMs. The assessments were conducted asynchronously using an online form, with responses presented in random order and without identifying the generating model. No intervention was applied, no personal health or sensitive data was collected, and participants were not exposed to physical, emotional, or social risks. Participation was voluntary, and all assessments were recorded and analyzed anonymously to preserve confidentiality.
This study was approved by the Ethics and Research Committee, under CAAE (Certificate of Presentation of Ethical Appreciation) number 86553225.9.0000.8054 and Opinion Number 7.493.332.
As the study did not involve direct patient participation or personal health data, informed consent was not applicable. However, all participating physicians were fully informed about the study’s objectives, and their participation was entirely voluntary.
Six LLMs were selected to generate responses focused on medical prescription. The chosen models were: ChatGPT-4o, Cortex (z_piloto), Claude 3.5 Sonnet, Llama 3.1 405b Instruct, Cohere Command-Nightingale-30B, and Gemini 1.5 Flash. Furthermore, four questions were defined for this research, covering both objective and complex topics such as contraindications, drug interactions, and personalized treatments. These questions were:
- Question 1: “What is the contraindication for ibuprofen?”
- Question 2: “Are there any issues with taking metformin hydrochloride together with valsartan?”
- Question 3: “What are the complications of increasing the daily dosage of metformin hydrochloride?”
- Question 4: “What is the optimal daily dosage of metformin for a 52-year-old male patient who also has high blood pressure?”
The 24 LLM-generated responses were presented to evaluators through an online form. Responses were anonymized and randomized so that evaluators were blinded to both the identity of the LLM and the order of generation. Each physician independently evaluated all responses without discussion or calibration sessions. Prior to evaluation, participants received standardized written instructions defining each assessment criterion but were not provided with reference answers or scoring benchmarks.
The scores assigned were based on five criteria, with each physician scoring between 1 (poor) and 5 (excellent). These criteria were selected to reflect dimensions relevant to clinical usability and patient safety in prescription support, rather than isolated factual accuracy. Together, they capture logical soundness, relevance, completeness, and practical usefulness of the information provided to clinicians. The five criteria are:
- Consistency: Is the answer consistent with other known information?
- Focus: Does the answer directly address the question without unnecessary digressions?
- Coherence: Is the answer logically structured and easy to follow?
- Completeness: Does the answer cover all the important aspects of the question?
- Detail: Does the answer provide enough detail to be useful?
In medical prescribing, "consistency" is essential to ensure that the information provided aligns with best practices and guidelines. "Coherence" is crucial for responses to be clear and logically applicable in clinical practice. "Completeness" ensures that all relevant aspects are considered, preventing omissions that could lead to errors. Additionally, "detail" is vital for ensuring that information is accurate and useful in clinical decision-making. Finally, "Focus" ensures that the information is concise and not dispersed.
In this study, “understanding” of prescription-related information was not treated as a direct outcome variable, but rather as a "multidimensional construct" inferred through expert evaluation. The assessment criteria were selected to capture complementary dimensions that influence the interpretability and clinical usability of prescription guidance. From a patient safety perspective, inadequate understanding may arise not only from incorrect information, but also from fragmented explanations, lack of contextualization, omission of critical elements, or excessive ambiguity. Therefore, higher scores across these criteria were interpreted as proxies for improved comprehensibility and reduced risk of misinterpretation in clinical practice.
The committee of physicians was composed of professionals from various specialties, including clinical medicine, pulmonology, gynecology and obstetrics, anesthesiology, public health, gastroenterology, and neurology. In addition, the physicians had varied levels of clinical experience, ranging from residents with less than three years of practice to seasoned professionals with over 20 years of experience. The goal of the research was to subjectively assess whether the responses generated by the LLMs were adequate for consultation by residents and other physicians, based on the expertise and judgment of each participant. Importantly, the physicians were blinded to which LLM generated each response, ensuring an unbiased evaluation. The intent was for them to assess the quality of each response objectively, without any preconceived notions about the LLM that produced it.
After data collection, the information was tabulated and identified for analysis in the results and discussion. Descriptive statistics (means and variability measures) were calculated for each LLM across criteria and questions. To examine whether physician experience influenced evaluations, inferential analyses were performed using ANOVA when parametric assumptions were met and Kruskal–Wallis tests otherwise. Post-hoc Tukey tests were applied when appropriate.
2.1 Selection of Large Language Models
Six LLMs were selected based on three criteria: (i) widespread use or commercial relevance in healthcare-related applications, (ii) architectural diversity (closed-source, open-source, and hybrid platforms), and (iii) public availability at the time of the experiment. All models were accessed between January 2025 and March 2025 using their default inference settings, without fine-tuning or retrieval augmentation. The chosen models were: ChatGPT-4o [12], Cortex (z_piloto) [13], Claude 3.5 Sonnet [14], Llama 3.1 405b Instruct [15], Cohere Command-Nightingale-30B [16], and Gemini 1.5 Flash [17].
All LLMs were prompted using identical user-level prompts corresponding to the four prescription-related questions described below. No iterative prompting, follow-up questions, or response refinement was allowed. Each model generated a single response per question. Default generation parameters were used for all models, including temperature and sampling settings, as defined by each platform at the time of access. No external knowledge bases, plugins, or clinical decision support tools were enabled. No LLM was used with RAG (Retrieval-augmented generation).
ChatGPT-4o is one of the most popular language models developed by OpenAI, designed for natural text processing and generation. This version offers faster and more accurate responses, enhancing the user’s experience across a variety of applications, from virtual assistants to creative writing tools. Cortex is a platform that integrates multiple LLM models, including the latest versions from OpenAI, Anthropic, Google, Llama, and others. Its architecture supports the creation of specialized agents, enabling more in-depth, qualified, and accurate responses. This flexibility allows Cortex to adapt to different contexts and demands, improving the quality of analyses and the efficiency of cybersecurity, risk management, and compliance processes. In the pilot, a persona called "Medical Assistant" (z_piloto) was created using specific prompt configurations to efficiently process medical information. The "Medical Assistant" was powered by OpenAI's GPT-4o model.
Claude 3.5 Sonnet is an advanced language model developed by Anthropic, released on June 21, 2024. It outperforms both its competitors and previous versions, such as Claude 3 Opus, in assessments of graduate-level reasoning, university-level knowledge, and coding proficiency. Additionally, it offers significant improvements in understanding nuances, humor, and complex instructions, establishing itself as a reference for producing high-quality content with a natural and engaging tone.
Llama 3.1 405B Instruct is a large-scale language model developed by Meta, designed for multilingual dialogue tasks. With 405 billion parameters, it has been fine-tuned to follow instructions, enabling more natural and effective interactions across multiple languages. Compared to other models, it outperforms industry benchmarks, excelling in code generation and complex dialogue tasks. Additionally, it supports the processing of large textual inputs, making it particularly useful for analyzing long documents and generating synthetic data.
Cohere Command-Nightingale-30B is a large-scale language model developed by Cohere. It is an advanced iteration of the Command language model, designed for both text generation and natural language understanding tasks. Named for its size, approximately 30 billion parameters, Nightingale-30B’s substantial scale enables it to process and learn from vast amounts of language data. This capability allows the model to generate high-quality text and perform complex natural language processing tasks.
Gemini 1.5 Flash, developed by Google, is designed to be faster and more cost-effective than Gemini 1.5 Pro. It prioritizes efficiency and low latency, making it well-suited for applications that require quick and frequent responses, such as chatbots and document analysis. Despite its optimization for speed, Gemini 1.5 Flash retains a large context window of one million tokens and multimodal capabilities, allowing it to process and analyze large volumes of information in various formats, including text, code, audio, and video.
3 Results
Based on the tabulated results of the collected responses, some patterns can be identified. For example:
- Most challenging questions:
- Question 4 ("What is the best daily dosage of metformin for a 52-year-old male patient who also has high blood pressure?") was the most challenging, showing greater variability in scores and lower average performance, particularly in the “Completeness” and “Detail” criteria.
- Question 2 ("Is there any issue with taking metformin hydrochloride together with valsartan?") also posed challenges for some LLMs in providing clear and complete answers.
- Criteria with the greatest variability:
- Completeness and Detail showed the largest differences in scores across models, indicating difficulties in covering all relevant aspects and providing detailed information.
- Models with best overall performance:
- LLM6 excelled in most criteria, particularly in “Completeness” and “Detail”, showing greater consistency when addressing complex questions.
- LLM3 also achieved high scores in Coherence and Consistency, demonstrating logical reasoning and precision in its answers.
- The impact of physicians’ experience:
- More experienced doctors tended to be more rigorous in their assessments, while residents showed greater uniformity in their grades.
Additionally, other patterns were identified and are presented. There is variability in the performance of LLMs across the assessed criteria and the questions asked. Some LLMs excel in certain areas, while others perform more poorly. This may suggest that some LLMs are better suited for specific types of questions, or that their language models are stronger in certain areas. For example, LLM2 and LLM6 seem to score higher overall across multiple criteria and various questions. Regarding the evaluation criteria, it was observed:
- Consistency: Most LLMs performed well on this criterion, indicating that their responses are generally aligned with medical knowledge. The greatest inconsistencies were observed in LLM3, LLM4, and LLM5, particularly in questions 2, 3, and 4.
- Focus: Scores for this criterion vary widely, suggesting that some LLMs have difficulty focusing on the specific question, leading to responses that are sometimes more rambling. LLM1 appears to score better in this regard on almost all questions.
- Coherence: LLMs generally receive good scores for coherence, indicating that responses are logically structured and make sense.
- Completeness and Detail: The scores for this criterion vary more, suggesting that not all LLMs are able to address all important aspects of the question or provide sufficient detail. LLMs such as LLM1, LLM2, and LLM6 seem to perform better in this regard.
4 Discussion
Regarding the content of the questions, Question 1 about ibuprofen contraindications appears to have generated the most consistent and well-evaluated responses from all LLMs. In contrast, Questions 2, 3, and 4 seem to present more challenges for the LLMs, with evaluations being more variable, particularly in the criteria of Focus, Completeness, and Detail. This suggests that more complex questions require further improvement in LLM capabilities. It is also noticeable that there is variation in the evaluations provided by each individual physician. LLM4 shows significant variation in the physicians' assessments, indicating that some physicians may disagree with the method of response. Similar variations can also be observed in LLM1 and LLM3.
To identify the most challenging questions for the LLMs, we analyzed the average scores and variability in the evaluations provided by the 34 physicians, considering the five assessment criteria: “Consistency”, “Focus”, “Coherence”, “Completeness”, and “Detail” (Table 1).
To determine which model (LLM1 to LLM6) performed best for each criterion, we conducted an analysis based on the average scores given by the 34 physicians across the four questions. Each criterion is analyzed separately (Table 2).