Introduction
Physical rehabilitation is increasingly moving toward digital health interventions (DHIs) to facilitate remote monitoring and home-based care. However, current DHIs are often limited by a "one-size-fits-all" approach. Most platforms rely on pre-programmed exercise libraries where clinicians can only adjust basic parameters like repetitions or duration. This rigidity prevents therapists from tailoring exercises to a patient's unique environment, specific functional goals, or necessary compensatory strategies.
To address this, researchers have introduced a novel paradigm: clinician-directed software generation using Large Language Models (LLMs). In this model, the LLM acts as a "constrained translator," converting a therapist's natural language instructions into custom, executable software. A recent feasibility study demonstrated that this approach could implement 100% of personalized prescriptions, a significant leap over the 55% capability of traditional template-based systems.
The Personalization Gap in Digital Health
The primary barrier to effective remote rehabilitation is the "personalization gap." Current DHIs fail to accommodate several critical clinical needs:
- Procedural Variation: Specific ways of performing a movement that aren't in a standard library.
- New Equipment Use: Incorporating household objects (e.g., a soup can or a specific chair) into the routine.
- Contingencies: Instructions like "stop if pain exceeds a 4/10" or "if the shoulder hurts, reduce the range of motion."
- Compensatory Strategy Options: Allowing or disallowing specific body movements to assist the primary exercise.
- Motor Priming: Specific preparatory movements required before the main exercise.
By moving away from static templates, clinician-directed generation allows these nuances to be baked directly into the software's logic.
System Architecture: The Post-Encounter Paradigm
The core innovation of this research is the "post-encounter" software generation workflow. Instead of selecting from a library during a session, the therapist provides a free-text description of the exercise after the clinical encounter.
As shown in Figure 1, the system integrates the clinician's input with a robust "System Prompt" containing programming language documentation (Scenic), coding guidelines, and example programs. The LLM then generates the intervention software, which is deployed to the patient's device—in this study, a Meta Quest 3 AR headset. This headset provides real-time verbal instructions and uses computer vision to monitor the patient's movements.
Crucially, the LLM is framed as a compiler rather than a clinical decision-maker. It does not diagnose or prescribe; it simply transcribes the clinician's expert intent into a structured, executable format.
Experimental Methodology
The feasibility of this system was tested with 20 licensed physical therapists. The researchers utilized 10 upper extremity exercise goals adapted from the Shirley Ryan Ability Lab. To ensure safety in this initial trial, a "standardized patient" (a healthy individual using an orthotic splint to simulate impairments) performed the generated exercises.
The study also benchmarked several state-of-the-art LLMs, including Google Gemini 2.5 Pro, OpenAI o4-mini, Claude Sonnet 3.7, and Grok 3.0 Beta. Grok 3.0 Beta was ultimately selected for the study due to its superior performance in specifying complex monitoring logic. In total, 40 individualized programs containing 398 instructions were generated and evaluated.
Key Results and Performance
The system demonstrated remarkable flexibility and technical accuracy. While traditional DHIs could only accommodate 55% of the personalized prescriptions through "retrofitting," the LLM-based system successfully translated 100% of them.
Technical performance was high across several metrics:
- Instruction Accuracy: The software delivered verbal instructions correctly 99.7% of the time.
- Monitoring Capability: As illustrated in Figure 2, the system achieved an overall monitoring accuracy of 88.4% (using both Wilson and GLMM estimation methods). This indicates a high degree of reliability in the system's ability to verify if a patient correctly performed the prescribed movements.
- Clinician Acceptance: 90% of participating therapists judged the system as safe for patient use, and 75% expressed a desire to use the system in their professional practice.
Discussion and Future Work
While the results are promising, several limitations remain. The use of a standardized patient provided a controlled environment for safety testing but does not fully capture the unpredictability of real-world clinical populations. Future studies must involve patients with diverse pathologies.
Additionally, clinicians noted that the current monitoring is largely binary (pass/fail). There is a clear demand for more granular feedback—for instance, identifying why a movement failed (e.g., "the patient used their trunk to compensate for weak shoulder abduction"). Other technical challenges include resolving occasional pacing discrepancies caused by computer vision lag and simplifying the "system prompt" engineering so that non-technical staff can update the underlying logic.
Despite these hurdles, the study proves that LLMs can effectively bridge the gap between clinical expertise and digital intervention, moving physical rehabilitation toward a truly personalized future.
Reference: Kim, E., Cho, Y., et al. "Clinician-Directed Large Language Model Software Generation for Therapeutic Interventions in Physical Rehabilitation." arXiv:2511.18274v2 [cs.HC] (2025).
Summary updated