TrackWise: A Privacy-Preserving Client-Side Conversational Agent for Ambient Chronic Illness Support
摘要
Reliable and personalised support for chronic illness self-management remains a significant challenge, particularly in the unmonitored intervals between clinical consultations. Existing digital solutions often involve a trade-off: either compromising privacy through remote data storage or lacking the adaptability required for meaningful interaction. This paper introduces TrackWise, a proof-of-concept conversational agent (CA) designed to provide tailored support without persistent data storage. Architecturally, TrackWise is a lightweight, client-side single-page application (SPA) built with React and TypeScript. It operates entirely within the user’s browser and leverages Google’s Gemini-2.5-Flash large language model (LLM) via the official @google/genai SDK. This serverless design ensures all user data remains ephemeral—stored solely in volatile React component state and erased upon session termination—thus adhering to a strict privacy-by-design model. The system’s adaptive behaviour is governed not by model fine-tuning but by a layered prompt-as-knowledge framework, which encodes safety constraints, context-awareness, and functional roles within structured instructions. Early implementation demonstrates that this approach effectively regulates safe interaction boundaries while enabling features such as streaming dialogue and on-demand summarisation. These findings demonstrate the feasibility of prompt engineering as a practical and auditable method for deploying privacy-preserving, client-side CAs in healthcare. The study offers a design pattern for secure, real-time AI support tools to augment chronic care between clinical visits.