arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2404.08164stat.MLcs.AIcs.CLcs.LG
收藏

基于仿真优化的语言模型提示词选择

Budgeted Prompt-Set Expansion and Refinement for Language Models via Simulation Optimization

University of California Berkeley(加州大学伯克利分校)

Haoting Zhang, Jinghai He, Rhonda Righter, Zeyu Zheng

AI总结:

针对生成式语言模型提示词选择依赖人工的问题,提出基于仿真优化的两阶段框架,通过构建得分代理模型序贯选择提示词,证明了过程一致性并通过实验验证了有效性。

摘要:

随着生成式语言模型的发展,提示词选择近年来受到了广泛关注。提示词是用户提供的指令或描述,用于引导生成式语言模型生成内容。现有提示词选择方法多依赖人工,我们则提出通过仿真优化来辅助完成选择,目标是最大化所选提示词的预定义得分。具体而言,我们提出了一个两阶段框架。第一阶段,我们确定数量充足的可行提示词集合,每个提示词用一个中等维度的向量表示。在后续的评估与选择阶段,我们针对表示提示词的中等维度向量构建得分的代理模型。我们提出基于该构建好的代理模型,按顺序选择待评估的提示词。我们证明了框架中序贯评估过程的一致性。我们还开展了数值实验,验证了所提框架的有效性,并给出了实际实施的操作指引。

英文摘要:

A prompt is an instruction or description provided by the user to guide a generative language model toward outputs that meet application requirements. When these requirements change, existing prompts may need to be adapted and improved. Evaluating candidate prompts requires time and computational resources. We therefore study how to expand and refine an initial set of prompts under a limited evaluation budget through simulation optimization, aiming to maximize a pre-defined task score for a fixed language model. Specifically, we propose a two-stage framework. In the first stage, we expand the initial set of prompts into a finite candidate set, where each prompt is represented by a moderate-dimensional vector. In the subsequent stage of evaluation and selection, we construct a surrogate model of the score for moderate-dimensional vectors representing the prompts. We propose sequentially selecting prompts for evaluation using the constructed surrogate model. We prove the consistency of the sequential evaluation procedure in our framework. We further introduce a refinement procedure that uses the collected scores to search beyond the initial candidate set. We also conduct numerical experiments to demonstrate the advantages of our method over baseline prompt selection methods, with higher prompt scores, especially when the budget for calling language models to evaluate prompts is limited.

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

↑