TAPO让提示词自动适配任务,提升大模型表现。
TAPO: Task-Referenced Adaptation for Prompt Optimization
- 根据任务特性自动选评价指标,生成更精准提示词。
- 多指标联合评估,优化结果在6个数据集上均更优。
- 适合需要高效定制提示词的NLP应用开发者。
提示工程能显著提升大语言模型性能,自动化提示优化(APO)因手动设计耗时费力而备受关注。然而,现有方法大多忽略任务特异性,导致提示词缺乏领域针对性,难以实现任务优化。本文提出TAPO,一种多任务感知的提示优化框架,包含三个核心模块:首先,任务感知的指标选择模块提升任务特定提示生成能力;其次,多指标评估模块从多个角度协同评估提示;第三,基于进化的优化框架实现提示的自动迭代优化,增强跨任务适应性。在六个数据集上的大量实验验证了该方法的有效性,代码已公开。
原文摘要 · Abstract (English)
Prompt engineering can significantly improve the performance of large language models (LLMs), with automated prompt optimization (APO) gaining significant attention due to the time-consuming and laborious nature of manual prompt design. However, much of the existing work in APO overlooks task-specific characteristics, resulting in prompts that lack domain specificity and are not well-suited for task-specific optimization. In this paper, we introduce TAPO, a multitask-aware prompt optimization framework composed of three key modules. First, a task-aware metric selection module is proposed to enhance task-specific prompt generation capabilities. Second, we present a multi-metrics evaluation module to jointly evaluate prompts from multiple perspectives. Third, an evolution-based optimization framework is introduced for automatic prompt refinement, which improves adaptability across various tasks. Extensive experiments on six datasets demonstrate the effectiveness of our approach, and our code is publicly available.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。