TL;DR
General-purpose LLMs struggle with medical decision-making in low-resource clinics because they default to Western clinical guidelines rather than local realities like drug stock-outs or cost constraints. This paper introduces MANANA, a non-parametric framework that teaches LLMs local prescribing norms from just 50 patient records—without updating a single model weight—by turning mistakes into an auditable memory of clinical rules. Even better, by averaging predictions across the prompts generated during learning, the system knows when it’s out of its depth, cleanly deferring tough cases to scarce human specialists while handling routine ones at up to 99% precision.
What Problem Does This Paper Address?
Nearly 80% of the 50 million people with epilepsy live in low- and middle-income countries (LMICs), where specialist neurologists are exceedingly rare. Frontline generalist clinicians have to manage complex, longitudinal medication adjustments—dealing with breakthrough seizures, side effects, limited diagnostics, and erratic drug supplies.
While LLMs seem like an ideal way to extend specialist-level support to these clinics, most medical AI is built and benchmarked on structured, high-resource hospital datasets (like MIMIC in the US). When researchers tested an off-the-shelf LLM on unstructured clinic notes from pediatric epilepsy centers in Uganda, neurologists auditing its reasoning noticed a glaring flaw: the model didn’t lack medical knowledge; it just had the wrong priors. It kept recommending Western prescribing defaults that ignored local Ugandan clinical realities. Furthermore, in clinics with limited compute, data, and specialist time, an AI tool needs to adapt without expensive weight fine-tuning, and it must know when to say "I'm not sure" so human specialists focus only where they are needed most.
Methods
To adapt an LLM without changing its weights, the authors built MANANA, a multi-agent loop that learns an explicit, human-readable text memory over several rounds of training batches:
- The Predictor reads a patient’s cumulative visit notes (plus the current memory state) and proposes three candidate anti-seizure medication (ASM) regimens.
- The Inspector compares those guesses against what the Ugandan physician actually prescribed, logging an error report and a "candidate learning" into an append-only buffer.
- The Architect reviews this buffer after each batch. Crucially, unlike standard prompt optimizers (like TextGrad) that rewrite prompts after individual failures, the Architect enforces a strict evidence gate: it only updates memory if a pattern recurs across multiple distinct patients. It comes in two flavors: MANANA-Single (builds a compact list of text rules) and MANANA-Multi (spawns, edits, or prunes up to five "specialist" sub-agents that extract specific clinical signals from notes).
Instead of throwing away intermediate prompts and keeping only the final round's prompt, the authors introduce Bayesian Prompt Averaging (BPA). BPA treats the sequence of memory states generated across training rounds as an ensemble of distinct models. By scoring these states on a small validation set, BPA computes posterior probabilities over drug regimens—giving clinicians calibrated confidence scores rather than just uncalibrated text rankings.
Datasets
The authors evaluate their work on two newly curated, real-world longitudinal cohorts of unstructured narrative outpatient notes from pediatric epilepsy referral centers in Uganda (focusing on serial visits 1–3 across a 10-drug action space):
- Cohort A: 332 patients (1,040 visits). A tiny subset of 50 patients is used for training and 20 for validation; the rest are held out for testing.
- Cohort B: 367 patients (1,509 visits) from an independent center with different clinicians, documentation styles, and prescribing patterns—used strictly as a zero-shot transfer test.
- MIMIC-IV: Used in appendices as a public-data reproducibility check.
Key Insights and Ideas
- The unit of update acts as a regularizer: Standard prompt-rewriting algorithms easily overfit to quirky, individual medical cases, creating brittle rules. Separating error diagnosis (Inspector) from memory commitment (Architect) ensures only cross-patient clinical truths survive, creating compact, auditable rules doctors can actually read.
- Learning trajectories are "free" uncertainty ensembles: Usually, optimization is a march toward a single best prompt. Realizing that intermediate prompts represent different stages of evidence accumulation allows BPA to measure uncertainty without training multiple heavy models from scratch.
- Polytherapy is the realboss fight: Predicting single-drug regimens (monotherapy) is vastly easier than multi-drug combinations (polytherapy), where exact-match accuracy requires nailing the entire active drug set simultaneously.
Key Results
Using gpt-oss-120b as the base model, MANANA outperforms classical ML (XGBoost, Naive Bayes), rule-based tools (EpiPick), direct prompting, and prompt optimizers (DSPy, TextGrad, ExpeL).
- Strong Agreement & Transfer: By Visit 3 on Cohort A, MANANA-Multi hits 97.0% Exact Match@3 on monotherapy and 72.6% on polytherapy (jumping from 42.3% with a doctor-engineered single-agent prompt). Without retraining, it transfers cleanly to Cohort B, hitting 93.2% (monotherapy) and 69.8% (polytherapy) at Visit 3.
- BPA Boosts Accuracy & Enables Deferral: Applying BPA to the MANANA-Multi trajectory bumps overall Top-1 agreement from 66% to 70% on Cohort A, and from 73% to 75% on Cohort B.
- High-Precision Triage: Using BPA's confidence scores for selective prediction on Cohort B, the system can automatically handle the most confident 50% of cases at 95% precision, or the top 25% of cases at 99% precision, routing the ambiguous remainder to human neurologists.
Limitations and Future Work
- Agreement $\neq$ Clinical Optimality: The model is evaluated on how well it matches local physicians' prescriptions. Because local doctors operate under supply stock-outs and patient affordability limits, the AI may learn to replicate resource constraints rather than ideal biology. Future work aims to condition learning directly on patient outcomes like seizure freedom.
- Retrospective Thresholds: The deferral cutoffs were analyzed retrospectively on held-out data. Real-world deployment will require pre-specified prospective thresholds, continuous drift monitoring as patient populations shift, and strict human-in-the-loop oversight.
Summary updated