If Only My CGM Could Speak: A Privacy-Preserving Agent for Question Answering over Continuous Glucose Data
Yanjun Cui, Ali Emami, Temiloluwa Prioleau, Nikhil Singh · 2026
Read If Only My CGM Could Speak: A Privacy-Preserving Agent for Question Answering over Continuous Glucose Data by Yanjun Cui, Ali Emami, Temiloluwa Prioleau, Nikhil Singh (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2604-17133.txt.
Introduction
Cui and three colleagues build CGM-Agent, a privacy-preserving question-answering system for continuous glucose data in diabetes care. The language model acts only as a reasoning engine choosing analytical functions, while all computation stays local and personal health data never leaves the device. On a benchmark of 4,180 questions, top models reach 94 percent value accuracy on synthetic queries and 88 percent on ambiguous real-world queries, with errors driven mainly by intent and timing ambiguity.
Catalog record
| CREATOR | Yanjun Cui, Ali Emami, Temiloluwa Prioleau, Nikhil Singh |
|---|---|
| YEAR | 2026 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 61762 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2604.17133
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
If Only My CGM Could Speak: A Privacy-Preserving Agent for Question Answering over Continuous Glucose Data Yanjun Cui, Ali Emami, Temiloluwa Prioleau, Nikhil Singh Abstract Continuous glucose monitors (CGMs) used in diabetes care collect rich personal health data that could improve day-to-day self-management. However, current patient platforms only offer static summaries which do not support inquisitive user queries. Large language models (LLMs) could enable free-form inquiries about continuous glucose data, but deploying them over sensitive health records raises privacy and accuracy concerns. In this paper, we present CGM-Agent , a privacy-preserving framework for question answering over personal glucose data. In our design, the LLM serves purely as a reasoning engine that selects analytical functions. All computation occurs locally, and personal health data never leaves the user’s device. For evaluation, we construct a benchmark of 4,180 questions combining parameterized question templates with real user queries and ground truth derived from deterministic program execution. Evaluating 6 leading LLMs, we find that top models achieve 94% value accuracy on synthetic queries and 88% on ambiguous real-world queries. Errors stem primarily from intent and temporal ambiguity rather than computational failures. Additionally, lightweight models achieve competitive performance in our agent design, suggesting opportunities for low-cost deployment. We release our code and benchmark to support future work on trustworthy health agents. 1 1 1 Code available at: https://github.com/yanjunCC/cgm-agent-release Figure 1: Overview of CGM-Agent . The pipeline consists of three layers: (1) the Input Processor resolves ambiguous queries, (2) the Analytical Agent generates tool calls executed in a local sandbox, and (3) the Response Generator synthesizes a natural language answer. Raw CGM data (shown in the bottom sandbox) never crosses the privacy boundary; only function calls and aggregated metrics are exchanged with the LLM. 1 Introduction Modern health sensors generate dense longitudinal records that, in principle, support fine-grained understanding of personal physiology and behavior. In diabetes care, continuous glucose monitors (CGMs) collect data for close monitoring of glucose patterns roughly every five minutes ( 4 ; 10 ; 3 ) . Over months of CGM use, these devices accumulate detailed records of glucose fluctuations, encoding behavioral and physiological signals that could inform lifestyle decisions, medication adjustments, and clinical conversations. However, current user-interaction platforms like Dexcom Clarity and LibreView offer only static, pre-defined summaries ( 11 ; 2 ) , thereby limiting the ability for a user to explore and learn hidden insights from their own data. For example, when a user has targeted questions like, “How does my glucose control on weekdays compare to weekends?” , they have to download their data and manually compute the needed metrics to find answers to their questions. The gap between the richness of CGM data and rigidity of existing interfaces leaves users without personalized, on-demand insights they need to maximally benefit from their personal health data. LLMs offer a promising solution for a conversational interface through which users can ask targeted questions in plain language. However, deploying LLMs over sensitive health data raises serious concerns. Cloud-based models would require transmitting personal health data to external servers which introduces significant safety and privacy risks. Moreover, LLMs are prone to numerical errors when processing time-series data, making them less reliable for direct use ( 15 ; 16 ) . In this paper, we present CGM-Agent , a modular framework that enables free-form question answering (QA) on personal glucose data while ensuring that personal health data never leaves the user’s device (Figure 1 ). Our key approach is to decouple reasoning from computation so that the LLM serves only as a reasoning engine that interprets user intent and selects appropriate analytical functions, while all data processing occurs in a local execution sandbox. In our implementation, the LLM receives only aggregated CGM metrics, never raw time-series, eliminating the need to transmit sensitive personal health data to the cloud. Our main contributions are: A Grounded QA Benchmark. We construct a dataset of 4,180 questions spanning both synthetic templates grounded in clinical guidelines ( 6 ; 5 ) and real user queries sourced via interviews with CGM users. All ground-truth answers are derived from deterministic execution of a custom-designed Python toolkit developed in this work, ensuring reproducibility (§ 3 ). A Privacy-Preserving Agent Architecture. We propose a three-layer pipeline that separates LLM reasoning from data access. Confining raw CGM data to a local sandbox and exposing only function calls to the model supports accurate, personalized responses without compromising user privacy (§ 4 ). Empirical Analysis of Tool-Augmented LLMs. We benchmark 6 leading proprietary and open-weight models through a layer-wise evaluation. Our results show that lightweight models achieve competitive accuracy on well-structured queries, while real-world, often ambiguous user questions expose significant challenges in intent disambiguation and temporal grounding (§ 5 ). 2 Related Work Tool-Augmented LLM Reasoning. Large language models are prone to errors in mathematical reasoning and factual recall, motivating work on tool augmentation ( 27 ; 31 ) . Toolformer ( 27 ) showed that LLMs can learn to invoke external APIs via self-supervised learning; ReAct ( 31 ) established interleaving reasoning traces with executable actions for multi-step problem solving. These frameworks have been extended to domain-specific settings: SciAgent ( 22 ) and ToolHop ( 32 ) advance tool-augmented reasoning and evaluation in scientific domains, while MMedAgent ( 19 ) and MeNTi ( 34 ) adapt tool calling to clinical decision support. However, these systems typically operate over structured databases or static documents rather than personal longitudinal data, and do not address the privacy constraints inherent in patient-facing applications. LLMs for Diabetes Management. Prior work has applied LLMs to diabetes education, coaching, and forecasting, yet evaluations have exposed critical limitations ( 1 ; 24 ; 23 ; 21 ) . For example, 15 ; 16 showed that GPT-4 frequently misapplies diabetes-specific calculations and fails at CGM pattern recognition. DM-Bench ( 7 ) benchmarks LLMs on patient-facing diabetes decision-making tasks across 15,000 individuals with multimodal behavioral logs. Furthermore, commercial systems such as ChatCGM ( 8 ) and Diabetes Cockpit ( 9 ) , which reflect growing market demand, offer LLM-powered glucose interfaces but remain closed-source with undisclosed evaluation procedures. Our work complements these efforts by providing an open benchmark with deterministic, reproducible ground truth, and a privacy-preserving architecture that keeps raw CGM data local. Privacy in Personal Health AI. Cloud-based LLMs require transmitting sensitive records to external servers, raising concerns about data security and regulatory compliance ( 30 ) . CGM data carries significant privacy risks, thus many existing platforms operate under regulatory gaps that leave patients with little to no control over how their data is collected, stored, or shared 12 ; 26 . Some commercial systems mitigate this by sending only statistical summaries to the LLM, however this approach limits the richness of analysis and is proprietary in most cases ( 9 ) . Prior work on privacy-preserving LLM inference formalizes the Honest-but-Curious (HbC) threat model for cloud providers ( 20 ) : the provider executes instructions faithfully but may log and exploit transmitted data. Locally deployed LLMs have been proposed as one response to this threat in healthcare ( 29 ; 25 ) , but typically at the cost of model capability. In contrast, our work proposes an open, modular architecture in which