TEMPERA: Test-Time Prompting via Reinforcement Learning
Not on the map. Why?
Abstract (arXiv)
Careful prompt design is critical to the use of large language models in zero-shot or few-shot learning. As a consequence, there is a growing interest in automated methods to design optimal prompts. In this work, we propose Test-time Prompt Editing using Reinforcement learning (TEMPERA). In contrast to prior prompt generation methods, TEMPERA can efficiently leverage prior knowledge, is adaptive to different queries and provides an interpretable prompt for every query. To achieve this, we design a novel action space that allows flexible editing of the initial prompts covering a wide set of commonly-used components like instructions, few-shot exemplars, and verbalizers. The proposed method achieves significant gains compared with recent SoTA approaches like prompt tuning, AutoPrompt, and RLPrompt, across a variety of tasks including sentiment analysis, topic classification, natural language inference, and reading comprehension. Our method achieves 5.33x on average improvement in sample efficiency when compared to the traditional fine-tuning methods.
Key facts. Cited by 50 papers in the map (data through 7 Oct 2026). Builds on 30 of its 34 references that are in the map. First posted on arXiv 21 Nov 2022.
Builds on
30 of 34 references.
References · 30
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2017Proximal Policy Optimization Algorithmscited by 14,441
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
- 2018GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understandingcited by 4,854
- 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
- 2019SuperGLUE: A Stickier Benchmark for General-Purpose Language Understanding Systemscited by 1,718
- 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,371
18 more
- 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
- 2019How Can We Know What Language Models Know?cited by 953
- 2020Exploiting Cloze Questions for Few Shot Text Classification and Natural Language Inferencecited by 934
- 2021GPT Understands, Toocited by 715
- 2021Cross-Task Generalization via Natural Language Crowdsourcing Instructionscited by 696
- 2021P-Tuning v2: Prompt Tuning Can Be Comparable to Fine-tuning Universally Across Scales and Taskscited by 686
- 2021Learning To Retrieve Prompts for In-Context Learningcited by 641
- 2022RLPrompt: Optimizing Discrete Text Prompts with Reinforcement Learningcited by 361
- 2021Factual Probing Is [MASK]: Learning vs. Learning to Recallcited by 291
- 2022PromptSource: An Integrated Development Environment and Repository for Natural Language Promptscited by 288
- 2022Black-Box Tuning for Language-Model-as-a-Servicecited by 254
- 2022GrIPS: Gradient-free, Edit-based Instruction Search for Prompting Large Language Modelscited by 127
- 2020Automatically Identifying Words That Can Serve as Labels for Few-Shot Text Classificationcited by 98
- 2022HyperPrompt: Prompt-based Task-Conditioning of Transformerscited by 67
- 2022IDPG: An Instance-Dependent Prompt Generation Methodcited by 43
- 2022Instance-wise Prompt Tuning for Pretrained Language Modelscited by 5
Built on by
Citing papers per year: 2023: 20; 2024: 13; 2025: 12; 2026: 5.
50 papers.
Sort:
By area:
- 2023Automatic Prompt Optimization with "Gradient Descent" and Beam Searchcited by 628
- 2023Query Rewriting for Retrieval-Augmented Large Language Modelscited by 211
- 2024Recursive Introspection: Teaching Language Model Agents How to Self-Improvecited by 162
- 2025The Unreasonable Effectiveness of Entropy Minimization in LLM Reasoningcited by 160
- 2023Diverse Data Augmentation with Diffusions for Effective Test-time Prompt Tuningcited by 150
- 2023Guiding Large Language Models via Directional Stimulus Promptingcited by 94
- 2024Retrieval Augmented Generation (RAG) and Beyond: A Comprehensive Survey on How to Make your LLMs use External Data More Wiselycited by 65
- 2023In-context Example Selection with Influencescited by 60
- 2024Efficient Prompting Methods for Large Language Models: A Surveycited by 46
- 2023What's the Magic Word? A Control Theory of LLM Promptingcited by 41
- 2023Test-Time Adaptation with CLIP Reward for Zero-Shot Generalization in Vision-Language Modelscited by 37
- 2023Query-Dependent Prompt Evaluation and Optimization with Offline Inverse RLcited by 37
38 more
- 2024PromptWizard: Task-Aware Prompt Optimization Frameworkcited by 32
- 2023Preference-grounded Token-level Guidance for Language Model Fine-tuningcited by 31
- 2023AutoHint: Automatic Prompt Optimization with Hint Generationcited by 29
- 2024Teach Better or Show Smarter? On Instructions and Exemplars in Automatic Prompt Optimizationcited by 28
- 2023Robust Prompt Optimization for Large Language Models Against Distribution Shiftscited by 19
- 2024Task Facet Learning: A Structured Approach to Prompt Optimizationcited by 17
- 2023Pre-Trained Large Language Models for Industrial Controlcited by 15
- 2024The RL/LLM Taxonomy Tree: Reviewing Synergies Between Reinforcement Learning and Large Language Modelscited by 15
- 2025MARS: Multi-Agent Adaptive Reasoning with Socratic Guidance for Automated Prompt Optimizationcited by 15
- 2023Universal Self-Adaptive Promptingcited by 14
- 2023SPELL: Semantic Prompt Evolution based on a LLMcited by 14
- 2024Intent-based Prompt Calibration: Enhancing prompt optimization with synthetic boundary casescited by 13
- 2023Explanation Selection Using Unlabeled Data for Chain-of-Thought Promptingcited by 12
- 2023Reinforcement Learning for Generative AI: A Surveycited by 11
- 2023Selective Perception: Optimizing State Descriptions with Reinforcement Learning for Language Model Actorscited by 9
- 2024Concentrate Attention: Towards Domain-Generalizable Prompt Optimization for Language Modelscited by 7
- 2024Large Language Models are Interpretable Learnerscited by 7
- 2025Large Language Models and Evolutionary Computation: A Critical Review of Bidirectional Interaction, Automated Algorithm Design, and Co-Adaptive Systemscited by 6
- 2023Flatness-Aware Prompt Selection Improves Accuracy and Sample Efficiencycited by 5
- 2025Unlabeled Data Improves Fine-Grained Image Zero-shot Classification with Multimodal LLMscited by 5
- 2023A Bayesian approach for prompt optimization in pre-trained language modelscited by 4
- 2025How to Auto-optimize Prompts for Domain Tasks? Adaptive Prompting and Reasoning through Evolutionary Domain Knowledge Adaptationcited by 4
- 2024CodeCloak: A Method for Evaluating and Mitigating Code Leakage by LLM Code Assistantscited by 3
- 2025TAPO: Task-Referenced Adaptation for Prompt Optimizationcited by 3
- 2026Adapting Generalist Robot Policies with Semantic Reinforcement Learningcited by 3
- 2023Matching Table Metadata with Business Glossaries Using Large Language Modelscited by 2
- 2024Diffusion-Enhanced Test-time Adaptation with Text and Image Augmentationcited by 2
- 2025Efficient Algorithms for Logistic Contextual Slate Bandits with Bandit Feedbackcited by 2
- 2025TRPrompt: Bootstrapping Query-Aware Prompt Optimization from Textual Rewardscited by 2
- 2025Better by Comparison: Retrieval-Augmented Contrastive Reasoning for Automatic Prompt Optimizationcited by 2
- 2025Stabilizing Black-Box Prompt Optimization with Textual Regularization and Signal Aggregationcited by 1
- 2025Decoupling Understanding from Reasoning via Problem Space Mapping for Small-Scale Model Reasoningcited by 1
- 2026Reforming the Mechanism: Editing Reasoning Patterns in LLMs with Circuit Reshapingcited by 1
- 2024TP-Eval: Tap Multimodal LLMs' Potential in Evaluation by Customizing Promptscited by 0
- 2025Seeing Through the Brain: New Insights from Decoding Visual Stimuli with fMRIcited by 0
- 2026PEEM: Prompt Engineering Evaluation Metrics for Interpretable Joint Evaluation of Prompts and Responsescited by 0
- 2026In-Context Learning as Implicit Policy Gradientcited by 0
- 2026On the Capability and Limitation of Hard Promptcited by 0
- 2026On the Capability and Limitation of Hard Prompt26 Sep 2026
- 2026In-Context Learning as Implicit Policy Gradient25 Jul 2026
- 2026Adapting Generalist Robot Policies with Semantic Reinforcement Learning30 Jun 2026
- 2026PEEM: Prompt Engineering Evaluation Metrics for Interpretable Joint Evaluation of Prompts and Responses11 Mar 2026
- 2026Reforming the Mechanism: Editing Reasoning Patterns in LLMs with Circuit Reshaping6 Mar 2026
- 2025How to Auto-optimize Prompts for Domain Tasks? Adaptive Prompting and Reasoning through Evolutionary Domain Knowledge Adaptation24 Oct 2025
- 2025Seeing Through the Brain: New Insights from Decoding Visual Stimuli with fMRI17 Oct 2025
- 2025Better by Comparison: Retrieval-Augmented Contrastive Reasoning for Automatic Prompt Optimization2 Sep 2025
- 2025Decoupling Understanding from Reasoning via Problem Space Mapping for Small-Scale Model Reasoning7 Aug 2025
- 2025TRPrompt: Bootstrapping Query-Aware Prompt Optimization from Textual Rewards24 Jul 2025
- 2025Stabilizing Black-Box Prompt Optimization with Textual Regularization and Signal Aggregation14 Jul 2025
- 2025Efficient Algorithms for Logistic Contextual Slate Bandits with Bandit Feedback16 Jun 2025
38 more
- 2025Unlabeled Data Improves Fine-Grained Image Zero-shot Classification with Multimodal LLMs1 Jun 2025
- 2025Large Language Models and Evolutionary Computation: A Critical Review of Bidirectional Interaction, Automated Algorithm Design, and Co-Adaptive Systems21 May 2025
- 2025The Unreasonable Effectiveness of Entropy Minimization in LLM Reasoning21 May 2025
- 2025MARS: Multi-Agent Adaptive Reasoning with Socratic Guidance for Automated Prompt Optimization21 Mar 2025
- 2025TAPO: Task-Referenced Adaptation for Prompt Optimization12 Jan 2025
- 2024Diffusion-Enhanced Test-time Adaptation with Text and Image Augmentation12 Dec 2024
- 2024TP-Eval: Tap Multimodal LLMs' Potential in Evaluation by Customizing Prompts23 Oct 2024
- 2024Retrieval Augmented Generation (RAG) and Beyond: A Comprehensive Survey on How to Make your LLMs use External Data More Wisely23 Sep 2024
- 2024Recursive Introspection: Teaching Language Model Agents How to Self-Improve25 Jul 2024
- 2024Large Language Models are Interpretable Learners25 Jun 2024
- 2024Teach Better or Show Smarter? On Instructions and Exemplars in Automatic Prompt Optimization22 Jun 2024
- 2024Concentrate Attention: Towards Domain-Generalizable Prompt Optimization for Language Models15 Jun 2024
- 2024Task Facet Learning: A Structured Approach to Prompt Optimization15 Jun 2024
- 2024PromptWizard: Task-Aware Prompt Optimization Framework28 May 2024
- 2024CodeCloak: A Method for Evaluating and Mitigating Code Leakage by LLM Code Assistants13 Apr 2024
- 2024Efficient Prompting Methods for Large Language Models: A Survey1 Apr 2024
- 2024Intent-based Prompt Calibration: Enhancing prompt optimization with synthetic boundary cases5 Feb 2024
- 2024The RL/LLM Taxonomy Tree: Reviewing Synergies Between Reinforcement Learning and Large Language Models2 Feb 2024
- 2023A Bayesian approach for prompt optimization in pre-trained language models1 Dec 2023
- 2023What's the Magic Word? A Control Theory of LLM Prompting2 Oct 2023
- 2023SPELL: Semantic Prompt Evolution based on a LLM2 Oct 2023
- 2023Query-Dependent Prompt Evaluation and Optimization with Offline Inverse RL13 Sep 2023
- 2023Matching Table Metadata with Business Glossaries Using Large Language Models8 Sep 2023
- 2023Reinforcement Learning for Generative AI: A Survey28 Aug 2023
- 2023Diverse Data Augmentation with Diffusions for Effective Test-time Prompt Tuning11 Aug 2023
- 2023Pre-Trained Large Language Models for Industrial Control6 Aug 2023
- 2023Selective Perception: Optimizing State Descriptions with Reinforcement Learning for Language Model Actors21 Jul 2023
- 2023AutoHint: Automatic Prompt Optimization with Hint Generation13 Jul 2023
- 2023Preference-grounded Token-level Guidance for Language Model Fine-tuning1 Jun 2023
- 2023Test-Time Adaptation with CLIP Reward for Zero-Shot Generalization in Vision-Language Models29 May 2023
- 2023Universal Self-Adaptive Prompting24 May 2023
- 2023Query Rewriting for Retrieval-Augmented Large Language Models23 May 2023
- 2023Robust Prompt Optimization for Large Language Models Against Distribution Shifts23 May 2023
- 2023Flatness-Aware Prompt Selection Improves Accuracy and Sample Efficiency18 May 2023
- 2023Automatic Prompt Optimization with "Gradient Descent" and Beam Search4 May 2023
- 2023Guiding Large Language Models via Directional Stimulus Prompting22 Feb 2023
- 2023In-context Example Selection with Influences21 Feb 2023
- 2023Explanation Selection Using Unlabeled Data for Chain-of-Thought Prompting9 Feb 2023
- 2024Recursive Introspection: Teaching Language Model Agents How to Self-Improvecited by 162
- 2025The Unreasonable Effectiveness of Entropy Minimization in LLM Reasoningcited by 160
- 2023Query-Dependent Prompt Evaluation and Optimization with Offline Inverse RLcited by 37
- 2025MARS: Multi-Agent Adaptive Reasoning with Socratic Guidance for Automated Prompt Optimizationcited by 15
- 2023Explanation Selection Using Unlabeled Data for Chain-of-Thought Promptingcited by 12
- 2025How to Auto-optimize Prompts for Domain Tasks? Adaptive Prompting and Reasoning through Evolutionary Domain Knowledge Adaptationcited by 4
- 2025TRPrompt: Bootstrapping Query-Aware Prompt Optimization from Textual Rewardscited by 2
- 2025Better by Comparison: Retrieval-Augmented Contrastive Reasoning for Automatic Prompt Optimizationcited by 2
- 2025Decoupling Understanding from Reasoning via Problem Space Mapping for Small-Scale Model Reasoningcited by 1
- 2026Reforming the Mechanism: Editing Reasoning Patterns in LLMs with Circuit Reshapingcited by 1
- 2026Reforming the Mechanism: Editing Reasoning Patterns in LLMs with Circuit Reshaping6 Mar 2026
- 2025How to Auto-optimize Prompts for Domain Tasks? Adaptive Prompting and Reasoning through Evolutionary Domain Knowledge Adaptation24 Oct 2025
- 2025Better by Comparison: Retrieval-Augmented Contrastive Reasoning for Automatic Prompt Optimization2 Sep 2025
- 2025Decoupling Understanding from Reasoning via Problem Space Mapping for Small-Scale Model Reasoning7 Aug 2025
- 2025TRPrompt: Bootstrapping Query-Aware Prompt Optimization from Textual Rewards24 Jul 2025
- 2025The Unreasonable Effectiveness of Entropy Minimization in LLM Reasoning21 May 2025
- 2025MARS: Multi-Agent Adaptive Reasoning with Socratic Guidance for Automated Prompt Optimization21 Mar 2025
- 2024Recursive Introspection: Teaching Language Model Agents How to Self-Improve25 Jul 2024
- 2023Query-Dependent Prompt Evaluation and Optimization with Offline Inverse RL13 Sep 2023
- 2023Explanation Selection Using Unlabeled Data for Chain-of-Thought Prompting9 Feb 2023
- 2023Diverse Data Augmentation with Diffusions for Effective Test-time Prompt Tuningcited by 150
- 2023Test-Time Adaptation with CLIP Reward for Zero-Shot Generalization in Vision-Language Modelscited by 37
- 2025Unlabeled Data Improves Fine-Grained Image Zero-shot Classification with Multimodal LLMscited by 5
- 2024TP-Eval: Tap Multimodal LLMs' Potential in Evaluation by Customizing Promptscited by 0
- 2025Unlabeled Data Improves Fine-Grained Image Zero-shot Classification with Multimodal LLMs1 Jun 2025
- 2024TP-Eval: Tap Multimodal LLMs' Potential in Evaluation by Customizing Prompts23 Oct 2024
- 2023Diverse Data Augmentation with Diffusions for Effective Test-time Prompt Tuning11 Aug 2023
- 2023Test-Time Adaptation with CLIP Reward for Zero-Shot Generalization in Vision-Language Models29 May 2023
- 2023Automatic Prompt Optimization with "Gradient Descent" and Beam Searchcited by 628
- 2023Guiding Large Language Models via Directional Stimulus Promptingcited by 94
- 2023In-context Example Selection with Influencescited by 60
- 2024Efficient Prompting Methods for Large Language Models: A Surveycited by 46
- 2023What's the Magic Word? A Control Theory of LLM Promptingcited by 41
- 2024PromptWizard: Task-Aware Prompt Optimization Frameworkcited by 32
- 2023AutoHint: Automatic Prompt Optimization with Hint Generationcited by 29
- 2024Teach Better or Show Smarter? On Instructions and Exemplars in Automatic Prompt Optimizationcited by 28
- 2023Robust Prompt Optimization for Large Language Models Against Distribution Shiftscited by 19
- 2024Task Facet Learning: A Structured Approach to Prompt Optimizationcited by 17
- 2023Pre-Trained Large Language Models for Industrial Controlcited by 15
- 2024The RL/LLM Taxonomy Tree: Reviewing Synergies Between Reinforcement Learning and Large Language Modelscited by 15
12 most cited of 32 All 32 (JSON)
- 2026On the Capability and Limitation of Hard Prompt26 Sep 2026
- 2026In-Context Learning as Implicit Policy Gradient25 Jul 2026
- 2026PEEM: Prompt Engineering Evaluation Metrics for Interpretable Joint Evaluation of Prompts and Responses11 Mar 2026
- 2025Seeing Through the Brain: New Insights from Decoding Visual Stimuli with fMRI17 Oct 2025
- 2025Stabilizing Black-Box Prompt Optimization with Textual Regularization and Signal Aggregation14 Jul 2025
- 2025Efficient Algorithms for Logistic Contextual Slate Bandits with Bandit Feedback16 Jun 2025
- 2025Large Language Models and Evolutionary Computation: A Critical Review of Bidirectional Interaction, Automated Algorithm Design, and Co-Adaptive Systems21 May 2025
- 2025TAPO: Task-Referenced Adaptation for Prompt Optimization12 Jan 2025
- 2024Diffusion-Enhanced Test-time Adaptation with Text and Image Augmentation12 Dec 2024
- 2024Large Language Models are Interpretable Learners25 Jun 2024
- 2024Teach Better or Show Smarter? On Instructions and Exemplars in Automatic Prompt Optimization22 Jun 2024
- 2024Concentrate Attention: Towards Domain-Generalizable Prompt Optimization for Language Models15 Jun 2024
12 newest of 32 All 32 (JSON)