| Effective pulmonary rehabilitation requires walking programs that adapt to a patient's daily progress and health status. However, using cloud-based Artificial Intelligence to personalize these goals raises significant privacy concerns regarding sensitive medical data. This paper introduces Alento-AI, an intelligent assistant that runs entirely on a patient's mobile phone, ensuring total data privacy. By fine-tuning a Small Language Model (Gemma-3-1B) on a specialized dataset, we created an engine capable of following complex clinical rules without needing a constant internet connection. Our results show that the model's ability to behave like a clinical assistant improved from a 29.8\% baseline to 93.8\% accuracy. Critically, we substantially reduced the ``mathematical hallucinations'' common in standard AI models, raising the accuracy of clinical step-count calculations from 34.0\% to 88.7\%. While the base model failed to follow the correct clinical path in nearly 17\% of cases despite having explicit instructions, Alento-AI achieved 100.0\% Path Adherence, ensuring that exercise goals are only increased when no clinical red flags are present. We further optimized the system to run on mid-range smartphones by reducing its memory requirements. By internalizing clinical logic directly into the model, we also eliminated the need for long, battery-draining instructional prompts. Alento-AI demonstrates that secure, specialized, and mathematically reliable AI can reside directly in the patient's pocket, in line with the strict requirements of the EU health regulations. |
*** Title, author list and abstract as submitted during Camera-Ready version delivery. Small changes that may have occurred during processing by Springer may not appear in this window.