用递归语言模型自适应优化提示词,效果更优且更省资源。
RLMOpt: Adaptive Prompt Optimization via Recursive Language Models
- 用递归语言模型自主决定搜索策略和生成候选提示。
- 在四个任务上均优于现有方法,平均得分0.610,且不产生劣化提示。
- 生成的提示更短(缩小27%-79%),适合追求高效可靠的提示工程者。
提示优化器可自动寻找提升语言模型性能的提示,但现有方法依赖预设优化流程:算法决定探索哪些候选并控制搜索进度,而语言模型负责生成或优化提示。本文提出RLMOpt,一种通过递归语言模型(RLM)驱动搜索策略的提示优化器。该RLM代理运行于工具环境,能分析任务信息、诊断失败、生成候选提示、分配评估预算并决定停止时机。确定性框架则确保客观评分、帕累托选择与回归约束。我们在四个基准上评估:结构化临床信息抽取(Chia)、多跳问答(HotpotQA)、可验证指令遵循(IFBench-2025)及多轮工具调用代理(BFCL)。单种子匹配比较中,RLMOpt在所有任务上取得最优保留得分,四任务均值达0.610(优于GEPA的0.589)。跨种子重复实验共11组匹配对比中,其在9次胜出。全部11次运行中,从未产出劣于初始种子的提示,而GEPA两次低于起点。同时更高效,以更少搜索轮次达成结果,生成提示长度仅为GEPA的27%-79%。结果显示,优化收益主要取决于初始提示的潜力空间,而非搜索预算。因此,高效优化的关键在于可靠、低耗地触及可用潜力。
原文摘要 · Abstract (English)
Prompt optimizers automate the search for prompts that improve language-model performance, but existing methods rely on a predefined optimization procedure: the algorithm determines which candidates to explore and how the search progresses, while the language model generates or refines prompt proposals. We introduce RLMOpt, a prompt optimizer that makes the search policy itself language-model-driven through a recursive language model (RLM). The RLM agent operates over a tool-based environment, inspecting task information, analyzing failures, generating candidates, allocating evaluation budget, and deciding when to stop. A deterministic harness complements the agent by enforcing objective scoring, Pareto-based selection, and regression constraints. We evaluate RLMOpt across four benchmarks spanning structured clinical information extraction (Chia), multi-hop question answering (HotpotQA), verifiable instruction following (IFBench-2025), and multi-turn tool-calling agents (BFCL). In a matched comparison at a single seed, RLMOpt obtains the best held-out score on all four benchmarks and leads the four-task mean (0.610 against 0.589 for GEPA). Repeating each benchmark across seeds yields 11 matched benchmark-seed comparisons, in which RLMOpt outperforms GEPA in 9 cases. Across all 11 runs, it never produced a prompt that underperformed its seed, whereas GEPA fell below its starting point twice. It is also more efficient, achieving these results with fewer search rollouts while producing prompts that are 27-79% the size of those produced by GEPA. Our results further show that optimization gains are determined primarily by the headroom available in the seed prompt, rather than by the search budget. Efficient optimization therefore depends on reaching the available headroom reliably and with minimal search
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。