mlsanityData to 7 Oct 2026

Enhancing the Capability and Robustness of Large Language Models through Reinforcement Learning-Driven Query Refinement

arXiv 2407.01461 ↗First posted 1 Jul 2024cs.CLcited by 5

On the map: LLM safety and security → Jailbreaking

Abstract (arXiv)

The capacity of large language models (LLMs) to generate honest, harmless, and helpful responses heavily relies on the quality of user prompts. However, these prompts often tend to be brief and vague, thereby significantly limiting the full potential of LLMs. Moreover, harmful prompts can be meticulously crafted and manipulated by adversaries to jailbreak LLMs, inducing them to produce potentially toxic content. To enhance the capabilities of LLMs while maintaining strong robustness against harmful jailbreak inputs, this study proposes a transferable and pluggable framework that refines user prompts before they are input into LLMs. This strategy improves the quality of the queries, empowering LLMs to generate more truthful, benign and useful responses. Specifically, a lightweight query refinement model is introduced and trained using a specially designed reinforcement learning approach that incorporates multiple objectives to enhance particular capabilities of LLMs. Extensive experiments demonstrate that the refinement model not only improves the quality of responses but also strengthens their robustness against jailbreak attacks. Code is available at: https://github.com/Huangzisu/query-refinement .

Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). Placed in Jailbreaking, one of 12 directions in LLM safety and security. Builds on 43 of its 55 references that are in the map. First posted on arXiv 1 Jul 2024.

Builds on

43 of 55 references.

Closest ancestors · 16

Same direction, newest first

  1. 2024Advancing the Robustness of Large Language Models through Self-Denoised Smoothing18 Apr
  2. 2024Defending Large Language Models against Jailbreak Attacks via Semantic Smoothing25 Feb
  3. 2024Defending Jailbreak Prompts via In-Context Adversarial Game20 Feb
  4. 2024Robust Prompt Optimization for Defending Language Models Against Jailbreaking Attacks30 Jan
  5. 2024How Johnny Can Persuade LLMs to Jailbreak Them: Rethinking Persuasion to Challenge AI Safety by Humanizing LLMs12 Jan
  6. 2023Tree of Attacks: Jailbreaking Black-Box LLMs Automatically4 Dec
  7. 2023Cognitive Overload: Jailbreaking Large Language Models with Overloaded Logical Thinking16 Nov
  8. 2023A Wolf in Sheep's Clothing: Generalized Nested Jailbreak Prompts can Fool Large Language Models Easily14 Nov
  9. 2023Jailbreaking Black Box Large Language Models in Twenty Queries12 Oct
  10. 2023SmoothLLM: Defending Large Language Models Against Jailbreaking Attacks5 Oct
  11. 2023Detecting Language Model Attacks with Perplexity27 Aug
  12. 2023GPT-4 Is Too Smart To Be Safe: Stealthy Chat with LLMs via Cipher12 Aug
4 more
  1. 2023Universal and Transferable Adversarial Attacks on Aligned Language Models27 Jul
  2. 2023MasterKey: Automated Jailbreak Across Multiple Large Language Model Chatbots16 Jul
  3. 2023Jailbroken: How Does LLM Safety Training Fail?5 Jul
  4. 2023Jailbreaking ChatGPT via Prompt Engineering: An Empirical Study23 May

Other references · 27

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2017Proximal Policy Optimization Algorithmscited by 14,441
  3. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  4. 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,393
  5. 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,317
  6. 2022Self-Instruct: Aligning Language Models with Self-Generated Instructionscited by 2,674
  7. 2023Sparks of Artificial General Intelligence: Early experiments with GPT-4cited by 2,579
  8. 2021Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processingcited by 2,222
  9. 2019ZeRO: Memory Optimizations Toward Training Trillion Parameter Modelscited by 1,278
  10. 2023Llama Guard: LLM-based Input-Output Safeguard for Human-AI Conversationscited by 1,124
  11. 2022Large Language Models Are Human-Level Prompt Engineerscited by 1,020
  12. 2022Red Teaming Language Models with Language Modelscited by 983
15 more
  1. 2023BeaverTails: Towards Improved Safety Alignment of LLM via a Human-Preference Datasetcited by 828
  2. 2022Ignore Previous Prompt: Attack Techniques For Language Modelscited by 760
  3. 2023Automatic Prompt Optimization with "Gradient Descent" and Beam Searchcited by 628
  4. 2023Baseline Defenses for Adversarial Attacks Against Aligned Language Modelscited by 608
  5. 2021Prompt Programming for Large Language Models: Beyond the Few-Shot Paradigmcited by 599
  6. 2022RLPrompt: Optimizing Discrete Text Prompts with Reinforcement Learningcited by 361
  7. 2021Do Prompt-Based Models Really Understand the Meaning of their Prompts?cited by 324
  8. 2020AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Promptscited by 246
  9. 2023Automatically Auditing Large Language Models via Discrete Optimizationcited by 187
  10. 2023Black-Box Prompt Optimization: Aligning Large Language Models without Model Trainingcited by 122
  11. 2023DeepSpeed-Chat: Easy, Fast and Affordable RLHF Training of ChatGPT-like Models at All Scalescited by 107
  12. 2021BERTese: Learning to Speak to BERTcited by 82
  13. 2023Aligning Large Language Models with Human Preferences through Representation Engineeringcited by 71
  14. 2024PRewrite: Prompt Rewriting with Reinforcement Learningcited by 43
  15. 2024Finding a Needle in the Adversarial Haystack: A Targeted Paraphrasing Approach For Uncovering Edge Cases with Minimal Distribution Distortioncited by 3

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 2; 2025: 2; 2026: 1.

5 papers.