arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2405.18369cs.CLcs.AIcs.LG
收藏

PromptWizard:任务感知的提示优化框架

PromptWizard: Task-Aware Prompt Optimization Framework

Microsoft Research India(微软研究院印度分部)

Eshaan Agarwal, Joykirat Singh, Vivek Dani, Raghav Magazine, Tanuja Ganu, Akshay Nambi

AI总结:

本文提出PromptWizard框架,通过自进化的反馈驱动批判与合成机制自动优化提示指令和上下文示例,在45个任务上取得优异性能,并显著降低API调用和token成本。

摘要:

大型语言模型(LLMs)已经改变了跨多个领域的人工智能,其中提示(prompting)在引导模型输出方面对其成功至关重要。然而,手动提示工程既劳动密集又依赖于特定领域,因此需要自动化解决方案。我们提出PromptWizard,一个新颖的、完全自动化的离散提示优化框架,利用自进化、自适应机制。通过反馈驱动的批判与合成过程,PromptWizard在探索与利用之间实现了有效平衡,迭代地优化提示指令和上下文示例,以生成人类可读的、任务特定的提示。这种引导式方法系统地提升了提示质量,从而在45个任务上取得了卓越性能。PromptWizard即使在训练数据有限、使用较小规模的LLMs以及不同LLM架构的情况下也表现出色。此外,我们的成本分析显示API调用次数、token使用量和总体成本均大幅降低,证明了PromptWizard的效率、可扩展性以及相对于现有提示优化策略的优势。

英文摘要:

Large language models (LLMs) have transformed AI across diverse domains, with prompting being central to their success in guiding model outputs. However, manual prompt engineering is both labor-intensive and domain-specific, necessitating the need for automated solutions. We introduce PromptWizard, a novel, fully automated framework for discrete prompt optimization, utilizing a self-evolving, self-adapting mechanism. Through a feedback-driven critique and synthesis process, PromptWizard achieves an effective balance between exploration and exploitation, iteratively refining both prompt instructions and in-context examples to generate human-readable, task-specific prompts. This guided approach systematically improves prompt quality, resulting in superior performance across 45 tasks. PromptWizard excels even with limited training data, smaller LLMs, and various LLM architectures. Additionally, our cost analysis reveals a substantial reduction in API calls, token usage, and overall cost, demonstrating PromptWizard's efficiency, scalability, and advantages over existing prompt optimization strategies.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