[Paper Review] GrIPS: Gradient-free, Edit-based Instruction Search for Prompting Large Language Models
GrIPS is a gradient-free, edit-based search method for automatically improving instructional prompts in large language models without requiring model gradients. It iteratively modifies prompts using human-readable edits, achieving up to 9.36% accuracy gain on classification tasks while outperforming manual rewriting and example-based prompting, even with minimal data and for API-accessible models.
Providing natural language instructions in prompts is a useful new paradigm for improving task performance of large language models in a zero-shot setting. Recent work has aimed to improve such prompts via manual rewriting or gradient-based tuning. However, manual rewriting is time-consuming and requires subjective interpretation, while gradient-based tuning can be extremely computationally demanding for large models and may not be feasible for API-based models. In this work, we introduce Gradient-free Instructional Prompt Search (GrIPS), a gradient-free, edit-based search approach for improving task instructions for large language models. GrIPS takes in instructions designed for humans and automatically returns an improved, edited prompt, while allowing for API-based tuning. With InstructGPT models, GrIPS improves the average task performance by up to 4.30 percentage points on eight classification tasks from the Natural Instructions dataset (with similar improvements for OPT, BLOOM, and FLAN-T5). We see improvements for both instruction-only prompts and instruction + k-shot examples prompts. Notably, GrIPS outperforms manual rewriting and purely example-based prompts while controlling for the available compute and data budget. Further, performance of GrIPS is comparable to select gradient-based tuning approaches. Qualitatively, we show our edits can simplify instructions and at times make them incoherent but nonetheless improve accuracy. Our code is available at: https://github.com/archiki/GrIPS
Motivation & Objective
- To address the limitations of gradient-based prompt tuning, which are computationally expensive and infeasible for API-based models.
- To overcome the high cost and subjectivity of manual instruction rewriting for zero-shot prompting.
- To develop a method that improves instruction quality through automated, human-readable edits without requiring access to model gradients or weights.
- To enable effective prompt optimization for both instruction-only and instruction-plus-shot prompts across diverse LLMs, including GPT-3, OPT, BLOOM, and FLAN-T5.
- To evaluate whether semantically incoherent or simplified instructions can still improve model performance, challenging the assumption that coherence is necessary for effective prompting.
Proposed method
- GrIPS performs iterative, local edits to natural language instructions using a search algorithm that explores syntactic phrase-level modifications.
- It employs a scoring function based on model outputs to evaluate candidate instructions, using only the model’s prediction accuracy as feedback.
- The method operates without gradients, relying solely on the model’s output to guide search, making it compatible with API-based models.
- Edits are constrained to phrase-level operations (e.g., reordering, replacing, removing phrases) to preserve human readability and linguistic coherence.
- The search process uses a beam search or similar strategy to explore promising edits, terminating when no further improvement is found or patience is exhausted.
- It supports both instruction-only and instruction-plus-k-shot example prompts, allowing for flexible prompt engineering.
Experimental results
Research questions
- RQ1Can a gradient-free, edit-based search method improve instruction quality for large language models without requiring access to model gradients?
- RQ2Does automated prompt improvement via non-gradient, human-readable edits outperform manual instruction rewriting and example-based prompt tuning?
- RQ3Can semantically incoherent or simplified instructions still improve model performance, even if they are confusing to humans?
- RQ4How effective is GrIPS when initialized with task-agnostic versus task-specific instructions?
- RQ5Can GrIPS achieve competitive performance with minimal data (e.g., 20 examples) and limited computational budget?
Key findings
- GrIPS improves average task accuracy by up to 9.36 percentage points on eight classification tasks from the Natural-Instructions dataset when using InstructGPT.
- For InstructGPT curie, GrIPS outperforms manual rewriting by 1.5 percentage points on average, under the same compute and data budget.
- GrIPS improves performance by approximately 1.6 points over search over in-context examples when using the same data and computational resources.
- 68.5% of the searched instructions are shorter than the original, and 87.5% contain task-relevant label information, suggesting effective compression and focus.
- GrIPS achieves comparable performance to select gradient-based tuning methods when gradients are available, demonstrating its robustness and efficiency.
- For 68.5% of tasks, GrIPS returns shorter instructions than the original, indicating effective simplification without performance loss.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.