Large Language Models Prompting With Episodic Memory
Not on the map. Why?
Abstract (arXiv)
Prompt optimization is essential for enhancing the performance of Large Language Models (LLMs) in a range of Natural Language Processing (NLP) tasks, particularly in scenarios of few-shot learning where training examples are incorporated directly into the prompt. Despite the growing interest in optimizing prompts with few-shot examples, existing methods for prompt optimization are often resource-intensive or perform inadequately. In this work, we propose PrOmpting with Episodic Memory (POEM), a novel prompt optimization technique that is simple, efficient, and demonstrates strong generalization capabilities. We approach prompt optimization as a Reinforcement Learning (RL) challenge, using episodic memory to archive combinations of input data, permutations of few-shot examples, and the rewards observed during training. In the testing phase, we optimize the sequence of examples for each test query by selecting the sequence that yields the highest total rewards from the top-k most similar training examples in the episodic memory. Our results show that POEM outperforms recent techniques like TEMPERA and RLPrompt by over 5.3% in various text classification tasks. Furthermore, our approach adapts well to broader language understanding tasks, consistently outperforming conventional heuristic methods for ordering examples.
Key facts. Cited by 4 papers in the map (data through 7 Oct 2026). Builds on 38 of its 48 references that are in the map. First posted on arXiv 14 Aug 2024.
Builds on
38 of 48 references.
References · 38
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2023GPT-4 Technical Reportcited by 18,132
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,049
- 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,874
- 2018GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understandingcited by 4,854
- 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,018
- 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,878
- 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,769
- 2021Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsitycited by 3,014
26 more
- 2021TruthfulQA: Measuring How Models Mimic Human Falsehoodscited by 2,919
- 2017TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehensioncited by 2,895
- 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,818
- 2015Character-level Convolutional Networks for Text Classificationcited by 2,293
- 2019BoolQ: Exploring the Surprising Difficulty of Natural Yes/No Questionscited by 2,140
- 2019SuperGLUE: A Stickier Benchmark for General-Purpose Language Understanding Systemscited by 1,718
- 2021Multitask Prompted Training Enables Zero-Shot Task Generalizationcited by 1,462
- 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,371
- 2020Making Pre-trained Language Models Better Few-shot Learnerscited by 1,255
- 2021What Makes Good In-Context Examples for GPT-3?cited by 1,184
- 2021Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivitycited by 1,122
- 2022Large Language Models Are Human-Level Prompt Engineerscited by 1,020
- 2020Exploiting Cloze Questions for Few Shot Text Classification and Natural Language Inferencecited by 934
- 2023Large Language Models as Optimizerscited by 830
- 2021Learning To Retrieve Prompts for In-Context Learningcited by 641
- 2023Automatic Prompt Optimization with "Gradient Descent" and Beam Searchcited by 628
- 2022RLPrompt: Optimizing Discrete Text Prompts with Reinforcement Learningcited by 361
- 2022Black-Box Tuning for Language-Model-as-a-Servicecited by 254
- 2023Large Language Models Sensitivity to The Order of Options in Multiple-Choice Questionscited by 249
- 2022GrIPS: Gradient-free, Edit-based Instruction Search for Prompting Large Language Modelscited by 127
- 2016Model-Free Episodic Controlcited by 100
- 2021On Transferability of Prompt Tuning for Natural Language Processingcited by 74
- 2021Prompt Waywardness: The Curious Case of Discretized Interpretation of Continuous Promptscited by 64
- 2022IDPG: An Instance-Dependent Prompt Generation Methodcited by 43
- 2021Model-Based Episodic Memory Induces Dynamic Hybrid Controlscited by 14
- 2021Episodic Policy Gradient Trainingcited by 5
Built on by
Citing papers per year: 2025: 3; 2026: 1.
4 papers.
- 2025A Simple "Try Again" Can Elicit Multi-Turn LLM Reasoningcited by 11
- 2025ATLAS: Adaptive Trading with LLM AgentS Through Dynamic Prompt Optimization and Multi-Agent Coordinationcited by 7
- 2025Reasoning Under 1 Billion: Memory-Augmented Reinforcement Learning for Large Language Modelscited by 6
- 2026Learning from Research: Toward Lifelong Agent Harness Evolutioncited by 0
- 2026Learning from Research: Toward Lifelong Agent Harness Evolution30 Sep 2026
- 2025ATLAS: Adaptive Trading with LLM AgentS Through Dynamic Prompt Optimization and Multi-Agent Coordination10 Oct 2025
- 2025A Simple "Try Again" Can Elicit Multi-Turn LLM Reasoning18 Jul 2025
- 2025Reasoning Under 1 Billion: Memory-Augmented Reinforcement Learning for Large Language Models3 Apr 2025