WorksComputer Science
PRISMATIC : Prescription Risk Inspection System for Multi-Agent Treatment Interaction in Clinical Decision-Making
Abstract
Medical prescribing errors for multimorbid patients, who require complex drug regimens, are a major patient safety concern. These errors often stem from fragmented decision-making across medical specialties, a critical coordination failure that leads to adverse drug events and rehospitalizations. To address this coordination challenge, we introduce PRISMATIC, a multi-agent architecture where specialized agents, each representing a workflow role, collaboratively generate and refine treatment plans. Operating on a blackboard architecture, the system first structures patient information from clinical notes, then iteratively develops safe, rational, and interpretable drug regimens. The agents' collaboration is governed by two novel adaptive coordination mechanisms: (1) Dynamic Self-Updating Weight Adjustment (DSWA), a long-term mechanism that adjusts the influence weights of agents based on historical case outcomes, enabling the system to adapt and trust more reliable specialists over time. (2) Discrepancy Feedback Precise Calibration (DFPC), a short-term mechanism where agents provide iterative feedback to resolve disagreements and eliminate prescription conflicts for the current patient. Experiments on patient records from the MIMIC-IV database show that PRISMATIC significantly reduces drug conflicts, improves prescription coverage, and enhances treatment consistency compared to strong LLM baselines. Our work demonstrates that structuring clinical co-treatment as a multi-agent coordination problem offers a promising path toward safer and more coherent multidisease management.

Figure 1. For patients with complex conditions and multiple comorbidities, conflicts and omissions may arise due to drug interactions and physician cognitive load. In contrast, PRISMATIC is a safe, comprehensive, and rational clinical prescription decision support system application.
Introduction
Prescribing for multimorbid patients: individuals with multiple chronic diseases such as hypertension, diabetes, and chronic kidney disease, is a high-stakes challenge in modern medicine [17]. These patients require complex medication regimens often overseen by multiple specialists, yet each clinician typically focuses on a single disease-specific guideline. This siloed approach, illustrated in Figure 2, inevitably fragments the clinical reasoning process, leading to a cascade of preventable issues: overlooked drug-drug interactions, conflicting therapeutic goals, and ultimately, adverse events. The scale of this problem is significant, with studies estimating thousands of such errors per 100,000 admissions [3]. At its core, this is not merely a problem of individual mistakes, but a systemic failure of coordination among well-intentioned but isolated decision-makers.
Motivations: NLP/LLM still fails. Early prescribing support tools relied on static rules (e.g., drug-drug interactions, contraindications) or manual chart reviews [20, 21]. Recent NLP and deep learning models automate tasks like ADE detection and medication extraction [16, 22]. Besides, while the advent of Large Language Models (LLMs) represents a significant leap in reasoning capabilities for healthcare [23], current applications to prescribing reveal a fundamental architectural mismatch. They typically frame the automated prescription task as a monolithic, end-to-end generation problem, ingesting all patient data to produce an output in an opaque, "black box" fashion [5, 12, 18]. This monolithic approach is fundamentally misaligned with the nature of collaborative clinical reasoning. It lacks the modularity to represent specialized knowledge domains (e.g., a clinician vs. a pharmacologist), the transparency to trace how conflicting risks were weighed, and the explicit coordination mechanisms to resolve disagreements between therapeutic goals. Ultimately, the challenge is not simply one of text generation, but of collaborative synthesis, where a task the monolithic models are ill-suited.

