Modular Prompt Optimization: Optimizing Structured Prompts with Section-Local Textual Gradients
Prith Sharma, Austin Z. Henley

TL;DR
This paper introduces Modular Prompt Optimization (MPO), a structured prompt refinement method that applies section-specific textual gradients to improve reasoning accuracy in small language models without changing their parameters.
Contribution
MPO is a novel schema-based framework that optimizes prompts by independently refining fixed semantic sections using section-local gradients, enhancing interpretability and robustness.
Findings
MPO outperforms untuned prompts and TextGrad baseline on reasoning benchmarks.
MPO achieves significant accuracy improvements across models and datasets.
Maintaining prompt structure while optimizing sections is effective for reasoning tasks.
Abstract
Prompt quality plays a central role in controlling the behavior, reliability, and reasoning performance of large language models (LLMs), particularly for smaller open-source instruction-tuned models that depend heavily on explicit structure. While recent work has explored automatic prompt optimization using textual gradients and self-refinement, most existing methods treat prompts as monolithic blocks of text, making it difficult to localize errors, preserve critical instructions, or prevent uncontrolled prompt growth. We introduce Modular Prompt Optimization (MPO), a schema-based prompt optimization framework that treats prompts as structured objects composed of fixed semantic sections, including system role, context, task description, constraints, and output format. MPO applies section-local textual gradients, generated by a critic language model, to refine each section independently…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsParallel Computing and Optimization Techniques · Natural Language Processing Techniques · Topic Modeling
