arXivDaily arXiv每日学术速递 周一至周五更新
​通知:联邦节假日调休:哥伦布日 / 原住民日(Columbus Day / Indigenous Peoples' Day),今日(13日)无更新。
arXiv 2605.28360cs.AI

提示码本:面向语言模型指令精炼的离散组合优化

Prompt Codebooks: Discrete Compositional Optimization for Language Model Instruction Refinement

IIT Delhi(印度德里理工学院)

Jyotirmoy Nath, Neeraj Kumar, Brejesh Lall

AI总结:

提出Prompt Codebooks (PCO)框架,将自动提示优化重构为离散组合学习,通过可重用的自然语言本能单元实现实例级路由和结构化反馈,在多个基准上提升性能并压缩提示长度。

摘要:

自动提示优化(APO)显著提升了基于LLM的智能体工作流。然而,现有方法将每个任务的提示视为一个整体、实例无关的字符串,通过全局编辑进行优化,导致更新脆弱且无法复用学到的子行为。我们提出提示码本(PCO),一种新颖的组合式提示优化框架,将APO重构为在有限自然语言本能(原子、可重用的指令单元)词汇表上的离散学习。PCO将提示构建知识组织在离散码本中,通过基于LLM的编码器将每个输入路由到少量条目;生成器将它们组合成冻结目标模型的提示;评论器输出结构化判决,通过归因分解为每个变量的文本梯度,在语言值极小极大目标下联合训练编码器、生成器和码本。得到的路由是实例级的:同一任务的不同输入接收不同的本能组合,这种机制在实例无关方法下结构上无法表达。在Qwen3-8B和LLaMA-3.1-8B上的六个基准测试中,PCO相比零样本提升高达+30.36分,在HotpotQA上超越最强先前基线(GEPA)达+3.34分,总体平均提升+1.11分,并且仅使用K=16个本能即可将部署提示长度相比MIPROv2压缩最多14.1倍,相比GEPA压缩3.0倍。

英文摘要:

Automatic prompt optimization (APO) has driven significant gains in LLM-based agentic workflows. However, most existing methods treat each task's prompt as a monolithic, instance-blind string optimized through global edits, producing brittle updates and preventing the reuse of learned sub-behaviors. We propose Prompt Codebook Optimization (PCO), a novel compositional prompt optimization framework that recasts APO as discrete learning over a finite vocabulary of natural-language instincts--atomic, reusable instruction units. PCO organizes prompt-construction knowledge in a discrete codebook and routes each input to a small subset of entries via an LLM-based encoder; a generator composes them into a prompt for the executor; a critic emits a structured verdict that decomposes by attribution into per-variable textual gradients, jointly training the encoder, generator, critic, and codebook under a language-valued min-max objective. The resulting routing is per-instance: different inputs in the same task receive different instinct compositions. Across six benchmarks, PCO improves aggregate performance over zero-shot by +13.50 points on Qwen3-8B and +11.80 points on LLaMA-3.1-8B. Crucially, PCO surpasses GEPA on HotpotQA by +6.34 points (Qwen3-8B) and +4.27 points (LLaMA-3.1-8B), while simultaneously reducing deployed prompt length by up to 14.1$\times$ vs. MIPROv2 and 3.0$\times$ vs. GEPA.

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

↑