TRANSMISSION // 2611.04126v1
GlucoAgent tests a case-by-case approach to glucose forecasting
Source published
A preprint reports that an AI system that writes and runs its own analyses can improve glucose forecasts by drawing on meal logs, wearable measurements and personal history. Gains from adding multimodal context were strongest for 60-minute-ahead forecasts in post-meal situations. However, the main multimodal evaluation involved only nine people and did not establish clinical safety or benefit.

A glucose reading shows where someone’s glucose is now, but forecasting its next move may require context: a recent meal, physical activity or responses to similar events. GlucoAgent explores whether a language model can choose a different numerical analysis for each forecast instead of applying one fixed forecasting procedure.
A forecast built for the moment
In the preprint GlucoAgent: Personalized Glucose Forecasting from Multimodal Personal Context, Xingzhi Sun, Hyo Jin Kim, Zhiyuan Wang and Hao Chen investigate short-term glucose prediction using an AI agent that writes and executes Python code. The authors’ central argument is that different information matters at different moments: past meal responses may help after lunch, while recent glucose trends may matter more during quiet periods.
Their experiments support a narrower, measurable finding: on one multimodal dataset, GlucoAgent produced lower average forecasting errors than the tested multimodal time-series baseline. That is evidence about prediction accuracy, not proof of better diabetes treatment.
How the system works
For each forecast, GlucoAgent receives a file containing the person’s available glucose history, heart rate, activity measurements, meal logs and baseline health profile. Meal photographs are not analyzed; only their timestamps are supplied. Timestamped observations are restricted to information available before the forecasting cutoff.
A language model then writes code, examines the results and decides what analysis to run next. It can search for comparable past meals, fit a statistical or physiological model, or test forecasting rules against earlier observations. No pretrained glucose forecaster is provided inside its Python environment.
The main configuration uses Claude Opus 5 with high reasoning effort. Each episode allows up to 16 model calls and 14 Python programs, executed in a resource-limited sandbox without network access. The final submission contains glucose predictions, a short explanation and references to supporting program outputs. These references make the analysis inspectable, but do not independently establish that its reasoning is correct.
What the researchers measured
The main evaluation used CGMacros, which combines continuous glucose monitoring, smartwatch measurements and meal records. Nine of its 45 participants were held out before model development, with three in each of three A1c ranges: normal, prediabetes and diabetes. These ranges describe a laboratory measurement, not diabetes type.
The test included 1,903 forecasting starting points, spaced one hour apart, with predictions at nominal horizons of 30, 60, 90 and 120 minutes. Available history typically covered 5.5 days and 22 logged meals.
The researchers compared three input settings: twelve hours of glucose, full glucose history, and multimodal context. They calculated root-mean-square error, or RMSE, separately for each participant and horizon, then averaged participants equally. RMSE penalizes large misses more heavily than small ones; lower values indicate better forecasts.
Where accuracy improved
With multimodal context, GlucoAgent’s RMSE averaged 22.5 mg/dL across the four horizons, compared with 23.5 mg/dL for Chronos-2. GlucoAgent had lower RMSE at every horizon, with its largest lead at 60 minutes: 22.1 versus 23.7 mg/dL.
Longer glucose history itself contributed substantially. Expanding from twelve hours to full history reduced GlucoAgent’s average RMSE by 3.6 mg/dL. Adding non-glucose context then reduced it by a further 1.4 mg/dL, compared with 0.3 mg/dL for Chronos-2. With full glucose history alone, the two methods were closely matched.
The additional context helped GlucoAgent most in post-meal situations. For the nominal 60-minute forecast horizon within this category, its RMSE fell from about 31.03 to 26.47 mg/dL, a reduction of approximately 4.6 mg/dL. This horizon measures time ahead of the forecast origin, not time since a meal. Chronos-2’s corresponding reduction was about 0.8 mg/dL. Benefits were not universal: GlucoAgent showed essentially no average improvement when both recent meals and exercise were present.
What the generated analyses reveal
Across the main test, GlucoAgent executed 14,468 successful programs, with a median of seven per forecast. An audited subset showed that it consulted meal logs more often after meals than during quiet periods.
Illustrative cases included averaging responses to similar meals and fitting a curve to an ongoing glucose rise. However, these examples were selected for accurate forecasts that substantially beat the baseline. They demonstrate possible strategies, not typical success rates; the reverse selection rule identified 17 cases where the agent lost.
On separate glucose-only benchmarks, GlucoAgent achieved the lowest RMSE on five of nine datasets. Those comparisons used fixed subsets totaling 8,646 forecasting points, rather than every eligible point.
Limits before practical use
The main multimodal result rests on nine participants, all of whom self-identified as Hispanic/Latino. Broader generalization remains unestablished. The systems also received differently structured inputs, so the comparison does not isolate analysis strategy alone.
Performance depended on the language model and reasoning setting. Computation was substantial: the median runtime in the audited subset was 174 seconds per forecast. Rankings also depended on the metric: at 120 minutes, Chronos-2 slightly outperformed GlucoAgent on mean absolute error.
The preprint therefore supports further investigation of adaptive, inspectable forecasting—not a conclusion that GlucoAgent is ready to guide insulin delivery or improve clinical outcomes.
- glucose forecasting
- GlucoAgent
- continuous glucose monitoring
- multimodal health data
- AI agents
- personalized prediction