提出分层归因优化框架,让提示词自动改进且不丢失原有能力。
Learning from Prompt itself: the Hierarchical Attribution Prompt Optimization
- 基于错误模式动态分配修正权重,精准定位问题段落。
- 在OCRV2和BBH任务上优于现有方法,提升优化效率。
- 适合需要持续迭代提示词的AI应用开发者使用。
优化是众多领域中的核心过程,通常通过迭代改进初始方案来提升性能。这一原则在大语言模型的提示工程中同样关键,设计有效提示构成复杂的优化挑战。结构化优化需自动化或半自动化流程来生成更优提示,从而减少人工成本、提升性能并保证可解释性。然而,当前方法常引发提示漂移:新提示修复旧问题但损害先前成功任务的表现;从零生成提示又可能牺牲可解释性。为此,本文提出分层归因提示优化(HAPO)框架,包含三项创新:(1) 动态归因机制,聚焦训练数据与提示历史中的错误模式;(2) 语义单元优化,针对功能提示段落进行编辑;(3) 多模态友好进展,支持端到端大模型与大模型-多模态大模型混合工作流。在单图/多图问答(如 OCRV2)和复杂任务分析(如 BBH)中,HAPO展现出更高的优化效率,超越同类自动化提示优化方法,并建立可扩展的大规模提示工程范式。
原文摘要 · Abstract (English)
Optimization is fundamental across numerous disciplines, typically following an iterative process of refining an initial solution to enhance performance. This principle is equally critical in prompt engineering, where designing effective prompts for large language models constitutes a complex optimization challenge. A structured optimization approach requires automated or semi-automated procedures to develop improved prompts, thereby reducing manual effort, improving performance, and yielding an interpretable process. However, current prompt optimization methods often induce prompt drift, where new prompts fix prior failures but impair performance on previously successful tasks. Additionally, generating prompts from scratch can compromise interpretability. To address these limitations, this study proposes the Hierarchical Attribution Prompt Optimization (HAPO) framework, which introduces three innovations: (1) a dynamic attribution mechanism targeting error patterns in training data and prompting history, (2) semantic-unit optimization for editing functional prompt segments, and (3) multimodal-friendly progression supporting both end-to-end LLM and LLM-MLLM workflows. Applied in contexts like single/multi-image QA (e.g., OCRV2) and complex task analysis (e.g., BBH), HAPO demonstrates enhanced optimization efficiency, outperforming comparable automated prompt optimization methods and establishing an extensible paradigm for scalable prompt engineering.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。