Show a desktop notification when the AI TA finishes replying
Notify me when classmates post messages in the forum
Play an alert sound whenever there is a new notification
Explain how Uedu integrates physiological data from Garmin wearables, using dual-baseline statistical shift detection so the AI TA can perceive learners' physical and mental state and adjust conversation strategies.
PALM (Physiologically-Aware Language Model) is the physiological-aware language model module of the Uedu platform, and the core implementation of the PhysioNeuromics dimension within the Educational Omics framework.
PALM’s design philosophy is to embed care within the dialogue itself, rather than through external push notifications. When a Student’s sleep, HRV, stress and other physiological indicators deviate from their personal baseline, the AI TA automatically adjusts its dialogue strategy (for example, a gentler tone and suggestions to rest), and the Student will not see any additional notifications or warnings.
At present, PALM's physiological data comes from the Garmin Connect API. Students need to authorise a Garmin account connection on the Uedu platform (Uedu Fit module), and the system will then automatically receive the wearable device's daily health summary.
Raw JSON data pushed by Garmin is processed by the sync_garmin_to_palm_summary() function for ETL (Extract-Transform-Load) and written uniformly into the palm_health_summary data table:
PALM tracks the following five categories of physiological indicators:
| Category | Indicator | Source | Description |
|---|---|---|---|
| Sleep | sleep_duration_seconds | sleeps | Total sleep duration (seconds) |
| sleep_deep_seconds | sleeps | Deep sleep duration | |
| sleep_light_seconds | sleeps | Shallow sleep duration | |
| sleep_rem_seconds | sleeps | REM sleep duration | |
| sleep_score | sleeps | Garmin sleep quality score | |
| HRV | hrv_last_night_avg | hrv | Average heart rate variability last night (ms) |
| Stress | stress_avg | stressDetails | Average all-day stress level (0-100) |
| body_battery_avg / max / min | stressDetails | Body Battery average / maximum / minimum | |
| Activity | steps, active_calories, distance | dailies | Daily steps, active calories, distance |
| Heart rate | resting_heart_rate | userMetrics | Resting heart rate (bpm) |
PALM builds a personal baseline for each user across two time windows:
| Contact | Days | Purpose | Minimum data days |
|---|---|---|---|
| Acute baseline | 7 days | Detect recent acute changes ("compared with last week over the past few days") | 3 days |
| Trend baseline | 30 days | Detect overall drift ("compared with usual") | 3 days |
Each baseline includes the following statistics (calculated for days with data within the window):
The baseline is automatically recalculated daily by Cron Job (cron_palm_baseline.py) at 04:00 UTC every day (12:00 noon in Taiwan). This time slot is chosen because Garmin sleep data are usually fully synchronised by the morning.
When a Student is conversing with the AI TA, the system compares the current physiological data with the dual-window baseline in real time, using z-score to determine the degree of deviation:
z = (current_value - baseline_avg) / baseline_std
Based on the absolute value of the z-score, deviations are divided into three levels:
| Classification | Condition | Meaning |
|---|---|---|
normal | |z| < 1.0 | Within the normal range |
above_normal / below_normal | 1.0 ≤ |z| < 2.0 | Slight deviation from baseline |
significantly_above / significantly_below | |z| ≥ 2.0 | Significantly deviates from baseline |
Note: some indicators are 'higher is better' (such as HRV, sleep duration, Body Battery), while others are 'lower is better' (such as stress); the system will judge whether a deviation is positive or negative based on the direction of the indicator.
The system calculates deviations from the 7-day and 30-day baselines respectively, then cross-checks the trend:
| 7-day offset | 30-day drift | Trend judgement | Meaning |
|---|---|---|---|
| Abnormal | Abnormal | persistent | Long-term issue, worth greater attention |
| Abnormal | Normal | acute | Recently emerged change |
| Normal | Abnormal | — | May be recovering |
| Normal | Normal | normal | All systems normal |
After shift detection is complete, the system assembles the physiological status summary into a piece of text and injects it into the AI TA's System Prompt. The AI TA will adjust its conversation strategy accordingly, butwill not directly display the physiological data to the Student.
## Learner physiological state - Sleep: 5.2 hours last night (personal average 7.1 hours), significantly below baseline, persistent - HRV: 38 ms (personal average 45 ms), below baseline - Stress: high (72, personal average 45), acute change - Time: late night (1:30 am) Please show appropriate care for the learner's mental and physical state, and keep your tone gentle. If you notice that the Student is not concentrating or appears tired, you may suggest taking an appropriate rest.
The system determines the time period according to local Taiwan time (early morning, morning, afternoon, evening, late at night), and incorporates this into the AI's reference. For example, when a question is asked late at night, the AI may remind the Student to rest.
When physiological data is insufficient (less than 3 days of baseline data, Student has not authorised Garmin, etc.), the PALM module will not inject any content, and the AI TA’s behaviour will be exactly the same as when PALM is not enabled.
Physiological data are sensitive personal information. When using PALM-related data for research, informed consent from participants must be obtained, and the institution's IRB review must be passed.
The AI Teaching Assistant integrates learners’ physiological state through the PALM (Physiologically-Aware Language Model) module on the Uedu platform. Physiological data come from Garmin wearables (including sleep duration and stages, HRV, stress index, Body Battery, and resting heart rate) and are standardised and stored via an ETL pipeline in the palm_health_summary table. For each user, the system establishes dual personal baselines over 7 days (acute) and 30 days (trend); z-scores are used to detect the degree of deviation from the baseline, and deviation trends are cross-judged (acute / persistent). A deviation summary is injected into the AI System Prompt so that the AI automatically adjusts tone and strategy during conversation, but physiological data are not shown directly to Students. A minimum of 3 days of data is required to enable this feature. See the detailed methodology at https://uedu.tw/doc/palm.
It is recommended to provide the following: