Decomposing Prompts: Discovering Reusable Scaffolds and Task-Specific Residuals
Yupeng Chang, Yi Chang, Yuan Wu
ICLR 2026 submission
Abstract. Traditional automatic prompt optimization methods treat prompts as monolithic text blocks, necessitating costly, from-scratch optimization for each new task and precluding knowledge reuse across related tasks. We revisit this monolithic paradigm by proposing an approach where prompts are decomposed into two components: a reusable, domain-invariant Instructional Scaffold that captures high-level task structure, and a concise Task-specific Residual for fine-grained adaptation. We introduce DiSR (Discovering instructional Scaffolds and Residuals), a two-stage algorithm inspired by the Minimum Description Length (MDL) principle, which motivates decomposing prompts into reusable components. This approach systematically discovers the components, allowing for efficient knowledge reuse and task-specific adaptation. In contrast to existing methods like OPRO and AutoPrompt, DiSR enables task-level knowledge reuse, improving performance and reliability across different tasks. Extensive experiments demonstrate that DiSR not only achieves competitive accuracy but also generates better-calibrated confidence estimates, especially on large models and in professional domains. This compositional hypothesis is validated through semantic analysis, revealing that optimized prompts form distinct, scaffold-centered clusters in their embedding space. Our findings establish a compositional view of prompt engineering, facilitating more robust, interpretable, and reusable optimization strategies.
Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.
Claim this paperadd · history
Loading the discussion…