mlsanityData to 7 Oct 2026

QPO: Query-dependent Prompt Optimization via Multi-Loop Offline Reinforcement Learning

arXiv 2408.10504 ↗First posted 20 Aug 2024cs.AIcited by 10

On the map: Offline RL and imitation learning from data → Decision transformers and sequence modeling

Abstract (arXiv)

Prompt engineering has demonstrated remarkable success in enhancing the performance of large language models (LLMs) across diverse tasks. However, most existing prompt optimization methods only focus on the task-level performance, overlooking the importance of query-preferred prompts, which leads to suboptimal performances. Additionally, these methods rely heavily on frequent interactions with LLMs to obtain feedback for guiding the optimization process, incurring substantial redundant interaction costs. In this paper, we introduce Query-dependent Prompt Optimization (QPO), which leverages multi-loop offline reinforcement learning to iteratively fine-tune a small pretrained language model to generate optimal prompts tailored to the input queries, thus significantly improving the prompting effect on the large target LLM. We derive insights from offline prompting demonstration data, which already exists in large quantities as a by-product of benchmarking diverse prompts on open-sourced tasks, thereby circumventing the expenses of online interactions. Furthermore, we continuously augment the offline dataset with the generated prompts in each loop, as the prompts from the fine-tuned model are supposed to outperform the source prompts in the original dataset. These iterative loops bootstrap the model towards generating optimal prompts. Experiments on various LLM scales and diverse NLP and math tasks demonstrate the efficacy and cost-efficiency of our method in both zero-shot and few-shot scenarios.

Key facts. Cited by 10 papers in the map (data through 7 Oct 2026). Placed in Decision transformers and sequence modeling, one of 13 directions in Offline RL and imitation learning from data. Builds on 48 of its 60 references that are in the map. First posted on arXiv 20 Aug 2024.

Builds on

48 of 60 references.

Closest ancestors · 2

Same direction, newest first

  1. 2021Offline Reinforcement Learning as One Big Sequence Modeling Problem3 Jun
  2. 2021Decision Transformer: Reinforcement Learning via Sequence Modeling2 Jun

Other references · 46

  1. 2023GPT-4 Technical Reportcited by 18,132
  2. 2022Training language models to follow instructions with human feedbackcited by 15,712
  3. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
  4. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
  5. 2021Training Verifiers to Solve Math Word Problemscited by 9,743
  6. 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,393
  7. 2022Large Language Models are Zero-Shot Reasonerscited by 4,323
  8. 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,018
  9. 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,878
  10. 2017Deep reinforcement learning from human preferencescited by 3,846
  11. 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,769
  12. 2022Constitutional AI: Harmlessness from AI Feedbackcited by 2,950
34 more
  1. 2020Learning to summarize from human feedbackcited by 2,562
  2. 2015Character-level Convolutional Networks for Text Classificationcited by 2,293
  3. 2021Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processingcited by 2,222
  4. 2019BoolQ: Exploring the Surprising Difficulty of Natural Yes/No Questionscited by 2,140
  5. 2020Offline Reinforcement Learning: Tutorial, Review, and Perspectives on Open Problemscited by 1,873
  6. 2018Know What You Don't Know: Unanswerable Questions for SQuADcited by 1,538
  7. 2020Making Pre-trained Language Models Better Few-shot Learnerscited by 1,255
  8. 2022Large Language Models Are Human-Level Prompt Engineerscited by 1,020
  9. 2021Are NLP Models really able to Solve Simple Math Word Problems?cited by 861
  10. 2023Automatic Prompt Optimization with "Gradient Descent" and Beam Searchcited by 628
  11. 2023Promptbreeder: Self-Referential Self-Improvement Via Prompt Evolutioncited by 521
  12. 2018Behavioral Cloning from Observationcited by 482
  13. 2022RLPrompt: Optimizing Discrete Text Prompts with Reinforcement Learningcited by 361
  14. 2022News Summarization and Evaluation in the Era of GPT-3cited by 324
  15. 2018Reward learning from human preferences and demonstrations in Ataricited by 314
  16. 2022PromptSource: An Integrated Development Environment and Repository for Natural Language Promptscited by 288
  17. 2019Cosmos QA: Machine Reading Comprehension with Contextual Commonsense Reasoningcited by 281
  18. 2023PromptAgent: Strategic Planning with Language Models Enables Expert-level Prompt Optimizationcited by 226
  19. 2022Demystifying Prompts in Language Models via Perplexity Estimationcited by 215
  20. 2022Optimizing Prompts for Text-to-Image Generationcited by 204
  21. 2021Differentiable Prompt Makes Pre-trained Language Models Better Few-shot Learnerscited by 115
  22. 2021Imitation Learning: Progress, Taxonomies and Challengescited by 56
  23. 2023Reprompting: Automated Chain-of-Thought Prompt Inference Through Gibbs Samplingcited by 46
  24. 2022IDPG: An Instance-Dependent Prompt Generation Methodcited by 43
  25. 2024PRewrite: Prompt Rewriting with Reinforcement Learningcited by 43
  26. 2023TPTU-v2: Boosting Task Planning and Tool Usage of Large Language Model-based Agents in Real-world Systemscited by 39
  27. 2023Query-Dependent Prompt Evaluation and Optimization with Offline Inverse RLcited by 37
  28. 2023Are Large Language Models Really Robust to Word-Level Perturbations?cited by 32
  29. 2024Do Generated Data Always Help Contrastive Learning?cited by 25
  30. 2024One Prompt is not Enough: Automated Construction of a Mixture-of-Expert Promptscited by 16
  31. 2024Step-On-Feet Tuning: Scaling Self-Alignment of LLMs via Bootstrappingcited by 14
  32. 2023InstructEval: Systematic Evaluation of Instruction Selection Methodscited by 12
  33. 2024DEER: A Delay-Resilient Framework for Reinforcement Learning with Variable Delayscited by 6
  34. 2022Instance-wise Prompt Tuning for Pretrained Language Modelscited by 5

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 6; 2026: 4.

10 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025Prompt-R1: Collaborative Automatic Prompting Framework via End-to-end Reinforcement Learning
  2. 2025Prompt reinforcing for long-term planning of large language models
  3. 2026Optimizing Prompts for Large Language Models: A Causal Approach
  4. 2026TAPR: Enhancing LLM Performance with a Task-Aware Prompt Rewriter
  5. 2026LEEPS: Latent-Guided Explore-Exploit Prompt Sampling for Efficient RLVR in Large Language Models
  6. 2026P^2O: Joint Policy and Prompt Optimization
  7. 2025DLPO: Towards a Robust, Efficient, and Generalizable Prompt Optimization Framework from a Deep-Learning Perspective
  8. 2025GAAPO: Genetic Algorithmic Applied to Prompt Optimization