An LLM platform lets epilepsy patients text with their EEG device; in a simulation, their replies cut false seizure alarms by about 80%
In 13 inpatients at Penn's epilepsy monitoring unit, a HIPAA-compliant chatbot linked to live scalp or intracranial EEG answered questions, sent seizure and sleep alerts, and collected patient feedback; retraining the seizure detector on that feedback alone cut false alarms by 77–81% in a pseudoprospective simulation without losing sensitivity.

Background and open questions
About one-third of the world's 70 million people with epilepsy have seizures that medication does not control. Implantable devices are a less invasive option than surgery, but the FDA has approved only three of them for epilepsy. In the most positive studies, median seizure reduction levels off at up to 75% after nine years, and roughly 30% of patients improve minimally or not at all.
These devices already record information patients could use, such as rising seizure risk, missed medication or poor sleep. None of them shares it with the patient in real time. Patients also cannot easily annotate the data or help retrain the algorithms. The authors set out to test whether a device could hold a two-way conversation with a patient: explain its sensor data in plain terms, answer questions, collect symptoms, and use the patient's replies to improve its own seizure detector.
Study design
The team enrolled 13 adults in Penn's epilepsy monitoring unit who were undergoing continuous video-EEG to characterise their seizures, often for presurgical evaluation. Eleven had scalp EEG and two had intracranial EEG. Standard care was not changed.
The platform had three parts:
- Data streaming. Software pulled live EEG from the hospital network.
- Cloud analytics. A HIPAA-compliant cloud ran pretrained models: SPaRCNet for scalp seizures (trained on more than 6,000 EEGs from 2,711 patients), ONCET and WaveNet for intracranial seizures, SpikeNet for spikes, and YASA for sleep staging. It also computed phase synchrony as a marker of antiseizure medication load.
- Smartphone app. An LLM agent built on GPT-4o-mini, which the authors did not fine-tune, ran in two modes. "General chat" handled conversation and symptom logging. A "data agent" wrote SQL queries to fetch a patient's own data and present it as charts.
Patients got push alerts for high-confidence seizure and spike detections, a morning sleep report and three short surveys a day. Each input and output went through LLM moderation, and an investigator reviewed every conversation daily.
To test learning, patients labelled seizure alerts as true, false or uncertain. In a pseudoprospective simulation, the detector was retrained every 3 h on these labels and scored on later, unseen data. For safety, live sessions used only the validated baseline model. The team ran three versions of the test: patients' standard push-button alarms as labels (all 13 patients), in-app patient annotations (feature available to 11 patients, 6 of whom provided confirming annotations), and a clinician-in-the-loop version in which the model chose the ten 90-second segments it was least certain about each day for expert review.
Key results
Patients used it mostly to talk, and it answered quickly
Of the 1,307 messages, the system started 68.9% (n = 900) and patients started 31.1% (n = 407). Most patient messages (88.5%) were general conversation. The rest asked about seizures (n = 24), sleep (n = 15) or spikes (n = 8). Median response time was 1.95 s for chat and 8.69 s for data queries. The data agent answered 92.1% of retrieval tasks correctly (35/38), and the message router picked the right mode 89.7% of the time (70/78). Seizure alerts got the fastest replies: 44.8% within 10 minutes and 60.3% within 30 minutes. Spike alerts drew only 27.3% within an hour. Five patients completed the usability survey, with a mean score of 83/100, in the "excellent" range. Five of the 13 patients asked, unprompted, to keep using it after discharge.
Safety checks found no unsafe output
Moderation blocked 1.47% of patient messages (6/407) and none of the 900 AI messages. On review, all flags were benign, and the daily audits found no unsafe or clinically inappropriate AI messages.
Patient labels alone made the detector more precise
At baseline, the detectors had a median sensitivity of 0.83 and 0.47 false alarms per hour. With push-button alarms as labels, fine-tuning cut false alarms by a median of 77.8% and raised F1 by 115.4%. Simulated over the whole stay, false alarms fell from 0.469 to 0.097 per hour, F1 rose from 0.063 to 0.160, and median sensitivity stayed at 1.00.
Labels collected in the app gave similar results. Raw alerts were imprecise (sensitivity 0.136, precision 0.138), but when patients confirmed an event they were usually right: sensitivity 1.0 (5/5), precision 0.71 (5/7), negative predictive value 1.0 (19/19). Because the app raised few alerts, overall sensitivity of the combined alert-plus-annotation pipeline was only 0.085 (5/59). Retraining on these labels cut false alarms by 80.9% and raised F1 by 158.4%. Across the stay, false alarms fell from 0.736 to 0.104 per hour (−80.0%) and F1 rose from 0.021 to 0.143. In six matched patients, in-app labels and push-button labels showed no statistically significant difference, a small comparison that cannot establish equivalence.
Expert review added a further gain
In the simulated clinician-in-the-loop version, false alarms fell from 0.210 to 0.044 per hour (−82.6%) and F1 rose by 271.5%.
Clinical and industry implications
Today's epilepsy devices do not share their data with patients in real time, and an earlier implantable warning system gave only one-way feedback and needed manual algorithm retraining at intervals typically months apart. This study shows a working inpatient prototype in which the device explains its data and takes in patient feedback. In a pseudoprospective simulation, retraining the seizure detector every 3 hours on weak, imperfect patient labels cut false alarms by about 80%; live sessions used only the baseline detector. The group is preparing a trial that uses the platform to program deep brain stimulation for Parkinson's disease. The paper also describes Penn's governance setup for cloud-based clinical AI as a model for other institutions, and four of the five code components are open source.
Mechanistic interpretation
Demonstrated in the paper: In 13 EMU inpatients, an LLM agent linked to live EEG could deliver alerts, answer data queries (92.1% accurate) and collect patient labels with no unsafe outputs found on daily review. Offline, retraining the seizure detector on those weak labels lowered false alarms by 77–81% without losing baseline sensitivity, and simulated clinician review of model-selected segments lowered them by 82.6%.
Author hypotheses: The authors propose that patient-in-the-loop retraining, checked by occasional clinician review, could let devices adapt in outpatient use with only rare expert input, and that the same design could extend to deep brain stimulation programming, cardiac devices, insulin pumps and neuropsychiatric care. None of this has yet been tested.
Limitations and uncertainties
- The study was small and short: 13 patients at one center, possibly skewed toward people who like technology, over a median stay of under 5 days. Usability data come from only 5 patients.
- The EMU is an artificial setting. Medications are reduced and seizures are provoked, so the results show feasibility, not everyday decision support at home.
- The detection gains are pseudoprospective. Live sessions used only the baseline detector, and sensitivity did not improve.
- Even after fine-tuning, the false alarm rate was still about 2–4 per day, which could burden some patients. The detectors were lightweight models chosen for real-time use, not the state of the art.
- The in-app surveys were not validated epilepsy outcome measures. Video and ECG were recorded but not used.
- Patients were told to press the clinical alarm button first, so few reported seizures through the app.
- GPT-4o-mini was limited by design to delivering information and retrieving data, not making clinical judgments.
- Still unresolved: over-reliance on the system, how to show uncertainty, who is clinically responsible, how to keep re-evaluating fast-changing models, and whether outpatient use reduces seizures or emergency visits.
- Goldblum, Shi and Litt are named inventors on a pending US provisional patent that covers the system.
- The other authors declare no competing interests. Funding: NIH Pioneer Award (DP1-NS-122038) and other NIH and foundation grants.
Authors and source
Goldblum Z, Shi H, Xu Z, et al. Human–artificial intelligence collaboration for comanaging epilepsy in real time. Nature Medicine. Published 13 October 2026. https://doi.org/10.1038/s41591-026-04680-4 (open access). Penn Medicine press release, 13 October 2026: https://www.pennmedicine.org/news/ai-platform-allows-patients-to-text-with-their-medical-device
Numbers are as reported by the authors. Corrections: contact@
Related science
MedGemma brings open medical vision-language models to Gemma 3
One open-weight model family, medically tuned from Gemma 3, spanning medical images and text
Rentosertib phase 2a: 21/54 aging-clock comparisons significant
A cell cluster with red-marked molecules, showing proteomic aging-related changes
511 AI antibodies benchmarked: only 9.8–13.8% beat the control in Challenge 2
Many antibodies pointing at a green antigen, with the best binder in red
One email, with links to every paper. Reports and custom landscapes: contact@inlightbio.com.
Opens your email app with a pre-filled request; we add you by hand. Free, unsubscribe any time.


