arXiv:2412.07820cs.LGcs.AI2024-12ICML被引 11

用贝叶斯优化高效挑选大模型提示词,省时省力。

Hyperband-based Bayesian Optimization for Black-box Prompt Selection

  • 结合深度核高斯过程与多保真度调度,提升提示词搜索效率。
  • 在10个基准上优于现有方法,减少验证实例需求。
  • 适合需高效调优提示词的AI研发人员使用。

最优提示词选择对提升大语言模型在下游任务中的表现至关重要,尤其在仅通过API访问模型的黑箱设置下。黑箱提示词选择面临搜索空间庞大、无梯度信息、评估成本高等挑战。本文提出HbBoPs,结合结构感知深度核高斯过程与Hyperband作为多保真度调度器,以高效筛选提示词。HbBoPs利用指令和少样本示例的嵌入表示,将它们视为提示词的模块化组件,增强代理模型预测下一步评估提示的能力,实现样本高效。Hyperband通过自适应分配不同保真度级别的资源,显著降低提示词评估所需的验证实例数。在10个多样化基准和3个LLM上的大量实验表明,HbBoPs在性能和效率上均优于当前最先进方法。

原文摘要 · Abstract (English)

Optimal prompt selection is crucial for maximizing large language model (LLM) performance on downstream tasks, especially in black-box settings where models are only accessible via APIs. Black-box prompt selection is challenging due to potentially large, combinatorial search spaces, absence of gradient information, and high evaluation cost of prompts on a validation set. We propose HbBoPs, a novel method that combines a structural-aware deep kernel Gaussian Process with Hyperband as a multi-fidelity scheduler to efficiently select prompts. HbBoPs uses embeddings of instructions and few-shot exemplars, treating them as modular components within prompts. This enhances the surrogate model's ability to predict which prompt to evaluate next in a sample-efficient manner. Hyperband improves query-efficiency by adaptively allocating resources across different fidelity levels, reducing the number of validation instances required for evaluating prompts. Extensive experiments across ten diverse benchmarks and three LLMs demonstrate that HbBoPs outperforms state-of-the-art methods in both performance and efficiency.

提示工程贝叶斯优化大模型

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