Lune

EMNLP2024Top-tier venue

MetaReflection: Learning Instructions for Language Agents using Past Reflections

Priyanshu Gupta, Shashank Kirtania, Ananya Singha, Sumit Gulwani, Arjun Radhakrishna, Gustavo Soares, Sherry Shi

Abstract

The popularity of Large Language Models (LLMs) have unleashed a new age of Language Agents for solving a diverse range of tasks. While contemporary frontier LLMs are capable enough to power reasonably good Language agents, the closed-API model makes it hard to improve in cases they perform suboptimally. To address this, recent works have explored ways to improve their performance using techniques like self-reflection and prompt optimization. Unfortunately, techniques like self-reflection can be used only in an online setup, while contemporary prompt optimization techniques are designed and tested to work on simple tasks. To this end, we introduce METAREFLECTION, a novel offline reinforcement learning technique that enhances the performance of Language Agents by augmenting a semantic memory based on experiential learnings from past trials. We demonstrate the efficacy of METAREFLECTION by evaluating across multiple domains, including complex logical reasoning, biomedical semantic similarity, open world question answering, and vulnerability threat detection, in Infrastructure-as-Code, spanning different agent designs. METAREFLECTION boosts Language agents' performance by 4 % to 16.82 % over the raw GPT-4 baseline and performs on par with existing state-of-the-art prompt optimization techniques while requiring fewer LLM calls. We release our experimental code at: aka.ms/metareflection-code.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

3 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Tree of Thoughts: Deliberate Problem Solving with Large Language Models cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • SAMULE: Self-Learning Agents Enhanced by Multi-level Reflection cites Reflexion: language agents with verbal reinforcement learning
  • PromptAgent: Strategic Planning with Language Models Enables Expert-level Prompt Optimization cites Reflexion: language agents with verbal reinforcement learning
  • PromptAgent: Strategic Planning with Language Models Enables Expert-level Prompt Optimization cites Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Them
  • Look Before You Leap: A GUI-Critic-R1 Model for Pre-Operative Error Diagnosis in GUI Automation cites Reflexion: language agents with verbal reinforcement learning
  • Reflexion: language agents with verbal reinforcement learning cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Them cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers3

  1. Look Before You Leap: A GUI-Critic-R1 Model for Pre-Operative Error Diagnosis in GUI AutomationYuyang Wanyan, Xi Zhang, Haiyang Xu, Haowei Liu et al.NeurIPS 2025 · 26 citations
  2. Understanding Software Engineering Agents: A Study of Thought-Action-Result TrajectoriesIslem Bouzenia, Michael PradelASE 2025 · 3 citations
  3. SAMULE: Self-Learning Agents Enhanced by Multi-level ReflectionYubin Ge, Salvatore Romeo, Jason Cai, Monica Sunkara et al.EMNLP 2025

Builds on9

  1. Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
  2. Reflexion: language agents with verbal reinforcement learningNoah Shinn, Federico Cassano, Ashwin Gopinath, Karthik Narasimhan et al.NeurIPS 2023 · 5,828 citations
  3. Tree of Thoughts: Deliberate Problem Solving with Large Language ModelsShunyu Yao, Dian Yu, Jeffrey Zhao, Izhak Shafran et al.NeurIPS 2023 · 5,068 citations
  4. Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve ThemMirac Suzgun, Nathan Scales, Nathanael Schärli, Sebastian Gehrmann et al.ACL Findings 2023 · 253 citations
  5. PromptAgent: Strategic Planning with Language Models Enables Expert-level Prompt OptimizationXinyuan Wang, Chenxi Li, Zhen Wang, Fan Bai et al.ICLR 2024 · 226 citations

Related papers

  1. AGILE: A Novel Reinforcement Learning Framework of LLM AgentsPeiyuan Feng, Yichen He, Guanhua Huang, Yuan Lin et al.NeurIPS 2024 · 61 citations
  2. Meta-Reflection: A Feedback-Free Reflection Learning FrameworkYaoke Wang, Yun Zhu, Xintong Bao, Wenqiao Zhang et al.ACL 2025 · 2 citations
  3. Meta-RL Induces Exploration in Language AgentsYulun Jiang, Liangze Jiang, Damien Teney, Michael Moor et al.ICLR 2026 · 20 citations
  4. Advancing Tool-Augmented Large Language Models via Meta-Verification and Reflection LearningZhiyuan Ma, Jiayu Liu, Xianzhen Luo, Zhenya Huang et al.KDD 2025 · 4 citations
  5. Learn Like Humans: Use Meta-cognitive Reflection for Efficient Self-ImprovementXinmeng Hou, Bohao Qu, Wuqi Wang, Peiliang Gong et al.ACL 2026 · 1 citation
Dusk over the sea between two cliffs drawn in fine vertical lines