Figure 2. Multimorbid patients often experience medication conflicts and pharmacological omissions in real-world prescribing due to fragmented care and incomplete analysis of complex information.
Contributions. To address the gap left by monolithic models, we argue for a paradigm shift from end-to-end generation to collaborative multi-agent synthesis. In this paper, we develop this paradigm by introducing PRISMATIC, a multi-agent architecture designed to navigate the complexities of multimorbid prescribing by explicitly modeling the distributed reasoning process of the clinical scenario.
This paper makes the following primary contributions:
A Novel Multi-Agent Framework for Prescription Generation. We design and implement PRISMATIC, a complete system that generates safer and more coherent prescriptions by proactively synthesizing fragmented clinical data and resolving conflicts.
Two Adaptive Agent Coordination Mechanisms. We propose DSWA (Dynamic Self-updating Weight Adjustment) for long-term organizational learning and DFPC (Discrepancy Feedback Precise Calibration) for short-term, case-specific conflict resolution.
Comprehensive Empirical Validation. We conduct extensive experiments on the combined MIMIC-IV Note [11] and MIMIC-IV Hosp [10] datasets, demonstrating that PRISMATIC significantly outperforms strong LLM and fine-tuned baselines in reducing drug conflicts, improving therapeutic coverage, and ensuring treatment consistency.
Related Works
Multi-Agent System in Medications. Multi-agent systems have long been explored in healthcare due to their decentralized, modular nature, which enables distribution of specialized tasks and supports dynamic decision-making in complex clinical settings. As one of the early explorations nearly two decades ago, [19] proposed a rule-based agent framework to support doctor–patient collaboration and personalized hospital assistance. A decade later, [1] introduced a multi-agent system for managing patient flow and hospital resource allocation.
More recently, with the rapid advancement of AI and large language models (LLMs), multi-agent systems have evolved significantly, overcoming prior limitations in perception and interaction [13]. Recent systems leverage LLMs to enhance clinical decision-making [7], support surgical workflows with chain-of-thought reasoning [14], and enable collaborative diagnostic reasoning among doctor agents [5]. Others incorporate verified knowledge tools [9] or adaptive frameworks mimicking real-world clinical decision-making [12]. These developments underscore the growing sophistication and promise of LLM-powered multi-agent systems in improving healthcare delivery.
Preliminary: Problem Definition
Our work addresses the challenge of medication recommendation for multimorbid patients at the point of hospital admission. The core task is to generate a safe and effective prescription plan based solely on the clinical narrative available in the patient’s record. This narrative, which we denote as input , comprises the main complaints of the patient , personal and historical information , and other risk factors , such as allergies or lifestyle habits. The general input can be summarized as .
The desired output is a complete prescription, , which includes both a list of drugs as well as a clinically sound interpretation. Specifically, a prescription consists of a drug list and an accompanying interpretation . Each recommended drug in the list is detailed with the precautions , the dosage and frequency , and a clear explanation for its inclusion. Thus, the final output is , where .
A Multi-Objective Optimization Problem
As established in the Introduction, prescribing for multimorbid patients is fundamentally a coordination problem arising from fragmented clinical expertise. Here, we formalize the desired outcome of this coordination process. A successful prescription can be viewed as a solution to a multi-objective optimization problem, where the system must simultaneously satisfy several critical constraints related to safety, rationality, and interpretability. The overall goal is to find an optimal prescription that maximizes a set of objectives: .
Safety is the foremost concern. A valid prescription must be free of harmful drug-drug interactions (DDI) between any two medications in the plan. Furthermore, it must avoid drug-patient interactions (DPI), ensuring that the medication does not conflict with the existing conditions or allergies of the patient. Finally, the dosage for every drug must be within a clinically accepted rational range.
Pharmacological Rationality ensures that the prescription is both effective and efficient. This involves two main aspects. First, the plan must have high coverage, which means that all primary symptoms and therapeutic needs are addressed. Second, it must avoid duplication, where multiple drugs are prescribed for the same condition, leading to redundancy and increased risk. The goal is to maximize therapeutic coverage while simultaneously penalizing redundancy. This trade-off is perfectly captured by: Rationality() = Coverage() - Duplication().
Interpretability requires that the final drug list should be transparent, traceable, and auditable by human experts. This is especially vital to ensure that nuanced patient-specific risk factors, which we categorize as Other Information (OI), have been properly considered. These factors include the patient’s lifestyle (e.g., alcohol use), administration constraints (e.g., inability to swallow pills), or in a specific population with unique contraindications (e.g., pregnancy). Therefore, a complete solution must generate not just a prescription, but also clear evidence-based justifications for its recommendations.
Baseline Approaches
To benchmark our method, we compare it against two primary baseline paradigms that represent the current state-of-the-art in this domain:
General-Purpose LLM Generation: This approach uses a powerful, general-purpose large language model (e.g., GPT-4). The entire patient record is formatted into a prompt with specific strategies (zero-shot, few-shot, etc.), and the LLM is directly asked to generate a prescription . This method tests the out-of-the-box reasoning capabilities of a leading foundation model.
Specialized Medical LLM Generation: This paradigm utilizes a large language model that has been specifically developed for the medical domain. These models are pre-trained on extensive corpora of biomedical literature, clinical guidelines, and electronic health records. As a result, they possess deep domain knowledge and are expected to generate more clinically sound outputs than the general-purpose counterparts. The process remains end-to-end, taking as input to produce . This baseline represents a strong, knowledge-intensive competitor that leverages a state-of-the-art domain-expert model.
Methodology – PRISMATIC
To solve the multi-objective coordination problem of multimorbid prescribing, we introduce PRISMATIC, a multi-agent architecture. Conceptually, the architecture acts as an intelligent prism: it takes unstructured clinical text as input, "refracts" it through the specialized perspectives of multiple agents, and synthesizes their insights into a single, coherent prescription. The whole process is governed by a dual-loop learning design:
An Inner Loop (DFPC) handles the collaborative reasoning and refinement required to generate a prescription for a single patient case.
(2) An Outer Loop (DSWA) enables long-term, system-wide adaptation and learning across multiple cases.
The architecture consists of six specialized agents whose roles are explicitly designed to address the objectives defined in our problem formulation. The conceptual architecture is shown in Figure 3.

