Teaching LLMs to Recommend and Defer in Underrepresented Epilepsy Care

Shreyas Rajesh, Kartik Sharma, Tonmoy Monsoor, Mehmet Yigit Turali, Richard Idro, Juliana Kayaga, Robert Sebunya, Tracy Tushabe Namata, Jessica Nichole Pasqua, Vwani Roychowdhury, Rajarshi MazumderNeurIPS 2026

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:

Figure 1: MANANA workflow. (A) During adaptation, each batch of patient records is processed with the current memory state: the Predictor proposes three regimens, the Inspector compares them with the physician prescription revealed as supervision, and the proposed candidate learnings accumulate in an append-only buffer. Once per batch, the Architect consolidates recurring cross-case signals into the next shared memory, either as a Single correction-rule list or a Multi specialist-prompt population. (B) At inference, the learned memory trajectory is treated as an ensemble of prompt states. Bayesian prompt averaging converts their candidate regimen predictions into prescription probabilities, enabling high-confidence assistance or deferral to a specialist.
  • 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).

Table 1: Main EM@3 results by cohort and regimen complexity. Values are top-3 exact match percentages; prompt-optimization rows report mean ± std over independent seeds where applicable. Light green rows mark MANANA variants; darker cells mark the best value in each column.
  • 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

Abstract

Specialist epilepsy expertise is scarce in resource-constrained settings, creating a pressing need for decision-support tools that help frontline clinicians manage longitudinal treatment. Such systems must adapt to local prescribing practices and recognize when specialist review is needed. Most public medical AI benchmarks focus on high-income clinical settings, leaving prescribing practices, medication availability, and follow-up patterns in low-resource contexts largely unrepresented. We study this problem through a multidisciplinary collaboration focused on pediatric epilepsy care in Uganda. The task is to predict anti-seizure medication regimens from longitudinal unstructured notes collected by local clinicians across serial visits. General-purpose language models achieve non-trivial agreement with physician prescriptions, but neurologists’ review of model reasoning traces shows that their errors reflect Western prescribing defaults that do not account for local clinical practices. We introduce Manana, a non-parametric prompt-learning framework that learns how to reason about local prescribing decisions from a small patient-level training set. Manana turns observed prescription errors into an auditable prompt memory, instantiated in single-agent and multi-agent variants, and outperforms classical ML models, direct LLM prompting, and prompt-optimization baselines across two independently collected Ugandan cohorts. The sequence of prompts produced during learning also provides a basis for estimating uncertainty. We exploit this through Bayesian prompt averaging (BPA), which combines predictions across the learned prompt trajectory to produce prescription likelihoods and a deferral signal. Using the same Manana-Multi trajectory, BPA improves top-1 physician-regimen agreement from 66% to 70% on Cohort A and from 73% to 75% on Cohort B while preserving top-3 coverage. More consequentially, it enables clinically meaningful selective prediction: the system can auto-handle the most confident half of cases at 95% precision, or the most confident quarter at 99% precision, while deferring lower-confidence cases for specialist review. These results suggest a path toward locally adapted clinical LLM systems that learn from limited site-specific data and reserve scarce specialist attention for the cases where uncertainty is highest.
BibTeX
@inproceedings{rajesh2026teaching,
  author = {Shreyas Rajesh and Kartik Sharma and Tonmoy Monsoor and Mehmet Yigit Turali and Richard Idro and Juliana Kayaga and Robert Sebunya and Tracy Tushabe Namata and Jessica Nichole Pasqua and Vwani Roychowdhury and Rajarshi Mazumder},
  title = {{Teaching LLMs to Recommend and Defer in Underrepresented Epilepsy Care}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=CqLMStITK3},
}
Figure