arXiv cs.AI· Jyotirmoy Nath, Neeraj Kumar, Brejesh Lall·· 12 小时前AI 评分38
Prompt Codebooks:面向语言模型指令优化的离散组合式优化方法
Prompt Codebooks: Discrete Compositional Optimization for Language Model Instruction Refinement
AI 导读
研究者提出 Prompt Codebook Optimization(PCO),将自动提示词优化重构为对自然语言“本能”原子指令单元的离散组合学习,通过 LLM 编码器按输入路由到码本子集并由生成器组合成提示词。
正文 · 原文
Abstract: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.
| Subjects: | Artificial Intelligence (cs.AI) |
| Cite as: | arXiv:2605.28360 [cs.AI] |
| (or arXiv:2605.28360v3 [cs.AI] for this version) | |
| https://doi.org/10.48550/arXiv.2605.28360 arXiv-issued DOI via DataCite |
Submission history
From: Jyotirmoy Nath [view email]
[v1]
Wed, 27 May 2026 11:57:12 UTC (1,179 KB)
[v2]
Mon, 3 Aug 2026 14:49:01 UTC (113 KB)
[v3]
Fri, 16 Oct 2026 16:00:25 UTC (994 KB)
来源:arXiv cs.AI · arxiv.org