# Tailored Behavior-Change Messaging for Physical Activity: Integrating Contextual Bandits and Large Language Models

arXiv: https://arxiv.org/abs/2506.07275 · HTML: https://mlsanity.com/paper/2506.07275/

## Key facts

- Cited by 1 papers in the map (data through 14 Oct 2026).
- Builds on 14 of its 66 references that are in the map.
- First posted on arXiv 8 Jun 2025.

## Builds on (most cited first, 14 of 14)

- [GPTCoach: Towards LLM-Based Physical Activity Coaching](https://mlsanity.com/paper/2405.06061/) (2024)
- [Self-Interpretability: LLMs Can Describe Complex Internal Processes that Drive Their Decisions](https://mlsanity.com/paper/2505.17120/) (2025)
- [A Contextual-bandit-based Approach for Informed Decision-making in Clinical Trials](https://mlsanity.com/paper/1809.00258/) (2018)
- [Collaboration of Large Language Models and Small Recommendation Models for Device-Cloud Recommendation](https://mlsanity.com/paper/2501.05647/) (2025)
- [Offline Contextual Multi-armed Bandits for Mobile Health Interventions: A Case Study on Emotion Regulation](https://mlsanity.com/paper/2008.09472/) (2020)
- [Jump Starting Bandits with LLM-Generated Prior Knowledge](https://mlsanity.com/paper/2406.19317/) (2024)
- [Artificial Intelligence across Europe: A Study on Awareness, Attitude and Trust](https://mlsanity.com/paper/2308.09979/) (2023)
- [The Last JITAI? Exploring Large Language Models for Issuing Just-in-Time Adaptive Interventions: Fostering Physical Activity in a Conceptual Cardiac Rehabilitation Setting](https://mlsanity.com/paper/2402.08658/) (2024)
- [Exploring Personalized Health Support through Data-Driven, Theory-Guided LLMs: A Case Study in Sleep Health](https://mlsanity.com/paper/2502.13920/) (2025)
- [Perfectly to a Tee: Understanding User Perceptions of Personalized LLM-Enhanced Narrative Interventions](https://mlsanity.com/paper/2409.16732/) (2024)
- [How Gamification Affects Physical Activity: Large-scale Analysis of Walking Challenges in a Mobile Application](https://mlsanity.com/paper/1702.07437/) (2017)
- [Combining LLM decision and RL action selection to improve RL policy for adaptive interventions](https://mlsanity.com/paper/2501.06980/) (2025)
- [Leveraging the Power of Conversations: Optimal Key Term Selection in Conversational Contextual Bandits](https://mlsanity.com/paper/2505.21393/) (2025)
- [Generator-Mediated Bandits: Thompson Sampling for GenAI-Powered Adaptive Interventions](https://mlsanity.com/paper/2505.16311/) (2025)

## Built on by (most cited first, 1 of 1)

- [Structured Exploration vs. Generative Flexibility: A Field Study Comparing Bandit and LLM Architectures for Personalised Health Behaviour Interventions](https://mlsanity.com/paper/2603.06330/) (2026)

## Abstract (arXiv)

Contextual multi-armed bandit (cMAB) algorithms offer a promising framework for adapting behavioral interventions to individuals over time. However, cMABs often require large samples to learn effectively and typically rely on a finite pre-set of fixed message templates. In this paper, we present a hybrid cMABxLLM approach in which the cMAB selects an intervention type, and a large language model (LLM) which personalizes the message content within the selected type. We deployed this approach in a 30-day physical-activity intervention, comparing four behavioral change intervention types: behavioral self-monitoring, gain-framing, loss-framing, and social comparison, delivered as daily motivational messages to support motivation and achieve a daily step count. Message content is personalized using dynamic contextual factors, including daily fluctuations in self-efficacy, social influence, and regulatory focus. Over the trial, participants received daily messages assigned by one of five models: equal randomization (RCT), cMAB only, LLM only, LLM with interaction history, or cMABxLLM. Outcomes include motivation towards physical activity and message usefulness, assessed via ecological momentary assessments (EMAs). We evaluate and compare the five delivery models using pre-specified statistical analyses that account for repeated measures and time trends. We find that the cMABxLLM approach retains the perceived acceptance of LLM-generated messages, while reducing token usage and providing an explicit, reproducible decision rule for intervention selection. This hybrid approach also avoids the skew in intervention delivery by improving support for under-delivered intervention types. More broadly, our approach provides a deployable template for combining Bayesian adaptive experimentation with generative models in a way that supports both personalization and interpretability.
