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.
How Manana learns. Commit only what recurs.
A Predictor, an Inspector, and an Architect turn prescription errors into readable memory, one recurring lesson at a time. It plays on its own; drag the timeline to move through it.
Read the visit
The Predictor reads the current clinic note together with earlier notes and earlier prescriptions.
Propose three regimens
It proposes three candidate regimens over the clinic's 10 anti-seizure medications, conditioned on the current memory.
Check against the physician
The Inspector sees what the physician actually prescribed, diagnoses the miss, and writes one candidate lesson grounded in the note.
Collect evidence
Lessons go into an append-only evidence buffer, tagged with the visit they came from. Nothing changes the prompt yet.
Commit only what recurs
The Architect adds a lesson to memory only when at least two different visits support it. Single adds one rule per round; Multi spawns, edits, or prunes specialist agents. 15 rounds, 50 patients, no weight updates.
Deploy with BPA
Every memory state from learning becomes a voter. Bayesian prompt averaging weights them by validation evidence and merges their candidates into regimen probabilities: confident cases are recommended, the rest are deferred.
From a clinic in Uganda to a recommendation.
Pediatric epilepsy care in Kampala, where specialist neurologists are scarce. Manana learns local prescribing from clinic notes, then decides when to recommend and when to ask a specialist.
Clinical partners: Makerere University and St. Francis Hospital Nsambya. Notes are free text written by local clinicians across serial visits.
Watch one visit go through Manana
Illustrative walkthrough. Both visits are synthetic and written for this page. Specialist names come from Manana-Multi's learned memory; their outputs and the probabilities are hand-written to show the workflow.
What it learns
Same supervision, very different artifacts.
Real learned prompts from each method, copied verbatim from the repository.
Detailed prose, weak grounding
Reads like a guideline, but invents doses, lab schedules, and stock levels that drug-set labels cannot support.
- Primary generalized tonic-clonic seizures in Ugandan children are treated first-line with valproate monotherapy; dose 15-30 mg/kg/day, max 60 mg/kg/day, with baseline liver-function tests before any dose change and repeat testing at 2 weeks then every 3 months.
- For children >15 kg use 200 mg valproate tablets; for <=15 kg use 100 mg/5 mL syrup, keeping volume <=5 mL per dose.
- Focal-onset seizures are treated first-line with carbamazepine; start 5-10 mg/kg/day divided BID, titrate to <=30 mg/kg/day, and limit to <=15 mg/kg/day in children with generalized hypertonia or cerebral palsy.
- Levetiracetam is a modest-penalty adjunct after documented valproate failure, defined as >=2 breakthrough seizures in 30 days on therapeutic valproate; start 0.2 mg/kg/day BID, titrate to 5-10 mg/kg/day, and obtain renal function before initiation.
- Pill-burden constraint: total tablets per dose <=2 and <=4 tablets per day; liquid formulations count as a single dose; exceed only for life-threatening seizure frequency.
- Resource availability: valproate tablets stocked nationwide; syrup limited to referral hospitals; carbamazepine tablets widely available; levetiracetam often stock-out at peripheral clinics; phenobarbital universally stocked.
- Cost hierarchy: zero-penalty agents are valproate, carbamazepine, and phenobarbital; modest-penalty agents are levetiracetam and lamotrigine; high-penalty agents are clobazam, clonazepam, ethosuximide, phenytoin, and topiramate.
- Monitoring schedule: valproate requires baseline LFT, repeat 2 weeks after change, then every 3 months; carbamazepine requires trough level after any dose increase >5 mg/kg/day or after breakthrough; phenobarbital requires platelet count and LFT every 6 months.
Useful but generic
Plausible best practice, but never names the local, drug-specific patterns.
- When several guideline-appropriate first-line drugs are suitable for initiation, select the medication most commonly used locally, considering safety, patient-specific factors, and documented physician preference.
- When no current antiepileptic medication is documented, choose the appropriate first-line drug based on seizure type, epilepsy classification, age-specific safety, weight-based dosing, and the locally endorsed treatment hierarchy: formulary, cost, and common prescribing patterns.
- When multiple drug actions are clinically justified, such as adverse effect, ineffectiveness, or need for addition, combine all necessary actions in a single option; otherwise limit each option to one clearly justified action.
- Prioritize continuation of a drug that is already prescribed unless the notes explicitly indicate ineffectiveness, adverse effects, or a need for change.
- For pediatric patients, calculate the antiepileptic dose using the most recent weight measurement, apply the recommended mg/kg range, and round to the nearest available tablet or syrup strength.
- Before stopping a medication, verify that it has been initiated for at least 4 weeks without reported adverse effects or lack of efficacy; recent initiation without issues warrants continuation unless the notes explicitly advise otherwise.
A sharper interface, no clinical memory
Better task formatting and parsing, but nowhere for lessons to accumulate.
Task: Predict the antiepileptic drug (ASM) prescription for a patient seen at the Uganda epilepsy clinic, based solely on the free-text clinical notes provided. The output must be three ranked regimen options, each showing the drug name followed by an action (continue, start, or stop). The reasoning must be brief. INPUT FORMAT The only input the model will receive is a single string called clinical_notes. The notes contain: - Patient demographics (age, sex, weight, etc.) - Clinical history, seizure description, examination findings - Investigation results (EEG, imaging) - A "Current drug regimen" section that may list one or more ASMs, sometimes with dosing instructions or a date of initiation. - A separate "Prescription" or "Plan" section that may contain explicit instructions such as "start carbamazepine", "stop valproate", "step sodium valproate to 500 mg BD", "increase dose", "add clobazam", etc. OUTPUT FORMAT The assistant must return exactly three options in the order option_1, option_2, option_3. Each option is a comma-separated list of <drug>:<action> pairs. - <drug> must be one of the allowed drug names exactly as written: carbamazepine, clobazam, clonazepam, ethosuximide, lamotrigine, levetiracetam, phenobarbital, phenytoin, topiramate, valproate - <action> must be one of: continue, start, stop No other text, punctuation, or formatting is allowed. Example: option_1: valproate:continue option_2: valproate:continue, levetiracetam:start option_3: valproate:stop, lamotrigine:start After the three options, include a short reasoning paragraph (1-2 sentences) that explains why the options were chosen. The reasoning must not list doses, dates, or any information that is not needed for the decision. … (full prompt in the repository)
Compact, evidence-gated rules
Short rules naming specific drugs and situations, each backed by several patients.
- When a pediatric patient is already on a tolerated antiseizure medication with documented seizure control and no adverse effects, and the clinical note contains no explicit instruction to modify therapy, continue the current drug and dose unchanged.
- For pediatric focal epilepsy where carbamazepine is tolerated and at a therapeutic dose but seizures remain partially controlled, add levetiracetam as adjunctive therapy before changing the primary agent.
- In Lennox-Gastaut syndrome, when a patient is already receiving valproate and experiences breakthrough seizures, add clobazam as an adjunctive agent rather than increasing the valproate dose; discontinue carbamazepine if it is part of the regimen because it can exacerbate drop attacks.
- For pediatric patients with generalized genetic epilepsy, valproate monotherapy is the preferred first-line antiseizure medication; if the child is already on valproate, seizure-free, and tolerating the drug, continue the regimen unchanged.
- In infants and young children with focal epilepsy who remain symptomatic on a sodium-channel blocker, phenobarbital is an appropriate first add-on antiseizure medication, particularly in low-resource settings where it is readily available and tolerated.
- In children on stable valproate therapy, a solitary fever-related breakthrough seizure does not warrant dose escalation or medication change; continue the current valproate dose unless the clinician explicitly orders a modification.
- If the clinical note explicitly instructs continuation of the current antiseizure medication at the same dose, maintain that regimen unchanged, even if seizures are ongoing, unless a contradictory directive to modify therapy is present.
- When a medication is prescribed with a specific limited duration or is absent from the current prescription list without an explicit instruction to continue, assume the drug has been discontinued and do not automatically carry it forward to subsequent visits.
Specialists, not prescribers
Five agents that each surface one clinical signal and never prescribe.
Identify every antiepileptic drug mentioned in the current or prior regimen. For each drug, determine whether the clinician explicitly states to continue, increase, decrease, stop, add, or start that drug. If the note contains an explicit continuation directive with no mention of new or discontinued drugs, state that the regimen should be maintained unchanged and do not suggest adjuncts or stops.
Act as a clinical pharmacology specialist aware of the clinic's local formulary and cost considerations. When the note describes uncontrolled seizures despite a first-line antiepileptic and mentions formulary or affordability constraints, assess whether carbamazepine is listed as a recommended adjunct in this setting.
Identify whether the note describes focal, generalized, multifocal, or mixed seizures. Note focal components even when the overall diagnosis is multifocal or generalized, and state which seizure-type signals may influence antiepileptic selection.
Evaluate carbamazepine or oxcarbazepine as a first-line or adjunct antiepileptic. Examine seizure type, prior drug exposure, local formulary or cost constraints, contraindications, and any statement that a new AED was initiated.
Scan EEG, neuroimaging, and cerebral dysfunction findings. If they indicate generalized, mixed, or diffuse seizure pathology, surface a signal that broad-spectrum antiepileptic coverage such as valproate should be considered.
Results
Trained on Cohort A. Holds up on Cohort B.
Two independently collected Ugandan pediatric epilepsy cohorts: 699 patients, 2,549 visits. EM@3 means one of the three proposed regimens exactly matches the physician's prescription.
| Monotherapy | Polytherapy | |||
|---|---|---|---|---|
| Method | Visit 1 | Visit 3 | Visit 1 | Visit 3 |
Recommend or defer
Act on the confident cases. Defer the rest.
BPA gives every visit a confidence score. Pick how many cases the system handles; the rest go to a specialist.
From Table 3 of the paper (Manana-Multi, held-out test sets). Thresholds are retrospective.
Is the confidence honest?
Binned BPA confidence against how often the top regimen matched the physician. Points near the diagonal mean the score can be trusted.
More results
It holds beyond the main setting.
Works on public US hospital data
Beats medical-tuned models
Learned memory transfers to a smaller model
Matches a doctor-designed council
Results measure agreement with local physicians, not clinical outcomes. Not validated for autonomous prescribing.
Citation
BibTeX
@inproceedings{rajesh2026manana,
title = {Teaching {LLMs} to Recommend and Defer in Underrepresented Epilepsy Care},
author = {Rajesh, Shreyas and Sharma, Kartik and Monsoor, Tonmoy and
Turali, Mehmet Yigit and Idro, Richard and Kayaga, Juliana and
Sebunya, Robert and Namata, Tracy Tushabe and
Pasqua, Jessica Nichole and Roychowdhury, Vwani and
Mazumder, Rajarshi},
booktitle = {Advances in Neural Information Processing Systems},
year = {2026},
eprint = {2606.31036},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2606.31036}
}