arXiv:2502.06855cs.CLcs.AI2025-02EMNLP被引 42

无需外部参考,用模型自评优化提示词,大幅降低成本。

Self-Supervised Prompt Optimization

  • 通过模型互评选择优质提示词,无需真实答案或人工标注。
  • 仅需3个样本即达顶尖效果,推理成本仅为现有方法的1.1%~5.6%。
  • 适合需要低成本部署提示优化的工业场景与开放任务。

精心设计的提示词对提升大语言模型(LLM)的推理能力及任务对齐至关重要。然而,手动设计提示词需专业知识且依赖反复试验。现有优化方法虽可自动化,但严重依赖真实标签或人工标注,限制了在无外部数据场景下的应用。为此,我们提出自监督提示优化(SPO),一种无需外部参考即可为闭合与开放任务发现有效提示的高效框架。基于提示质量直接体现在模型输出中、且模型能有效评估任务符合度的观察,SPO仅通过输出对比生成评估与优化信号。具体地,先由LLM评估器进行两两输出比较以筛选优提示,再由LLM优化器调整输出以对齐任务要求。大量实验表明,SPO优于当前最优方法,在仅使用极少样本(如3个)和极低成本(如现有方法的1.1%~5.6%)下取得相当或更优性能。代码已开源:https://github.com/FoundationAgents/SPO。

原文摘要 · Abstract (English)

Well-designed prompts are crucial for enhancing Large language models' (LLMs) reasoning capabilities while aligning their outputs with task requirements across diverse domains. However, manually designed prompts require expertise and iterative experimentation. While existing prompt optimization methods aim to automate this process, they rely heavily on external references such as ground truth or by humans, limiting their applicability in real-world scenarios where such data is unavailable or costly to obtain. To address this, we propose Self-Supervised Prompt Optimization (SPO), a cost-efficient framework that discovers effective prompts for both closed and open-ended tasks without requiring external reference. Motivated by the observations that prompt quality manifests directly in LLM outputs and LLMs can effectively assess adherence to task requirements, we derive evaluation and optimization signals purely from output comparisons. Specifically, SPO selects superior prompts through pairwise output comparisons evaluated by an LLM evaluator, followed by an LLM optimizer that aligns outputs with task requirements. Extensive experiments demonstrate that SPO outperforms state-of-the-art prompt optimization methods, achieving comparable or superior results with significantly lower costs (e.g., 1.1% to 5.6% of existing methods) and fewer samples (e.g., three samples). The code is available at https://github.com/FoundationAgents/SPO.

提示优化自监督大模型低成本

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。