Figure 3. Complete workflow of PRISMATIC
The Agents: A Society of Clinical Specialists
The PRISMATIC agent society simulates a multidisciplinary clinical team. Each agent has a distinct responsibility, and their collaboration is mediated through a shared blackboard. Their roles are summarized in Table 1.
| Agent | Core Responsibility | Key Function in the Coordination Process |
| Information Analysis (IA) | Structure the Input | Establishes the common ground for collaboration by parsing raw clinical text (T) into a structured, shared representation (Chief Complaint (CP), Patient Information (PI) on the blackboard. |
| Prescription Generation (PG) | Propose a Solution | Acts as the primary reasoner. Synthesizes the structured information {CP, PI, OI} and contextual information from the blackboard to generate an initial candidate prescription (). The prescription is then iteratively negotiated with the SC, PR, and EA agents through the inner loop (DFPC), undergoing refinement based on their feedback until a consensus is reached. |
| Safety Check (SC) | Critique on Safety | Functions as a specialized critic targeting the Safety Objective. Verifies the candidate prescription against formal safety constraints (DDI, DPI, Dosage)1 and posts specific, actionable violations for collective resolution. |
| Pharm. Rationality (PR) | Critique on Rationality | Functions as a specialized critic targeting the Rationality Objective. Evaluates the prescription’s therapeutic Coverage and Duplication2 to ensure clinical efficacy and efficiency, posting its findings as feedback. |
| Evaluation Agent (EA) | Adjudicate & Decide | Serves as the coordinator and adjudicator of the inner loop. It aggregates critiques from SC and PR, assesses interpretability, and computes a unified score to decide whether to accept the prescription or trigger a refinement cycle via DFPC. |
| Reflection & Feedback (RF) | Drive Long-Term Learning | Functions as the organizational learning facilitator. It compares the final prescription to a gold standard to generate the discrepancy signal that drives the long-term adaptation of the entire system via the DSWA outer loop. |
Table 1. The PRISMATIC Agent Society: Roles and Responsibilities in the Coordination Process
The Inner Loop: Case-Level Refinement (DFPC)
The Discrepancy Feedback Precise Calibration (DFPC) mechanism governs the real-time collaboration for a single patient case. It is an iterative propose-critique-refine cycle:
Propose: The PG agent initiates a candidate prescription.
Critique: The SC and PR agents evaluate it concurrently against the safety and rationality objectives, posting their findings.
Adjudicate & Refine: The EA agent aggregates this feedback. If the prescription is unacceptable, it triggers a refinement cycle.
The key to DFPC’s efficiency and effectiveness lies in its mechanism for targeted error attribution and local calibration. Instead of restarting the generation process, the system traces a specific violation (e.g., a DDI) back to its source domain and re-engages only the relevant agents (e.g., the SC and PG). The SC provides specific feedback, and the PG performs a localized correction—such as replacing a single conflicting drug—while leaving the rest of the prescription intact. This process of decentralized refinement makes the multi-agent deliberation both computationally efficient and clinically stable.
The Outer Loop: Long-Term Adaptation (DSWA)
The Dynamic Self-updating Weight Adjustment (DSWA) mechanism enables the system to learn and improve over many cases. After the inner loop finalizes a prescription, the RF agent identifies discrepancies between the output () and a gold-standard reference (). This error signal drives the DSWA process in two ways:
First, it performs adaptive weight evolution. DSWA quantifies the errors across different clinical dimensions (e.g., DDI safety, dosage, coverage) and updates a global weight vector, W, used by the EA agent. Clinical dimensions that exhibit persistent or severe errors are systematically up-weighted, which compels the agent society to prioritize those aspects more heavily in future deliberations.
Second, DSWA triggers a distributed knowledge consolidation. Insights from the error analysis are distilled and synchronized across the agents’ knowledge bases, allowing the entire system to learn from cases. This dual process of adapting the collective evaluation policy (W) and updating shared knowledge enables the system to develop an emergent understanding of clinical priorities, mirroring how a human team’s expertise evolves with experience.
This process functions as a form of organizational learning, allowing the agent society to adapt its collective priorities over time and become more attuned to the specific challenges of its clinical environment.
Algorithm 1 Dynamic Self-updating Weight Adjustment (DSWA)
Input: Discrepancy vector ; previous weights ; smoothing factor ; learning rate ; temperature .
Output: Updated weights .
Temporal smoothing:
Compute normalized importance:
Update weights:
Normalize:
Return: Updated
Experiments
Experiment Setup
Dataset and Task. We evaluate PRISMATIC on a curated dataset from MIMIC-IV, consisting of pairs of unstructured admission notes () and their corresponding ground-truth prescriptions (). To reflect real-world clinical challenges, we stratified the dataset into three levels of case complexity (low, medium, high) based on the number of chronic diagnoses and prescribed medications per patient with K-means, which were denoted as complexity i, ii, and iii, respectively.
Evaluation Metrics. We assess performance from two critical perspectives:
(1) Accuracy and Rationality: We use Overlap Rate (OR), Precision (Prec.), and Exact Match (EM) to measure how closely the generated prescriptions match the ground truth. EM is the strictest metric, requiring a perfect match of all prescribed drugs.
(2) Safety: We use the Zero-Interaction Ratio (ZIR), which measures the percentage of generated prescriptions that are completely free of known drug–drug interactions. This metric directly evaluates the system’s ability to satisfy a primary clinical objective.
Overlap Rate (OR). Measures the proportion of gold-standard drugs correctly predicted. For the -th case:
Precision (Prec.) Measures the proportion of predicted drugs that are correct:
Exact Match Ratio (EM). Measures the fraction of predictions that exactly match the ground-truth set:
where is the indicator function returning 1 if the predicted and gold-standard sets are identical, and 0 otherwise.
Zero-Interaction Ratio (ZIR). Measures the fraction of prescriptions that are entirely free of drug-drug interactions:
where is the indicator function returning 1 if no interacting drug pair is found in , and 0 otherwise.
Baseline Methods. To demonstrate the superiority of our multi-agent architecture, we compare PRISMATIC against a comprehensive suite of strong baselines representing two main paradigms:
General-Purpose LLMs: We test the out-of-the-box reasoning of state-of-the-art models (GPT-4o, Llama-3.1, Qwen3, DeepSeek-R1) using a range of prompting strategies, including Zero-Shot, Few-Shot [2], Chain-of-Thought [24], Tree-of-Thoughts [26], and ReAct [27]. Besides, medical prompt methods, including MedPrompt [4] and OpenMedLM [15] Prompt, are also considered.
Specialized Medical Models: We include models specifically designed for the medical domain, including Meditron [6], PMC-LLaMA [25], and LLaMA-3.1-Med42 [8], which represent monolithic and knowledge-intensive competitors.
PRISMATIC Implementation. To ensure a fair and direct comparison, the agents within the PRISMATIC architecture were implemented using the same suite of base models as the baselines. For example, the row labeled PRISMATIC (GPT-4o) in our results table (Table 2) signifies an instance of our system where all agents (e.g., PG, SC, PR) utilize GPT-4o for their reasoning and generation tasks. This experimental design allows us to isolate the performance gains attributable to our multi-agent coordination and learning architecture, directly contrasting its efficacy against monolithic prompting of the exact same underlying LLM.
| Method | Model | Complexity i(%) | Complexity ii(%) | Complexity iii(%) | Complete Dataset(%) | ||||||||||||
| OR | Prec. | EM | ZIR | OR | Prec. | EM | ZIR | OR | Prec. | EM | ZIR | OR | Prec. | EM | ZIR | ||
| Zero-Shot | GPT-4o | 45.87 | 51.89 | 4.08 | 95.24 | 35.20 | 36.89 | 2.37 | 93.01 | 15.35 | 19.35 | 0.34 | 81.47 | 29.11 | 25.72 | 2.05 | 89.13 |
| Qwen-3 | 41.12 | 44.46 | 4.01 | 95.31 | 32.45 | 38.90 | 0.99 | 92.40 | 16.09 | 20.12 | 0.43 | 81.80 | 21.56 | 28.78 | 1.60 | 89.08 | |
| DeepSeek-R1 | 47.23 | 48.06 | 10.20 | 94.43 | 39.13 | 37.02 | 1.27 | 93.06 | 17.89 | 14.01 | 0.43 | 78.74 | 31.48 | 25.20 | 3.39 | 87.87 | |
| LLaMA3.1 | 45.10 | 43.29 | 6.05 | 94.49 | 29.11 | 31.78 | 1.60 | 91.19 | 13.90 | 19.91 | 0.10 | 79.74 | 32.45 | 36.40 | 2.23 | 87.65 | |
| Few-Shot | GPT-4o | 44.23 | 58.91 | 7.27 | 95.92 | 29.09 | 31.98 | 1.38 | 93.06 | 19.89 | 20.11 | 0.29 | 86.78 | 31.61 | 29.09 | 2.57 | 91.40 |
| Qwen-3 | 41.22 | 45.90 | 8.09 | 95.92 | 28.91 | 27.56 | 1.54 | 94.27 | 17.89 | 19.10 | 0.43 | 84.05 | 32.14 | 35.09 | 2.90 | 90.75 | |
| DeepSeek-R1 | 48.10 | 47.09 | 8.84 | 94.70 | 32.10 | 38.12 | 2.15 | 94.16 | 20.19 | 22.75 | 0.38 | 86.64 | 32.24 | 40.11 | 3.29 | 91.39 | |
| LLaMA3.1 | 44.23 | 43.09 | 12.10 | 95.38 | 29.78 | 25.45 | 1.49 | 92.24 | 16.78 | 17.15 | 0.38 | 78.30 | 26.61 | 32.09 | 3.96 | 87.68 | |
| CoT | GPT-4o | 49.23 | 53.17 | 11.76 | 96.06 | 34.56 | 39.09 | 1.65 | 94.16 | 16.70 | 18.94 | 0.34 | 89.32 | 37.40 | 44.30 | 3.91 | 92.80 |
| Qwen-3 | 46.76 | 47.88 | 13.66 | 95.31 | 28.78 | 27.90 | 2.70 | 95.48 | 17.55 | 21.11 | 0.62 | 79.74 | 35.81 | 39.88 | 4.89 | 89.32 | |
| DeepSeek-R1 | 51.40 | 49.20 | 12.85 | 94.43 | 34.56 | 34.23 | 1.82 | 97.80 | 19.10 | 21.88 | 0.43 | 79.31 | 31.09 | 32.23 | 4.30 | 89.69 | |
| LLaMA3.1 | 42.19 | 48.55 | 13.05 | 95.45 | 20.19 | 29.09 | 2.09 | 95.32 | 22.31 | 18.71 | 0.19 | 81.32 | 36.31 | 28.61 | 4.35 | 89.92 | |
| ToT | GPT-4o | 59.12 | 67.23 | 23.18 | 97.21 | 39.01 | 38.76 | 2.26 | 97.25 | 25.22 | 24.89 | 0.77 | 85.34 | 31.01 | 33.88 | 7.40 | 92.61 |
| Qwen-3 | 54.23 | 53.03 | 22.71 | 96.67 | 37.87 | 42.88 | 1.16 | 96.70 | 24.09 | 21.09 | 0.91 | 81.42 | 32.34 | 29.81 | 6.90 | 90.75 | |
| DeepSeek-R1 | 58.92 | 59.03 | 23.45 | 98.91 | 44.87 | 39.10 | 1.05 | 98.40 | 23.09 | 28.91 | 0.81 | 85.58 | 35.89 | 34.11 | 7.09 | 93.56 | |
| LLaMA3.1 | 60.23 | 47.12 | 17.27 | 97.42 | 35.89 | 29.12 | 1.87 | 96.70 | 19.09 | 24.35 | 0.62 | 86.78 | 28.34 | 29.01 | 5.60 | 93.04 | |
| ReAcT | GPT-4o | 53.09 | 59.13 | 22.71 | 95.92 | 39.13 | 41.90 | 1.76 | 94.27 | 31.89 | 28.90 | 0.67 | 85.68 | 37.09 | 34.89 | 7.07 | 91.39 |
| Qwen-3 | 54.09 | 57.34 | 21.75 | 95.38 | 37.71 | 35.64 | 1.60 | 93.01 | 32.90 | 35.13 | 0.34 | 82.28 | 38.90 | 38.10 | 6.62 | 89.49 | |
| DeepSeek-R1 | 53.17 | 52.94 | 21.10 | 96.53 | 33.45 | 39.12 | 2.59 | 92.62 | 31.87 | 40.19 | 0.53 | 86.59 | 40.89 | 45.34 | 6.83 | 91.35 | |
| LLaMA3.1 | 51.98 | 54.07 | 20.33 | 95.04 | 31.11 | 39.77 | 1.98 | 92.02 | 30.21 | 33.01 | 0.29 | 84.82 | 39.98 | 41.28 | 6.34 | 90.05 | |
| MedPrompt | GPT-4o | 61.11 | 70.30 | 20.46 | 98.08 | 53.98 | 59.09 | 4.90 | 94.49 | 48.77 | 43.91 | 1.44 | 92.42 | 51.30 | 49.11 | 7.81 | 94.92 |
| Qwen-3 | 59.31 | 71.24 | 22.71 | 99.25 | 51.82 | 59.32 | 3.69 | 93.67 | 40.34 | 44.71 | 0.43 | 93.81 | 45.01 | 51.03 | 7.63 | 91.40 | |
| DeepSeek-R1 | 67.34 | 75.34 | 23.18 | 99.46 | 45.99 | 54.34 | 4.52 | 96.63 | 43.98 | 49.01 | 0.38 | 80.60 | 49.30 | 52.34 | 8.02 | 91.18 | |
| LLaMA3.1 | 67.30 | 69.31 | 21.62 | 99.18 | 58.90 | 53.78 | 3.36 | 94.71 | 39.10 | 43.10 | 0.57 | 87.74 | 45.19 | 50.01 | 7.27 | 89.53 | |
| OpenMedLM | GPT-4o | 60.12 | 69.23 | 24.95 | 98.16 | 43.90 | 40.01 | 2.26 | 94.77 | 38.11 | 35.01 | 1.53 | 92.24 | 39.90 | 40.57 | 8.19 | 94.72 |
| Qwen-3 | 57.34 | 70.30 | 24.81 | 98.98 | 45.90 | 43.01 | 1.71 | 94.16 | 31.23 | 35.12 | 0.24 | 83.09 | 39.13 | 30.10 | 7.46 | 91.18 | |
| DeepSeek-R1 | 68.13 | 71.17 | 25.22 | 99.39 | 42.98 | 38.78 | 2.26 | 96.04 | 33.78 | 32.09 | 0.43 | 95.40 | 43.13 | 40.94 | 7.83 | 96.71 | |
| LLaMA3.1 | 65.10 | 65.30 | 25.76 | 97.96 | 39.01 | 35.76 | 0.22 | 96.04 | 31.09 | 32.88 | 0.57 | 77.92 | 40.88 | 41.97 | 7.27 | 89.53 | |
| SFT | Meditron | 72.01 | 74.47 | 26.51 | 98.57 | 53.89 | 53.81 | 4.30 | 96.96 | 31.80 | 38.01 | 0.48 | 92.10 | 46.09 | 42.11 | 8.89 | 95.48 |
| PMC | 73.32 | 72.91 | 32.63 | 97.48 | 49.67 | 48.91 | 2.26 | 97.19 | 38.78 | 34.09 | 0.43 | 88.07 | 47.55 | 48.10 | 9.86 | 93.73 | |
| Med42 | 78.12 | 84.69 | 31.48 | 98.98 | 55.87 | 53.40 | 1.71 | 98.40 | 49.92 | 44.11 | 0.38 | 89.75 | 51.20 | 53.98 | 9.34 | 95.20 | |
| PRISMATIC | GPT-4o | 77.22 | 81.22 | 42.22 | 99.25 | 51.09 | 62.32 | 4.02 | 97.85 | 41.23 | 43.98 | 1.72 | 97.75 | 56.81 | 60.11 | 13.58 | 98.20 |
| Qwen-3 | 75.50 | 80.32 | 29.16 | 99.18 | 59.78 | 57.61 | 4.30 | 97.19 | 41.34 | 49.78 | 0.96 | 96.12 | 49.13 | 55.81 | 9.80 | 97.32 | |
| DeepSeek-R1 | 77.92 | 84.90 | 37.59 | 99.66 | 69.98 | 68.11 | 4.07 | 98.51 | 48.81 | 52.77 | 0.86 | 99.47 | 56.01 | 62.23 | 12.00 | 99.20 | |
| LLaMA3.1 | 71.01 | 76.09 | 30.66 | 99.12 | 52.13 | 62.03 | 5.29 | 97.96 | 41.44 | 49.80 | 0.67 | 96.55 | 51.40 | 56.70 | 10.44 | 97.73 |
Table 2. Comparison of performance of mainstream large models in medical question-answering tasks under different complexity levels. Complexity to represents simple to complicated tasks. This table summarizes the performance of four models under various strategies and SFT medical models. Bold values indicate the best performance for each complexity level. Underline values indicates the second-best performance for each complexity.
Main Results
PRISMATIC consistently and significantly outperforms all baseline models across all metrics, with its advantage being most pronounced in safety and in managing high-complexity cases, as shown in Table 2.
Dominance in Clinical Safety. PRISMATIC achieves a new standard of safety in the generation of prescriptions. In the complete data set, it reaches a zero interaction ratio (ZIR) of 99.20%, virtually eliminating drug-drug interactions. This stands in stark contrast to the baselines; even the strongest specialized models like Meditron struggle to surpass 95%, while many advanced prompting methods fall below 93%. This dramatic improvement is a direct validation of the Safety Check (SC) agent, which functions as an explicit safety regulator, a mechanism fundamentally absent in the monolithic design of baseline models.
Superior Accuracy in High-Complexity Cases. PRISMATIC’s superiority extends to accuracy and pharmacological rationality. The escalating difficulty of this task is visualized in the performance heatmap in Figure 4. As the number of chronic diseases and prescribed medications increases, corresponding to the green-to-red transition in the heatmap, all models are challenged. However, while the monolithic baselines suffer a catastrophic performance decay in these high-complexity scenarios, PRISMATIC’s performance degrades far more gracefully. It maintains high accuracy and rationality (OR, Prec., and EM). Its 13.58% EM score on the complete dataset, more than double the next best baseline, highlights its robust ability to handle the combinatorial challenges of multimorbid prescribing. This supports our central hypothesis: a multi-agent coordination approach is fundamentally better suited for complex, multi-faceted problems than a monolithic one.

Figure 4. Heatmap of precision across varying chronic disease and prescription complexities.
Ablation Study
To validate our architectural design and quantify the contribution of each component, we conducted a comprehensive ablation study using GPT-4o as the base model. The results, presented in Table 3, confirm that PRISMATIC’s success is an emergent property of its multi-agent synergy, rather than a function of any single part.
| Component | OR | Prec. | EM | ZIR |
| w/o IA | 52.43 | 59.34 | 11.98 | 93.43 |
| w/o SC | 41.25 | 50.22 | 10.56 | 78.98 |
| w/o PR | 44.13 | 49.65 | 9.33 | 82.91 |
| w/o DSWA | 48.55 | 55.11 | 8.56 | 91.23 |
| w/o DFPC | 49.56 | 59.22 | 7.42 | 89.35 |
| w/o EA | 54.90 | 67.23 | 12.78 | 95.09 |
| w/o RF | 55.89 | 58.06 | 12.87 | 96.00 |
| PRISMATIC | 56.81 | 60.11 | 13.58 | 98.20 |
Table 3. Ablation study results for the PRISMATIC model with GPT-4o across various components. Bold values indicate the validity of PRISMATIC.
The Critical Role of Coordination and Learning Mechanisms. The study reveals that the dual-loop learning mechanisms are the most critical drivers of overall prescription accuracy. Removing the inner-loop refinement protocol, DFPC, causes the most significant drop in overall performance, reducing the exact match (EM) score by nearly half, from 13.58% to 7.42%. This highlights that iterative, multi-agent negotiation is the single most important factor in achieving a complete and correct prescription. Similarly, removing the long-term adaptation mechanism, DSWA, also severely degrades performance, with the EM score falling to 8.56%. This confirms the necessity of organizational learning for mastering the complexities of the task.
Indispensable Contributions of Specialist Agents. The ablations of the specialized "critic" agents provide irrefutable evidence for their roles:
Removing the Safety Check (SC) agent is catastrophic for patient safety. The Zero Interaction Ratio (ZIR) falls from a near-perfect 98.20% to an unacceptable 78.98%. This 19-point drop is a clear and powerful demonstration that an explicit, dedicated safety agent is non-negotiable for generating clinically safe prescriptions.
Removing the Pharmacological Rationality (PR) agent significantly harms the prescription’s therapeutic value, causing the Overlap Rate (OR) to fall from 56.81% to 44.13%. This validates its essential function in ensuring that prescriptions are both comprehensive and efficient.
The ablation study demonstrates that each agent and mechanism in the system contributes uniquely within its designated scope, collectively enhancing the overall performance of the prescription generation framework. Overall, each component fulfills its role and adapts seamlessly to the multi-agent workflow, resulting in a robust, safe, and clinically rational prescription generation system.
Analysis and Discussion
Emergent Learning and Priority Adaptation in DSWA
A core claim of our work is that PRISMATIC performs organizational learning. Figure 5 provides direct visual evidence of this emergent behavior by plotting the evolution of the six objective weights governed by the DSWA mechanism.

Figure 5. Evolution of risk weights across six dimensions in the DSWA mechanism. Every 500 cases per iteration round. The line graph illustrates how weights dynamically adjust over time.
The graph visualizes the clear and intelligent adaptation process of the system. Initially, all weights start from a preset value, which is adopted from . However, over thousands of cases, the system learns to prioritize different clinical objectives based on historical error patterns. The weights for Dosage and Coverage steadily increase, indicating that these are complex, nuanced aspects where the system frequently makes initial errors that require correction. In response, the DSWA mechanism adaptively up-weights their importance, compelling the agent society to allocate more attention to them. Conversely, the weight for Duplication gradually decreases, suggesting this is a more straightforward constraint that the system learns to satisfy relatively quickly.
Crucially, the safety-related weights (DDI and DPI) remain consistently high, reflecting their non-negotiable importance. This dynamic reallocation of priorities is a hallmark of adaptive learning. The system autonomously identifies its own weaknesses and strategically adjusts its collective evaluation policy, demonstrating an emergent intelligence that monolithic, static models lack.
Error Analysis: The Challenge of Replicating Expert Judgement
Although PRISMATIC significantly outperforms all baselines, its absolute Exact Match (EM) score of 13.58% underscores the profound difficulty of fully replicating the nuanced decision-making of human clinicians. We denoted this gap between the system’s output and the ground truth stems from several sophisticated clinical challenges:
Omission of Ancillary Medications: The system excels at identifying core treatments but sometimes omits secondary medications for symptomatic relief or preemptive care (e.g., anti-nausea drugs). These adjunct medications, while not central, are crucial for holistic patient care.
Suboptimal Selection Among Equivalent Drugs: When faced with multiple drugs with similar pharmacological effects, the system may not select the specific drug a clinician would prefer based on implicit factors such as patient tolerance, cost, or local hospital formulary.
Difficulty with Implicit Clinical Context: The system is limited to the explicit text of the clinical note. It cannot yet infer the subtle, unwritten context or draw upon the years of experiential knowledge that inform an expert’s "clinical intuition."
These observations are illustrated with concrete examples in the Appendix, where specific cases highlight the circumstances under which each of these defects manifests.
These limitations are not merely model defects but represent the frontier of clinical AI. Addressing them will require future work on more advanced reasoning mechanisms, integration with diverse knowledge sources (e.g., pharmacoeconomics), and new agent designs capable of handling implicit and commonsense clinical knowledge.
Conclusion
This paper addressed the critical challenge of generating safe and rational prescriptions for multimorbid patients by reframing it as a multi-agent coordination problem. We introduced PRISMATIC, a novel architecture whose performance validates this perspective. By assigning specialized reasoning tasks to distinct agents and governing their interactions with two learning mechanisms: case-level refinement (DFPC) and long-term policy adaptation (DSWA), our system effectively manages the competing objectives inherent in clinical practice. PRISMATIC successfully navigates the trade-offs between clinical safety, efficacy, and rationality. Its decisive outperformance of strong baseline models, especially in eliminating safety risks and mastering high-complexity cases, provides compelling evidence for the superiority of this agent-based paradigm. PRISMATIC serves as a blueprint for building more robust and interpretable clinical AI, suggesting that structuring complex reasoning as a collaborative process is a promising path forward. It also indicates that the future of AI in high-stakes domains like medicine may lie not in ever-larger models, but in smarter multi-agent coordination.
Acknowledgment
The authors thank anonymous colleagues for their helpful discussions. This work received no external funding.
The authors used AI-assisted writing tools for language editing purposes only. All content and ideas were developed by the authors.
Ethics
This study does not involve direct experimentation on human or animal subjects. All data used were either publicly available or properly anonymized to ensure that no personally identifiable information (PII) was involved. This study uses the MIMIC-IV database, a publicly available, de-identified dataset of critical care patients. Access to MIMIC-IV is governed by the PhysioNet Credentialed Health Data License 1.5.0, which permits non-commercial research use under strict conditions to protect patient privacy. All authors complied with the data usage agreement and completed the required human subjects research training. No attempt was made to re-identify any individuals. The use of this dataset adheres to relevant ethical guidelines and institutional standards.
References
- [1]N. Benhajji, D. Roy, and D. Anciaux. 2015. Patient-centered multi agent system for health care. IFAC-PapersOnLine 48, 3 (2015), 710–714. https://doi.org/10.1016/j.ifacol.2015.06.166 15th IFAC Symposium on Information Control Problems inManufacturing.
- [2]Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. 2020. Language Models are Few-Shot Learners. arXiv:2005.14165 [cs.CL] https://arxiv.org/abs/2005.14165
- [3]Elizabeth M Camacho, Sean Gavan, Richard Neil Keers, Antony Chuter, and Rachel Ann Elliott. 2024. Estimating the impact on patient safety of enabling the digital transfer of patients’ prescription information in the English NHS. BMJ Quality & Safety 33, 11 (October 2024), 726–737. https://doi.org/10.1136/bmjqs-2023-016675 Published online 2024 Oct 18; PMC11503046.
- [4]Xuhang Chen, Chi-Man Poon, and Shuqing Wang. 2023. MedPrompt: Cross-Modal Prompting for Multi-Task Medical Image Translation. arXiv:2310.02663 [cs.CV] https://arxiv.org/abs/2310.02663
- [5]Xi Chen, Huahui Yi, Mingke You, WeiZhi Liu, Li Wang, Hairui Li, Xue Zhang, Yingman Guo, Lei Fan, Gang Chen, Qicheng Lao, Weili Fu, Kang Li, and Jian Li. 2025. Enhancing diagnostic capability with multi-agents conversational large language models. npj Digital Medicine 8, 1 (2025), 159. https://doi.org/10.1038/s41746-025-01550-0
- [6]Zeming Chen, Alejandro Hernández Cano, Angelika Romanou, Antoine Bonnet, Kyle Matoba, Francesco Salvi, Matteo Pagliardini, Simin Fan, Andreas Köp̈f, Amirkheirn Mohtashami, Alexandre Sallinén, Alireza Shakibaid, Vinítra Swamy, Igor Krawczuk, Deniz Bayazit, Axel Marmet, Syrielle Montariol, Mary-Anne Hartley, Martin Jaggi, and Antoine Bosselut. 2023. MEDMTRON-70B: Scaling Medical Pretraining for Large Language Models. arXiv:2311.16079 [cs.CL] https://arxiv.org/abs/2311.16079
- [7]Zhen Chen, Zhihao Peng, Xunsheng Liang, Cheng Wang, Peigan Liang, Linsheng Zeng, Minjie Ju, and Yixuan Yuan. 2025. MAP: Evaluation and Multi-Agent Enhancement of Large Language Models for Inpatient Pathways. arXiv:2503.13205 [cs.AI] https://arxiv.org/abs/2503.13205
- [8]Clément Christophe, Praween K Kanith, Tathagata Raha, Shadab Khan, and Marco AF Pimentel. 2024. Med42-v2: A Suite of Clinical LLMs. arXiv:2408.06142 [cs.CL] https://arxiv.org/abs/2408.06142
- [9]Shanghai Gao, Richard Zhu, Zhenglun Kong, Ayush Noori, Xiaorui Su, Curtis Ginder, Theodoros Tsiligrakidis, and Marinka Zitnik. 2025. TextAgent: An AI Agent for Therapeutic Reasoning Across a Universe of Tools. arXiv:2503.10970 [cs.AI] https://arxiv.org/abs/2503.10970
- [10]Alistair Johnson, Lucas Bulgarelli, Tom Pollard, Brian Gow, Benjamin Moody, Steven Horng, Leo Anthony Celi, and Roger Mark. 2024. MIMIC-IV (version 3.1). https://doi.org/10.13026/kpb9-mt58 Accessed: 2025-05-19.
- [11]Alistair Johnson, Tom Hong, Paul Stern, Roger Mark, Leo Anthony Celi, and Roger Mark. 2023. MIMIC-IV-Note: Deidentified free-text clinical notes (version 2.2). https://doi.org/10.13026/1n74-ne17 Accessed: 2025-05-19.
- [12]Yubin Kim, Chanwoo Park, Hyeon Jeong, Yik Siu Chan, Xuhai Xu, Daniel McDuff, Hyoonhoon Lee, Marzyeh Ghassemi, Cynthia Breazeal, and Hae Won Park. 2024. MDAgents: An Adaptive Collaboration of LLMs for Medical Decision-Making. arXiv:2404.15155 [cs.CL] https://arxiv.org/abs/2404.15155
- [13]Xinyi Li, Sai Wang, Siqi Zeng, Yu Wu, and Yi Yang. 2024. A survey on LLM-based multi-agent systems: workflow, infrastructure, and challenges. Vicingearh 1, 1 (2024), 9. https://doi.org/10.1007/s44336-024-00009-2
- [14]Chang Han Low, Ziyue Wang, Tianyi Zhang, Zhitao Zeng, Zhu Zhuo, Evangelos B. Mazonemos, and Yueweng Jin. 2025. SurgRAW: Multi-Agent Workflow with Chain-of-Thought Reasoning for Surgical Intelligence. arXiv:2503.10265 [cs.AI] https://arxiv.org/abs/2503.10265
- [15]Jenish Maharjan, Anurag Garikipati, Navan Preet Singh, Leo Cyrus, Mayank Sharma, Madalina Ciobanu, Gina Barnes, Rahul Thapa, Qingqing Mao, and Ritankar Das. 2024. OpenMedLM: Prompt engineering can out-perform fine-tuning in medical question-answering with open-source large language models. arXiv:2402.19371 [cs.CL] https://arxiv.org/abs/2402.19371
- [16]Yukinori Mashima, Takashi Tamura, Jun Kunikata, Shinobu Tada, Akiko Yamada, Masatoshi Tanigawa, Akiko Hayakawa, Hirokazu Tanabe, and Hideto Yokoi. 2022. Using Natural Language Processing Techniques to Detect Adverse Events From Progress Notes Due to Chemotherapy. Cancer Informatics 21 (2022), 11769351221085064. https://doi.org/10.1177/11769351221085064 arXiv:https://doi.org/10.1177/11769351221085064 PMID: 35342285.
- [17]Sze Kiang Ng, Richmond Tawiah, Susan M. Sawyer, and Paul A. Scuffham. 2018. Patterns of multimorbidity and health conditions: a systematic review of analytical methods and comparison analysis. International Journal of Epidemiology 47, 5 (2018), 1687–1704. https://doi.org/10.1093/ije/dyy134
- [18]Jie Pan, Seungwon Lee, Cheligeer Cheligeer, Elliot A Martin, Kiarash Riazi, Hude Quan, and Na Li. 2025. Integrating large language models with human expertise for disease detection in electronic health records. Computers in Biology and Medicine 191 (2025), 110161. https://doi.org/10.1016/j.compbiomed.2025.110161
- [19]Marcela D. Rodriguez, Jesus Favela, Alfredo Preciado, and Aurora Vizcaino. 2005. Agent-based ambient intelligence for healthcare. AI Commun. 18, 3 (Aug. 2005), 201–216.DOI
- [20]Isabel Segura-Bedmar, Paloma Martínez, and César de Pablo-Sánchez. 2010. Extracting drug-drug interactions from biomedical texts. BMC Bioinformatics 11, 5 (2010), P9. https://doi.org/10.1186/1471-2105-11-5-P9
- [21]Isabel Segura-Bedmar, Paloma Martínez, and César de Pablo-Sánchez. 2011. A linguistic rule-based approach to extract drug-drug interactions from pharmacological documents. BMC Bioinformatics 12, 2 (2011), S1. https://doi.org/10.1186/1471- 2105-12-S2-S1
- [22]Kim Siegerma, Martijn Evers, Sanne Bots, Floor Groepenhoff, Yolande Appelman, Leo Hofstra, Igor Tulevski, Gert-Jan L. Somsen, Hester de Ruijter, Maarten van Smeden, and Niek Onland-Moret. 2022. Development of a Pipeline for Adverse Drug Reaction Identification in Clinical Notes: Word Embedding Models and String Matching. JMIR Medical Informatics 10, 1 (Jan. 2022), e31063. https://doi.org/10.2196/31063
- [23]Arun James Thirunavukkarasu, Darren Shu Jeng Ting, Kabilan Elangovan, Laura Gutierrez, Ting Fang Tan, and Daniel Shu Wei Ting. 2023. Large language models in medicine. Nature Medicine 29, 8 (2023), 1930–1940. https://doi.org/10.1038/s41591-023-02448-8
- [24]Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia, Ed Chi, Quoc Le, and Denny Zhou. 2023. Chain-of-Thought Prompting Elicits Reasoning in Large Language Models. arXiv:2201.11903 [cs.CL] https://arxiv.org/abs/2201.11903
- [25]Chaoyi Wu, Weixiong Lin, Xiaoman Zhang, Ya Zhang, Yanfeng Wang, and Weidi Xie. 2023. PMC-LLaMA: Towards Building Open-source Language Models for Medicine. arXiv:2304.14454 [cs.CL] https://arxiv.org/abs/2304.14454
- [26]Shunyu Yao, Dian Yu, Jeffrey Zhao, Yueyu Du, James Shafran, Thomas L. Griffiths, Yuan Cao, and Karthik Narasimhan. 2023. Tree of Thoughts: Deliberate Problem Solving with Large Language Models. arXiv:2305.10601 [cs.CL] https://arxiv.org/abs/2305.10601
- [27]Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan, and Yuan Cao. 2023. ReAct: Synergizing Reasoning and Acting in Language Models. arXiv:2210.03629 [cs.CL] https://arxiv.org/abs/2210.03629