CodeWearBook: Agentic Natural-Language Querying of Wearable Health Datasets

Overview of the CodeWearBook workflow: dataset-scope selection and query disambiguation, embedding-based schema and knowledge retrieval, and SQL generation with majority voting and execution.

Longitudinal wearable studies such as those run by the Goldenberg Lab in collaboration with 4YouandMe produce large, heterogeneous datasets of physiological signals, surveys and clinical events. Asking even simple questions of these data usually requires a data engineer and custom code.

CodeWearBook is an agentic workflow, developed with Dr. Anna Goldenberg’s group at the University of Toronto, the Vector Institute and SickKids, in which large language models answer natural-language questions about wearable health datasets by generating and executing code. The workflow is designed to be adaptable to new data sources and contexts while ensuring data privacy and security by restricting the LLM’s access to raw participant data through controlled SQL and Python execution layers. A manuscript describing the system is under review.

Jennifer Yu
Jennifer Yu
PhD Student in Computational Biology and Medicine

My research interests include machine learning, large language models, precision oncology and clinical time series.