Reward Is Enough: LLMs Are In-Context Reinforcement Learners
Not on the map. Why?
Abstract (arXiv)
Reinforcement learning (RL) is a framework for solving sequential decision-making 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 multi-round prompting framework, we call ICRL prompting, for inference-time self-improvement. 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.
Key facts. Cited by 31 papers in the map (data through 14 Oct 2026). Builds on 45 of its 72 references that are in the map. First posted on arXiv 21 May 2025.
Builds on
45 of 72 references.
References · 45
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2022Training language models to follow instructions with human feedbackcited by 15,971
- 2017Proximal Policy Optimization Algorithmscited by 15,215
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,695
- 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,626
- 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,276
- 2023Let's Verify Step by Stepcited by 3,789
- 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,442
- 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,211
- 2020Learning to summarize from human feedbackcited by 2,588
- 2024SimPO: Simple Preference Optimization with a Reference-Free Rewardcited by 963
33 more
- 2023Graph of Thoughts: Solving Elaborate Problems with Large Language Modelscited by 886
- 2023Large Language Models as Optimizerscited by 864
- 2024ORPO: Monolithic Preference Optimization without Reference Modelcited by 562
- 2016RL2: Fast Reinforcement Learning via Slow Reinforcement Learningcited by 503
- 2016Learning to reinforcement learncited by 377
- 2022ScienceWorld: Is your Agent Smarter than a 5th Grader?cited by 327
- 2024Many-Shot In-Context Learningcited by 206
- 2023Large Language Models as General Pattern Machinescited by 197
- 2022In-context Reinforcement Learning with Algorithm Distillationcited by 190
- 2025Crossing the Reward Bridge: Expanding RL with Verifiable Rewards Across Diverse Domainscited by 156
- 2024On the Self-Verification Limitations of Large Language Models on Reasoning and Planning Taskscited by 142
- 2023Supervised Pretraining Can Learn In-Context Reinforcement Learningcited by 139
- 2023Human-Timescale Adaptation in an Open-Ended Task Spacecited by 138
- 2023Structured State Space Models for In-Context Reinforcement Learningcited by 111
- 2024Can large language models explore in-context?cited by 76
- 2023Everything of Thoughts: Defying the Law of Penrose Triangle for Thought Generationcited by 74
- 2024EDT: Improving Large Language Models' Generation by Entropy-based Dynamic Temperature Samplingcited by 45
- 2023Generalization to New Sequential Decision Making Tasks with In-Context Learningcited by 39
- 2025A Survey of In-Context Reinforcement Learningcited by 39
- 2024Do LLM Agents Have Regret? A Case Study in Online Learning and Gamescited by 35
- 2024EVOLvE: Evaluating and Optimizing LLMs For In-Context Explorationcited by 34
- 2023Emergent Agentic Transformer from Chain of Hindsight Experiencecited by 33
- 2024Intelligent Go-Explore: Standing on the Shoulders of Giant Foundation Modelscited by 33
- 2022Large Language Models can Implement Policy Iterationcited by 31
- 2024LLMs Are In-Context Bandit Reinforcement Learnerscited by 29
- 2023Emergence of In-Context Reinforcement Learning from Noise Distillationcited by 27
- 2024In-Context Decision Transformer: Reinforcement Learning via Hierarchical Chain-of-Thoughtcited by 26
- 2024Transformers Can Learn Temporal Difference Methods for In-Context Reinforcement Learningcited by 23
- 2024In-context Exploration-Exploitation for Reinforcement Learningcited by 16
- 2024A Large Recurrent Action Model: xLSTM enables Fast Inference for Robotics Taskscited by 14
- 2024Synthesizing Programmatic Reinforcement Learning Policies with Large Language Model Guided Searchcited by 13
- 2023Cross-Episodic Curriculum for Transformer Agentscited by 10
- 2024Artificial Generational Intelligence: Cultural Accumulation in Reinforcement Learningcited by 8
Built on by
Citing papers per year: 2025: 12; 2026: 19.
31 papers.
Sort:
By area:
- 2025A Survey of Self-Evolving Agents: What, When, How, and Where to Evolve on the Path to Artificial Super Intelligencecited by 170
- 2025Training-Free Group Relative Policy Optimizationcited by 55
- 2026Continual Harness: Online Adaptation for Self-Improving Foundation Agentscited by 41
- 2025LLM Economist: Large Population Models and Mechanism Design in Multi-Agent Generative Simulacracited by 22
- 2025Sample Complexity and Representation Ability of Test-time Scaling Paradigmscited by 12
- 2025ProRefine: Inference-Time Prompt Refinement with Textual Feedbackcited by 8
- 2025LLM-First Search: Self-Guided Exploration of the Solution Spacecited by 6
- 2025Behavioral Exploration: Learning to Explore via In-Context Adaptationcited by 5
- 2025When Greedy Wins: Emergent Exploitation Bias in Meta-Bandit LLM Trainingcited by 3
- 2025Safe In-Context Reinforcement Learningcited by 3
- 2025Dual-Scale World Models for LLM Agents Towards Hard-Exploration Problemscited by 2
- 2026Large Language Model-Powered Evolutionary Code Optimization on a Phylogenetic Treecited by 2
19 more
- 2026GDPevo: Evaluating Agent Self-Evolution on Real Business Taskscited by 2
- 2025Prompt-Driven Domain Adaptation for End-to-End Autonomous Driving via In-Context RLcited by 1
- 2026Self-Distilled Reinforcement Learning for Co-Evolving Agentic Recommender Systemscited by 1
- 2026Teaching agentic AI to generalize expert diagnostic reasoning in rare diseasescited by 1
- 2026ANCHOR: Automated Alignment Auditing for CLI Agents on Real-World Harmcited by 1
- 2026In-Context Reinforcement Learning under Non-Stationarity: A Surveycited by 1
- 2026Despite Instructions: Frontier Agents Improvise Covert Channels at Test Timecited by 1
- 2025Are LLMs The Way Forward? A Case Study on LLM-Guided Reinforcement Learning for Decentralized Autonomous Drivingcited by 0
- 2026SAIR: Cost-Efficient Multi-Stage ML Pipeline Autoscaling via In-Context Reinforcement Learningcited by 0
- 2026TR-ICRL: Test-Time Rethinking for In-Context Reinforcement Learningcited by 0
- 2026When Do We Need LLMs? A Diagnostic for Language-Driven Banditscited by 0
- 2026OpenLife: Toward Open-World Artificial Life with Autonomous LLM Agentscited by 0
- 2026R^3: Advertisement Compliance Rectification via Group-Relative Experience Extractor and Curriculum Reinforcementcited by 0
- 2026Thesis Proposal: Toward a Human-Centered and Perspective-Aware Framework for Reproducible ML Evaluation and AI Alignmentcited by 0
- 2026Few-Shot Demonstrations Elicit the Use of In-Context World Representations in LLMscited by 0
- 2026Downstream-Aware Context Selection for Online In-Context Reinforcement Learningcited by 0
- 2026COEVO: Co-Evolving Context and Parameters for Recursive Self-Improvementcited by 0
- 2026Do LLMs Learn from Rewards in Context? : Rethinking the role of reward in In-Context Reinforcement Learningcited by 0
- 2026Explore with Memory, Learn without It: In-Context Exploration and Self-Distillation for LLM Reasoningcited by 0
- 2026Explore with Memory, Learn without It: In-Context Exploration and Self-Distillation for LLM Reasoning13 Oct 2026
- 2026Do LLMs Learn from Rewards in Context? : Rethinking the role of reward in In-Context Reinforcement Learning8 Oct 2026
- 2026COEVO: Co-Evolving Context and Parameters for Recursive Self-Improvement27 Sep 2026
- 2026Downstream-Aware Context Selection for Online In-Context Reinforcement Learning27 Sep 2026
- 2026Despite Instructions: Frontier Agents Improvise Covert Channels at Test Time26 Sep 2026
- 2026Few-Shot Demonstrations Elicit the Use of In-Context World Representations in LLMs21 Sep 2026
- 2026Thesis Proposal: Toward a Human-Centered and Perspective-Aware Framework for Reproducible ML Evaluation and AI Alignment31 Aug 2026
- 2026GDPevo: Evaluating Agent Self-Evolution on Real Business Tasks4 Aug 2026
- 2026ANCHOR: Automated Alignment Auditing for CLI Agents on Real-World Harm11 Jul 2026
- 2026R^3: Advertisement Compliance Rectification via Group-Relative Experience Extractor and Curriculum Reinforcement8 Jul 2026
- 2026In-Context Reinforcement Learning under Non-Stationarity: A Survey1 Jul 2026
- 2026OpenLife: Toward Open-World Artificial Life with Autonomous LLM Agents30 Jun 2026
19 more
- 2026Teaching agentic AI to generalize expert diagnostic reasoning in rare diseases15 Jun 2026
- 2026Continual Harness: Online Adaptation for Self-Improving Foundation Agents11 May 2026
- 2026Self-Distilled Reinforcement Learning for Co-Evolving Agentic Recommender Systems11 Apr 2026
- 2026When Do We Need LLMs? A Diagnostic for Language-Driven Bandits7 Apr 2026
- 2026TR-ICRL: Test-Time Rethinking for In-Context Reinforcement Learning1 Apr 2026
- 2026SAIR: Cost-Efficient Multi-Stage ML Pipeline Autoscaling via In-Context Reinforcement Learning29 Jan 2026
- 2026Large Language Model-Powered Evolutionary Code Optimization on a Phylogenetic Tree20 Jan 2026
- 2025Prompt-Driven Domain Adaptation for End-to-End Autonomous Driving via In-Context RL16 Nov 2025
- 2025Are LLMs The Way Forward? A Case Study on LLM-Guided Reinforcement Learning for Decentralized Autonomous Driving16 Nov 2025
- 2025Training-Free Group Relative Policy Optimization9 Oct 2025
- 2025Safe In-Context Reinforcement Learning29 Sep 2025
- 2025When Greedy Wins: Emergent Exploitation Bias in Meta-Bandit LLM Training29 Sep 2025
- 2025Dual-Scale World Models for LLM Agents Towards Hard-Exploration Problems28 Sep 2025
- 2025A Survey of Self-Evolving Agents: What, When, How, and Where to Evolve on the Path to Artificial Super Intelligence28 Jul 2025
- 2025LLM Economist: Large Population Models and Mechanism Design in Multi-Agent Generative Simulacra21 Jul 2025
- 2025Behavioral Exploration: Learning to Explore via In-Context Adaptation11 Jul 2025
- 2025ProRefine: Inference-Time Prompt Refinement with Textual Feedback5 Jun 2025
- 2025Sample Complexity and Representation Ability of Test-time Scaling Paradigms5 Jun 2025
- 2025LLM-First Search: Self-Guided Exploration of the Solution Space5 Jun 2025
- 2025Training-Free Group Relative Policy Optimizationcited by 55
- 2025Sample Complexity and Representation Ability of Test-time Scaling Paradigmscited by 12
- 2025LLM-First Search: Self-Guided Exploration of the Solution Spacecited by 6
- 2026Teaching agentic AI to generalize expert diagnostic reasoning in rare diseasescited by 1
- 2026SAIR: Cost-Efficient Multi-Stage ML Pipeline Autoscaling via In-Context Reinforcement Learningcited by 0
- 2026TR-ICRL: Test-Time Rethinking for In-Context Reinforcement Learningcited by 0
- 2026Downstream-Aware Context Selection for Online In-Context Reinforcement Learningcited by 0
- 2026Do LLMs Learn from Rewards in Context? : Rethinking the role of reward in In-Context Reinforcement Learningcited by 0
- 2026Explore with Memory, Learn without It: In-Context Exploration and Self-Distillation for LLM Reasoningcited by 0
- 2026Explore with Memory, Learn without It: In-Context Exploration and Self-Distillation for LLM Reasoning13 Oct 2026
- 2026Do LLMs Learn from Rewards in Context? : Rethinking the role of reward in In-Context Reinforcement Learning8 Oct 2026
- 2026Downstream-Aware Context Selection for Online In-Context Reinforcement Learning27 Sep 2026
- 2026Teaching agentic AI to generalize expert diagnostic reasoning in rare diseases15 Jun 2026
- 2026TR-ICRL: Test-Time Rethinking for In-Context Reinforcement Learning1 Apr 2026
- 2026SAIR: Cost-Efficient Multi-Stage ML Pipeline Autoscaling via In-Context Reinforcement Learning29 Jan 2026
- 2025Training-Free Group Relative Policy Optimization9 Oct 2025
- 2025Sample Complexity and Representation Ability of Test-time Scaling Paradigms5 Jun 2025
- 2025LLM-First Search: Self-Guided Exploration of the Solution Space5 Jun 2025
- 2025A Survey of Self-Evolving Agents: What, When, How, and Where to Evolve on the Path to Artificial Super Intelligencecited by 170
- 2026Continual Harness: Online Adaptation for Self-Improving Foundation Agentscited by 41
- 2025LLM Economist: Large Population Models and Mechanism Design in Multi-Agent Generative Simulacracited by 22
- 2025ProRefine: Inference-Time Prompt Refinement with Textual Feedbackcited by 8
- 2026Self-Distilled Reinforcement Learning for Co-Evolving Agentic Recommender Systemscited by 1
- 2026Despite Instructions: Frontier Agents Improvise Covert Channels at Test Timecited by 1
- 2026OpenLife: Toward Open-World Artificial Life with Autonomous LLM Agentscited by 0
- 2026Despite Instructions: Frontier Agents Improvise Covert Channels at Test Time26 Sep 2026
- 2026OpenLife: Toward Open-World Artificial Life with Autonomous LLM Agents30 Jun 2026
- 2026Continual Harness: Online Adaptation for Self-Improving Foundation Agents11 May 2026
- 2026Self-Distilled Reinforcement Learning for Co-Evolving Agentic Recommender Systems11 Apr 2026
- 2025A Survey of Self-Evolving Agents: What, When, How, and Where to Evolve on the Path to Artificial Super Intelligence28 Jul 2025
- 2025LLM Economist: Large Population Models and Mechanism Design in Multi-Agent Generative Simulacra21 Jul 2025
- 2025ProRefine: Inference-Time Prompt Refinement with Textual Feedback5 Jun 2025
- 2025Safe In-Context Reinforcement Learningcited by 3
- 2026In-Context Reinforcement Learning under Non-Stationarity: A Surveycited by 1
- 2026In-Context Reinforcement Learning under Non-Stationarity: A Survey1 Jul 2026
- 2025Safe In-Context Reinforcement Learning29 Sep 2025
- 2025Behavioral Exploration: Learning to Explore via In-Context Adaptationcited by 5
- 2025When Greedy Wins: Emergent Exploitation Bias in Meta-Bandit LLM Trainingcited by 3
- 2026Large Language Model-Powered Evolutionary Code Optimization on a Phylogenetic Treecited by 2
- 2026GDPevo: Evaluating Agent Self-Evolution on Real Business Taskscited by 2
- 2026ANCHOR: Automated Alignment Auditing for CLI Agents on Real-World Harmcited by 1
- 2026When Do We Need LLMs? A Diagnostic for Language-Driven Banditscited by 0
- 2026R^3: Advertisement Compliance Rectification via Group-Relative Experience Extractor and Curriculum Reinforcementcited by 0
- 2026Few-Shot Demonstrations Elicit the Use of In-Context World Representations in LLMscited by 0
- 2026Few-Shot Demonstrations Elicit the Use of In-Context World Representations in LLMs21 Sep 2026
- 2026GDPevo: Evaluating Agent Self-Evolution on Real Business Tasks4 Aug 2026
- 2026ANCHOR: Automated Alignment Auditing for CLI Agents on Real-World Harm11 Jul 2026
- 2026R^3: Advertisement Compliance Rectification via Group-Relative Experience Extractor and Curriculum Reinforcement8 Jul 2026
- 2026When Do We Need LLMs? A Diagnostic for Language-Driven Bandits7 Apr 2026
- 2026Large Language Model-Powered Evolutionary Code Optimization on a Phylogenetic Tree20 Jan 2026
- 2025When Greedy Wins: Emergent Exploitation Bias in Meta-Bandit LLM Training29 Sep 2025
- 2025Behavioral Exploration: Learning to Explore via In-Context Adaptation11 Jul 2025
Similar, not cited
Close in wording, no citation either way
- 2025Feedback-Induced Performance Decline in LLM-Based Decision-Making
- 2025Reflect, Retry, Reward: Self-Improving LLMs via Reinforcement Learning
- 2024Toward Self-Improvement of LLMs via Imagination, Searching, and Criticizing
- 2025Prompted Policy Search: Reinforcement Learning through Linguistic and Numerical Reasoning in LLMs
- 2026Expanding the Capabilities of Reinforcement Learning via Text Feedback
- 2024Self-Instructed Derived Prompt Generation Meets In-Context Learning: Unlocking New Potential of Black-Box LLMs
- 2025No Free Lunch: Rethinking Internal Feedback for LLM Reasoning
- 2025SPELL: Self-Play Reinforcement Learning for Evolving Long-Context Language Models