TL;DR
This paper introduces MANANA, a non-parametric prompt-learning framework designed to adapt Large Language Models (LLMs) to local medical prescribing practices in resource-constrained settings without updating model weights. By pairing this framework with a novel Bayesian Prompt Averaging (BPA) technique, the system can generate calibrated confidence scores, allowing it to safely recommend treatment plans for high-confidence cases and defer low-confidence ones to human specialists.
What Problem Does This Paper Address?
While LLMs demonstrate impressive medical knowledge on standardized benchmarks, these benchmarks are heavily biased toward high-income, high-resource clinical settings. When deployed in low- and middle-income countries (LMICs)—such as rural Uganda—standard LLMs often fail. The issue isn't a lack of medical knowledge, but rather the application of the wrong "priors." Standard models default to Western prescribing habits, ignoring local realities like drug stock-outs, specific cost constraints, and distinct follow-up patterns.
Furthermore, in clinical decision support systems, a model must know what it doesn't know. In overburdened healthcare systems where specialist attention is a scarce resource, an AI assistant must be capable of selective prediction: autonomously handling straightforward cases while routing ambiguous or highly uncertain cases to a specialist.
Methods
The authors propose a multi-agent, error-grounded prompt learning framework called MANANA, which operates in an iterative loop across batches of local patient data:
- The Predictor: An LLM agent that takes a patient's longitudinal history and proposes three anti-seizure medication (ASM) regimens based on its current "memory state" (prompt context).
- The Inspector: Compares the predicted regimens against the actual physician's prescription (the ground truth supervision) and generates structured error reports and candidate lessons.
- The Architect: Aggregates these lessons into an append-only evidence buffer. Crucially, it enforces a quorum rule—only lessons backed by multiple distinct cases are consolidated into the next memory state.
MANANA is evaluated in two flavors: MANANA-Single (which maintains a compact, flat list of rules) and MANANA-Multi (which dynamically spawns, edits, or prunes specialized signal-extraction agents).
To handle uncertainty, the authors introduce Bayesian Prompt Averaging (BPA). Instead of using just the final optimized prompt, BPA treats the entire trajectory of prompts generated during training as an ensemble of local estimators. By evaluating these prompt states on a small validation set, BPA computes a posterior weight for each prompt state. At inference time, it marginalizes predictions over the trajectory to output calibrated prescription probabilities and a reliable deferral signal.
Datasets
The framework was trained and evaluated on real-world, longitudinal, unstructured clinical notes from pediatric epilepsy care in Uganda:
- Cohort A: 332 patients and 1,040 visits used for training and validation.
- Cohort B: An independently collected cohort of 367 patients and 1,509 visits used strictly as a held-out transfer evaluation set to test robustness against clinical distribution shift.
- MIMIC-IV: Used as a secondary, public-data reproducibility check to ensure the framework translates to other clinical text environments.
Key Insights and Ideas
- The "Wrong Prior" Problem: Neurologist audits revealed that baseline LLM errors were driven by distribution-miscalibrated defaults (e.g., defaulting to expensive or unavailable Western drugs) rather than an inability to comprehend the patient's medical history.
- Evidence-Gated Regularization: Unlike prompt optimization techniques like TextGrad, which directly rewrite prompts based on individual feedback, MANANA’s Architect acts as a regularizer. By requiring cross-case evidence before committing a rule to memory, it prevents a single unusual patient case from corrupting global prescribing logic.
- Trajectory as an Ensemble: The prompt evolution path itself contains rich uncertainty information. Early prompts capture conservative or generic practices, while later prompts capture highly specific local adaptations. BPA elegantly exploits this trajectory to quantify model confidence.
Key Results
MANANA consistently outperformed classical machine learning baselines (Naive Bayes, XGBoost), direct prompting, and state-of-the-art prompt optimization frameworks (DSPy, TextGrad, ExpeL) across both monotherapy and complex polytherapy cases.
More importantly, BPA enabled highly effective selective prediction on the held-out Cohort B:
- 99% Precision: The system achieved near-perfect top-1 exact match accuracy when evaluating the most confident 25% of cases.
- 95% Precision: It maintained high clinical safety when auto-handling the most confident 50% of cases.
- Efficient Deferral: Lower-confidence cases were safely flagged for human specialist review, demonstrating a clear path toward safely reducing clinician burnout in underserved areas.
Limitations and Future Work
- Retrospective Thresholding: The deferral thresholds were calculated retrospectively on held-out data. Real-world deployment will require prospective calibration to handle shifting patient demographics over time.
- Practice Alignment vs. Optimality: The model optimizes for agreement with local physicians, meaning it learns to mimic existing resource constraints and clinical habits, which may not always align with idealized, textbook clinical optimality.
- Future Directions: The authors plan to extend this framework to condition prompt learning directly on patient outcomes (e.g., predicting actual seizure reduction or freedom) rather than strictly mimicking physician behavior.
Summary updated