用大模型增强贝叶斯优化,高效找最优提示词
LLM Based Bayesian Optimization for Prompt Search
- 用大模型生成高斯过程替代传统代理模型
- 在少量数据上迭代优化,准确率提升且调用次数少
- 适合需要少样本、低开销的提示工程场景
贝叶斯优化(BO)广泛用于在评估成本高、次数有限的情况下优化黑箱函数。本文研究将BO应用于提示工程,以提升大语言模型(LLM)在文本分类中的表现。我们采用由大模型驱动的高斯过程(GP)作为代理模型,估算不同提示候选的性能。这些候选通过大模型对一组种子提示进行扩展生成,并结合高斯过程后验分布与上限置信度(UCB)采集函数进行评估。优化过程在子集数据上迭代精炼提示,旨在提升分类准确率的同时减少API调用次数,充分利用大模型驱动的高斯过程预测不确定性。所提出的BO-LLM算法在两个数据集上进行了评估,本文详细讨论了其优势。
原文摘要 · Abstract (English)
Bayesian Optimization (BO) has been widely used to efficiently optimize expensive black-box functions with limited evaluations. In this paper, we investigate the use of BO for prompt engineering to enhance text classification with Large Language Models (LLMs). We employ an LLM-powered Gaussian Process (GP) as the surrogate model to estimate the performance of different prompt candidates. These candidates are generated by an LLM through the expansion of a set of seed prompts and are subsequently evaluated using an Upper Confidence Bound (UCB) acquisition function in conjunction with the GP posterior. The optimization process iteratively refines the prompts based on a subset of the data, aiming to improve classification accuracy while reducing the number of API calls by leveraging the prediction uncertainty of the LLM-based GP. The proposed BO-LLM algorithm is evaluated on two datasets, and its advantages are discussed in detail in this paper.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。