Reinforcement learning (RL) has achieved substantial progress across many domains, but training an agent tabula rasa remains highly sample-inefficient. A common remedy is to initialize the agent using a neural network pretrained on demonstrations. However, collecting demonstrations is expensive, and the demonstrations themselves can be suboptimal. In this work, we use a large language model (LLM) to generate an advice policy that produces demonstration data with effectively no human cost. We use this data to warmstart a DQN agent, and use the advice policy itself to guide exploration during training. Because LLM-generated advice is often suboptimal, we further introduce a value warmstart method that initializes the agent to recognize promising states from the advice policy's behavior, without directly copying its actions. To characterize the robustness of this method, we systematically perturb individual sub-skills of an LLM-generated advice policy for a long-horizon, sparse-reward task. Degraded advice still meaningfully accelerates learning relative to unaided baselines. These results suggest that LLM-generated advice, though suboptimal, can be a cheap alternative to costly human demonstrations.
Figures & tables
Figure 1: DQN Exploration Advice Warmstart. Curves show the mean over 5 seeds; shaded regions denote standard error.
Sub-skill
Condition → Action
Locate Key
¬key∧¬open∧¬key_ahead→ go_to(key)
Pick Up Key
¬key∧¬open∧key_ahead→ pickup
Toggle Door
door_ahead∧¬open→ toggle
Nav. to Door
key∧¬open→ go_to(door)
Nav. to Drop
key∧open∧¬at_drop→ go_to_drop_spot
Drop Key
key∧open∧at_drop→ drop
Table 1: The eight sub-skills of the optimal state-based UnlockPickup policy.
Variant
A: Locate Key
B: Pick Up Key
C: Nav. to Door
D: Toggle Door
E: Locate Box
Optimal
✓
✓
✓
✓
✓
One skill perturbed
A: Random To Key
R
✓
✓
✓
✓
B: Random Key Pickup
✓
R
✓
✓
✓
C: Random To Door
✓
✓
R
✓
✓
D: Random Door Toggle
✓
✓
✓
R
✓
Table 2: UnlockPickup sub-skill perturbation variants. R indicates the sub-skill is replaced with random actions; ✓indicates it is left optimal.
Figure 2: DQN Value Warmstart. Curves show the mean over 5 seeds; shaded regions denote standard error.
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 3: (a) An LLM is prompted with RLang documentation, a task description, and, for state-based advice, predicate functions, and returns an executable RLang advice policy πadvice . (b) Excerpt of LLM-generated RLang Features
Figure 4: Suboptimal Advice Generation. Degenerate behavior of LLM-generated observation-based advice in UnlockPickup. Top (Oscillations): the agent alternates between the same few actions without making progress. Bottom (Looping): the agent follows a closed path through the room and returns to an earlier state, repeating the cycle.
Figure 5: Suboptimal Observation-based Advice. Curves show the mean over 5 seeds; shaded regions denote standard error.
Figure 6: DQN Warmstart Suboptimal. Curves show the mean over 5 seeds; shaded regions denote standard error.
Hyperparameter
Value
DQN (all methods)
Learning rate
1×10−4 , linearly annealed
Replay buffer size
100,000
Discount factor γ
0.99
Target network update rate τ
1.0
Target network update frequency
1,000 steps
Appendix
Table 3: Hyperparameters. DQN settings are shared by all methods.
We study when large language models (LLMs) can serve as effective black-box policy optimizers for reinforcement learning (RL) tasks, i.e., when can we replace classical RL algorithms with an LLM? We explore this question by introducing Prompted Policy Optimization (PromptPO), an iterative method that prompts an LLM with Python descriptions of the state space, action space, and reward function, then has it generate and refine executable policies based on rollout feedback. Across hard exploration environments, Meta-World robotics tasks, and several real-world control problems, PromptPO often matches or exceeds the performance of standard RL baselines while using substantially fewer environment interactions. To maximize expected return, and without further explicit prompting, the policies PromptPO outputs range from tuned proportional controllers or rule-based plans to policies that run planning algorithms like value iteration. Our results demonstrate that LLM-based policy optimization is sufficient when the LLM can leverage prior knowledge about the environment or optimization strategy. PromptPO underperforms standard RL baselines in MuJoCo domains. This demonstrates possible limitations of LLM-based policy optimization to settings that requiring fine-grained continuous control.
Stephane Hatgis-Kessell, Emma Brunskill
Department of Computer Science, Stanford University
Reinforcement Learning (RL) with rubric-based rewards has recently shown remarkable progress in enhancing general reasoning capabilities of Large Language Models (LLMs), yet still suffers from ineffective exploration confined to curent policy distribution. In fact, RL optimization can be viewed as steering the policy toward an ideal distribution that maximizes the rewards, while effective exploration should align efforts with desired target. Leveraging this insight, we propose HeRL, a Hindsight experience guided Reinforcement Learning framework to bootstrap effective exploration by explicitly telling LLMs the desired behaviors specified in rewards. Concretely, HeRL treats failed trajectories along with their unmet rubrics as hindsight experience, which serves as in-context guidance for the policy to explore desired responses beyond its current distribution. Additionally, we introduce a bonus reward to incentivize responses with greater potential for improvement under such guidance. HeRL facilitates effective learning from desired high quality samples without repeated trial-and-error from scratch, yielding a more accurate estimation of the expected gradient theoretically. Extensive experiments across various benchmarks demonstrate that HeRL achieves superior performance gains over baselines, and can further benefit from experience guided self-improvement at test time. Our code is available at https://github.com/sikelifei/HeRL.
Wenjian Zhang, Kongcheng Zhang, Jiaxin Qi +2
Dalian University of Technology · Zhejiang University · Chinese Academy of Sciences
Reinforcement learning (RL) has become a common approach for training large language model (LLM) agents on long-horizon tasks. However, learning from sparse terminal rewards makes credit assignment and exploration difficult. We approach these challenges through a policy-induced capability region, the set of states from which the current policy can reliably complete a task. Near its boundary, an agent may need only a few actions to reach a more solvable state, even when the goal remains distant. This reduces long-horizon learning to two coupled subproblems of reaching that state and completing the task from there. We address them with paired advantages and a progressive reverse-to-forward curriculum. The advantages provide separate signals for reaching more solvable states and completing the task from them, while the curriculum expands the capability region backward along successful reference trajectories and then into off-reference states through on-policy exploration. On ALFWorld and WebShop, our method outperforms competitive agentic RL methods at both model scales, achieving success rates of 90.1%/96.1% and 80.2%/82.6% with Qwen2.5-1.5B/7B-Instruct, respectively.
Siyuan Du, Yuxin Liu, Meng Tang +4
Nanjing University · Peking University · University of Wales, Aberystwyth