TL;DR
When you ask an AI agent about your sleep or heart rate, current setups usually dump weeks of raw wearable logs straight into the model's context—asking a probabilistic text generator to simultaneously play calculator, data cleaner, and privacy guard. AskWearables steps in as a strict, deterministic middleman: it computes exact answers in tested code and releases only the minimum granularity required (like "below usual" instead of exact numbers). The payoff is dramatically less data exposure, near-zero privacy leaks, and smaller open-weight models suddenly matching frontier accuracy.
What Problem Does This Paper Address?
Connecting an LLM agent to personal health data today happens in one of two ways: stuffing a full data export into the prompt ("raw context"), or handing the model unrestricted API tools like an MCP server ("open tools"). Both leave three jobs to the LLM that it happens to do terribly:
- Multi-step arithmetic over messy time-series data (where duplicate step counters, time-zone travel, and un-synced days lurk).
- Privacy filtering, where models routinely leak sensitive details or fall for prompt injections hidden in text fields like workout notes.
- Consistency, giving the same answer twice.
Furthermore, privacy benchmarks usually only ask if an agent leaks sensitive info in its final reply. The authors argue the harm happens earlier, calling it context over-exposure: handing six weeks of heart rate and body weight to an external model provider just to answer a question about last night's sleep.
Methods
Instead of letting the agent touch raw records, AskWearables places a three-part broker between the agent and the user's vault:
- Blind LLM Planner: Translates a natural-language question into a strict JSON query (
QuerySpec) over 8 fixed operations (likeaggregate,trend, orthreshold_check). Crucially, the planner never sees the user's health data—only the question and a metric catalog. - Deterministic Compute Engine: Tested, plain code handles the gnarly domain logic: deduplicating watch vs. phone steps, aligning timestamps to local wake dates across flights, flagging low-coverage days, and calculating 28-day personal baselines.
- Policy Gate & Coarsened Packets: Plain code checks the query against a consent-time grant bound to a specific agent and purpose (e.g., scheduling vs. sleep coaching). Rather than failing when a request asks for too much detail, it coarsens the output across four release levels:
flag(Level 0, yes/no),bucket(Level 1, e.g., "moderately below usual"),values(Level 2, daily numbers), andraw(Level 3, session notes). Every release or denial generates an encrypted, hash-chained audit receipt, and the agent receives a compact packet ($\le 400$ tokens) complete with data-quality caveats.
Datasets
- Synthetic Cohort (New): 10 seeded user profiles over 45 days (100 questions + 300 privacy runs), engineered with ground-truth ledgers separated from device logs. Each user embodies a classic wearable trap: duplicate step sources, flights across time zones, daylight saving shifts, missing days, stale syncs, and device switches.
- PHIA: Public benchmark of 4,000 objective wearable questions over four synthetic users, used to test out-of-scope refusals and component alignment.
- PMData & LifeSnaps: Public, real-world Fitbit datasets (16 participants, 152 questions) containing natural wear gaps and daylight-saving transitions.
Key Insights and Ideas
- Exposure $\neq$ Leakage: Prompting an LLM to "be discreet" doesn't bound what enters its context window. Enforcing granularity ceilings in code upstream stops leaks before the agent even runs—for instance, giving a scheduling bot a Level 1 sleep bucket means it literally has no sleep durations to accidentally overshare with your manager.
- Code levels the playing field for smaller models: Strong frontier models can often brute-force raw CSV math, but smaller open-weight models stumble on date alignment and double-counted steps. Handing them pre-computed packets with explicit caveats ("3 of 7 days missing") erases most of that reasoning gap—though models occasionally still ignore the caveat and report a partial sum anyway!
- Overly strict minimization can backfire: On PHIA, defaulting
threshold_checkto Level 0 (a boolean flag) meant questions asking "how many days..." only got a yes/no back. In two pre-registered follow-up steps, matching the release level to the question phrasing and adding hints for denied metrics fixed the bottleneck without weakening the security gate.
Key Results
Evaluated across 9 models (6 open-weight, 3 frontier) holding the agent fixed:
- Accuracy: On the synthetic cohort, pooled accuracy hit 97% with AskWearables vs. 83% (raw context) and 82% (open tools)—a +14 point boost (+7 points under strict sensitivity checks). Weak raw-context models saw massive jumps (e.g.,
llama-3.3-70brose from 63% to 98%). - Context Over-Exposure: Raw context exposed 12.5$\times$ more user record text per question than AskWearables (11,630 vs. 934 median characters).
- Privacy: Under prompt injection, purpose drift, and oversharing tests, raw context leaked in 55.0% of runs and open tools in 23.7%. AskWearables leaked in 0.3% (1 of 300 runs)—and that lone "leak" was a number the model hallucinated, as zero target values ever passed the gate.
- Public Benchmarks: On PHIA, AskWearables refused 84% of unsupported queries (vs. 48% baselines). Initially, it trailed raw context on answerable questions (50% vs. 56%), but after the two pre-registered refinements, the deployed broker matched raw context on fresh questions as worded (55% vs. 55%) and reached 88% accuracy on real Fitbit data.
Limitations and Future Work
- Deliberately narrow scope: Because the compute engine only runs 8 fixed operations, it refuses complex ad-hoc queries (like sleep-stage percentages or composed multi-step filters)—accounting for over half of PHIA's 4,000 questions that a freeform code-writing agent could tackle.
- Post-release & trust boundaries: Once a packet is released, the broker can't stop an agent from misreading caveats or hallucinating numbers, nor does it govern what the external LLM provider does with that packet. The broker operator is also assumed trusted.
- Unexercised defenses & missing ablations: While the gate supports daily packet caps to thwart database reconstruction attacks across repeated queries, reconstruction attacks weren't tested here. Future work could also run ablations (like pairing an oracle planner with the engine, or testing against code-writing minimizers) to isolate exactly how much accuracy comes from the planner versus the tested code.
Summary updated