arXiv:2504.20355cs.CLcs.AI2025-04NAACL被引 5

只优化提示词中关键部分,让大模型更高效生成好提示。

Local Prompt Optimization

  • 聚焦提示词中可优化的局部 tokens,减少搜索空间。
  • 在 GSM8k、MultiArith 等数学推理任务上显著提升效果。
  • 收敛速度比全局优化快,适合各类自动提示工程方法。

近年来,利用提示词引导大语言模型输出的方法日益流行。然而,即使专家也难以选出能实现目标任务的最佳提示词组合。为此,基于大模型的提示优化成为重要问题。现有方法对提示词进行全局优化,需在大词汇空间中调整所有标记,导致优化空间过大,缺乏有效引导。本文提出局部提示优化(Local Prompt Optimization, LPO),可集成于任意自动化提示工程方法中。LPO 识别提示词中的可优化标记,并引导大模型仅在这些标记上进行优化。实验表明,在 GSM8k、MultiArith 和 BIG-bench Hard 等基准上,LPO 显著提升性能,并且收敛速度优于全局优化方法。

原文摘要 · Abstract (English)

In recent years, the use of prompts to guide the output of Large Language Models have increased dramatically. However, even the best of experts struggle to choose the correct words to stitch up a prompt for the desired task. To solve this, LLM driven prompt optimization emerged as an important problem. Existing prompt optimization methods optimize a prompt globally, where in all the prompt tokens have to be optimized over a large vocabulary while solving a complex task. The large optimization space (tokens) leads to insufficient guidance for a better prompt. In this work, we introduce Local Prompt Optimization (LPO) that integrates with any general automatic prompt engineering method. We identify the optimization tokens in a prompt and nudge the LLM to focus only on those tokens in its optimization step. We observe remarkable performance improvements on Math Reasoning (GSM8k and MultiArith) and BIG-bench Hard benchmarks across various automatic prompt engineering methods. Further, we show that LPO converges to the optimal prompt faster than global methods.

提示优化大模型效率提升

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