2605.28360v1 May 27, 2026 cs.AI

프롬프트 코드북: 언어 모델 지시 개선을 위한 이산적 구성 최적화

Prompt Codebooks: Discrete Compositional Optimization for Language Model Instruction Refinement

Jyotirmoy Nath
Jyotirmoy Nath
Citations: 0
h-index: 0
Neeraj Kumar
Neeraj Kumar
Citations: 0
h-index: 0
B. Lall
B. Lall
Citations: 628
h-index: 14

자동 프롬프트 최적화(APO)는 LLM 기반 에이전트 워크플로우에서 상당한 성능 향상을 가져왔습니다. 그러나 기존 방법은 각 작업의 프롬프트를 독립적인 문자열로 취급하며, 전체적으로 수정하여 최적화하기 때문에 불안정한 업데이트가 발생하고 학습된 하위 동작을 재사용하는 데 어려움이 있습니다. 본 논문에서는 Prompt Codebooks (PCO)라는 새로운 구성 기반 프롬프트 최적화 프레임워크를 제안합니다. PCO는 APO를 자연어 추론의 유한 어휘 집합에 대한 이산적인 학습으로 재구성하며, 이는 원자적이고 재사용 가능한 지시 단위입니다. PCO는 프롬프트 생성 지식을 이산적인 코드북 형태로 구성하고, LLM 기반 인코더를 사용하여 각 입력을 작은 부분집합의 항목으로 라우팅합니다. 제너레이터는 이러한 항목을 결합하여 고정된 대상 모델에 대한 프롬프트를 생성하며, 크리틱은 구조화된 판단을 내놓고, 이는 변수별 텍스트 그래디언트로 분해됩니다. 인코더, 제너레이터 및 코드북은 언어 값을 갖는 최소-최대 목표를 통해 공동으로 학습됩니다. 결과적으로 라우팅은 각 인스턴스에 따라 달라지므로, 동일 작업 내의 서로 다른 입력은 서로 다른 추론 조합을 받게 되며, 이는 인스턴스 독립적인 방법으로는 구조적으로 표현할 수 없습니다. Qwen3-8B 및 LLaMA-3.1-8B 모델에서 수행한 6가지 벤치마크 테스트 결과, PCO는 제로샷 성능 대비 최대 +30.36%의 성능 향상을 보였으며, HotpotQA에서 가장 강력한 기존 방법(GEPA)보다 +3.34%, 전체적으로 +1.11% 더 높은 성능을 달성했습니다. 또한 PCO는 K=16개의 추론만 사용하면서 MIPROv2에 비해 최대 14.1배, GEPA에 비해서는 3.0배 더 짧은 프롬프트를 사용하는 것으로 나타났습니다.

Original Abstract

Automatic prompt optimization (APO) has driven significant gains in LLM-based agentic workflows. However, 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 Codebooks (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 frozen target model; a critic emits a structured verdict that decomposes by attribution into per-variable textual gradients, jointly training the encoder, generator, 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, a regime structurally inexpressible under instance-blind methods. Across six benchmarks on Qwen3-8B and LLaMA-3.1-8B, PCO improves over zero-shot by up to +30.36 points, surpasses the strongest prior baseline (GEPA) by +3.34 on HotpotQA and +1.11 in aggregate, and reduces deployed prompt length by up to 14.1x versus MIPROv2 and 3.0x versus GEPA using only K=16 instincts.

0 Citations
0 Influential
7 Altmetric
35.0 Score
Original PDF

No Analysis Report Yet

This paper hasn't been analyzed by Gemini yet.

Log in to request an AI analysis.

댓글

댓글을 작성하려면 로그인하세요.

아직 댓글이 없습니다. 첫 번째 댓글을 남겨보세요!