Policy-Invariant Reward Shaping from LLM Feedback: A Framework for Hybrid RL Agents
Organizations: African Institute for Mathematical Sciences, Rwanda · AI Research and Innovation Nexus for Africa (AIRINA Labs), AI.Technipreneurs, Bénin · Sefako Makgatho Health Sciences University (SMU), South Africa · African Center for Advanced Studies (ACAS), Cameroon
Abstract
Combining large language models with reinforcement learning is increasingly explored, yet the theoretical status of LLM-derived reward signals is often left implicit. We formalize the hybrid LLM-planner and RL-controller architecture as a Goal-Augmented Markov Decision Process and show that when the LLM per-state progress score is used as a bounded potential function, the resulting shaping term preserves the optimal policy set even when the LLM scores are inaccurate. This guarantee is stronger than what general LLM-as-reward approaches provide. We verify the result numerically on a small MDP under four potential configurations, including an adversarial one scaled to twenty times the base reward magnitude.
Figures & tables
| configuration | Base | Shaped | Shaped optimal policy | Matches base? |
|---|---|---|---|---|
| [ : forward, : forward] | yes | |||
| [ : forward, : forward] | yes | |||
| sign-flip | [ : forward, : forward] | yes | ||
| adversarial large | [ : forward, : forward] | yes |
| Metric | Value |
|---|---|
| Parse rate (outputs with subgoal) | ( ) |
| Mean plan length (parsed only) | subgoals |
| Median plan length | subgoals |
| Mean ground-truth coverage | |
| Mean extraneous subgoals per plan | |
| Median tokens out per plan |
| Config | n | Success rate | Final return | Mean steps/ep | LLM calls/seed |
|---|---|---|---|---|---|
| PPO baseline | 3 | [ , ] | [ , ] | [ , ] | |
| Hybrid (Qwen) | 3 | [ , ] | [ , ] | [ , ] |
LLM-Guided RL
Large language model-guided reinforcement learning uses language models to shape rewards, exploration, planning, and policy learning.
See all 140 papers