让长提示词更精准稳定,自动优化不丢信息
SCULPT: Systematic Tuning of Long Prompts
- 把提示词当树结构处理,分层修改保上下文
- 对抗扰动下仍稳定,零初始提示也能生成好结果
- 适合需要长文本输入的复杂任务场景
提示词优化对大语言模型在各类任务中的有效应用至关重要。现有方法虽能优化短提示词,但在处理长而复杂的提示时,常出现信息丢失且对微小扰动敏感。为此,我们提出SCULPT(Systematic Tuning of Long Prompts),将提示词优化视为层次化树结构的精炼问题。该框架将提示词表示为树结构,实现精准修改同时保持语境完整性,并采用批评者-执行者框架生成反思并实施修正动作。评估显示,SCULPT在长提示词上表现优异,对对抗性扰动具有鲁棒性,且即使无初始人工提示也能生成高性能提示。相比现有最先进方法,SCULPT通过结构化精炼持续提升大语言模型性能,同时保留关键任务信息。定性和定量分析表明,其生成的提示修改更稳定、可解释,显著提升跨任务泛化能力。
原文摘要 · Abstract (English)
Prompt optimization is essential for effective utilization of large language models (LLMs) across diverse tasks. While existing optimization methods are effective in optimizing short prompts, they struggle with longer, more complex ones, often risking information loss and being sensitive to small perturbations. To address these challenges, we propose SCULPT (Systematic Tuning of Long Prompts), a framework that treats prompt optimization as a hierarchical tree refinement problem. SCULPT represents prompts as tree structures, enabling targeted modifications while preserving contextual integrity. It employs a Critic-Actor framework that generates reflections and applies actions to refine the prompt. Evaluations demonstrate SCULPT's effectiveness on long prompts, its robustness to adversarial perturbations, and its ability to generate high-performing prompts even without any initial human-written prompt. Compared to existing state of the art methods, SCULPT consistently improves LLM performance by preserving essential task information while applying structured refinements. Both qualitative and quantitative analyses show that SCULPT produces more stable and interpretable prompt modifications, ensuring better generalization across tasks.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。