Reward Is Enough: LLMs Are In-Context Reinforcement Learners
Kefan Song, Amir Moeini, Peng Wang, Lei Gong, Rohan Chandra, Shangtong Zhang, Yanjun Qi
摘要
Reinforcement learning (RL) is a framework for solving sequential decisionmaking problems. In this work, we demonstrate that, surprisingly, RL emerges during the inference time of large language models (LLMs), a phenomenon we term in-context RL (ICRL). To reveal this capability, we introduce a simple multiround prompting framework, we call ICRL prompting, for inference-time selfimprovement. The goal of ICRL prompting is to guide LLMs to perform reinforcement learning during inference for self-improvement on a given task. After each response, the model receives numerical scalar feedback, denoted as a reward. In the next round, we prompt the LLM again together with a context that concatenates all prior responses and their associated rewards. We consistently observe that response quality improves as the context grows. In other words, the LLM can optimize scalar reward signals during inference, exhibiting behavior analogous to reinforcement learning. We evaluate ICRL prompting on Game of 24, creative writing, ScienceWorld, and Olympiad-level math competitions (AIME and HMMT), demonstrating significant improvements over baselines such as Self-Refine and Reflexion. Notably, even when the reward signals are generated by the same LLM, ICRL prompting still improves performance, highlighting a promising new paradigm for test-time scaling. We release all code at: https://github.com/garified/ICRL-for-LLM-Agent as supervising authors.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 3 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Tree of Thoughts: Deliberate Problem Solving with Large Language Models 引用了 Self-Refine: Iterative Refinement with Self-Feedback
- Tree of Thoughts: Deliberate Problem Solving with Large Language Models 引用了 Language Models are Few-Shot Learners
- Dual-Scale World Memory for LLM Agents towards Hard-Exploration Problems 引用了 Reflexion: language agents with verbal reinforcement learning
- Self-Refine: Iterative Refinement with Self-Feedback 引用了 Training language models to follow instructions with human feedback
- Reflexion: language agents with verbal reinforcement learning 引用了 Self-Refine: Iterative Refinement with Self-Feedback
- Training language models to follow instructions with human feedback 引用了 Language Models are Few-Shot Learners
引用它的顶会 Paper3
- Safe In-Context Reinforcement LearningAmir Moeini, Minjae Kwon, Alper Bozkurt, Yuichi Motai 等ICML 2026 · 4 次引用
- ANCHOR: Automated Alignment Auditing for CLI Agents on Real-World HarmKefan Song, Yanjun QiICML 2026
- Dual-Scale World Memory for LLM Agents towards Hard-Exploration ProblemsMinsoo Kim, Seung-won HwangICLR 2026
它引用的 Paper30
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida 等NeurIPS 2022 · 24,707 次引用
- Reflexion: language agents with verbal reinforcement learningNoah Shinn, Federico Cassano, Ashwin Gopinath, Karthik Narasimhan 等NeurIPS 2023 · 5,828 次引用
- Tree of Thoughts: Deliberate Problem Solving with Large Language ModelsShunyu Yao, Dian Yu, Jeffrey Zhao, Izhak Shafran 等NeurIPS 2023 · 5,068 次引用
- Self-Refine: Iterative Refinement with Self-FeedbackAman Madaan, Niket Tandon, Prakhar Gupta, Skyler Hallinan 等NeurIPS 2023 · 4,972 次引用
相关 Paper
- Query-Dependent Prompt Evaluation and Optimization with Offline Inverse RLHao Sun, Alihan Hüyük, Mihaela van der SchaarICLR 2024 · 48 次引用
- TTRL: Test-Time Reinforcement LearningYuxin Zuo, Kaiyan Zhang, Li Sheng, Shang Qu 等NeurIPS 2025 · 249 次引用
- CURE: Critique-Driven Unified Reinforcement Learning for Test-Time Self-ImprovementGuirong Chen, Shuqi Ye, Wenkai Yang, Shiqi Shen 等ACL 2026
- Incentivizing LLMs to Self-Verify Their AnswersFuxiang Zhang, Jiacheng Xu, Chaojie Wang, Ce Cui 等NeurIPS 2025 · 20 次引用
- Self-Instructed Derived Prompt Generation Meets In-Context Learning: Unlocking New Potential of Black-Box LLMsZhuo Li, Yuhao Du, Jinpeng Hu, Xiang Wan 等ACL 2025
