Modular Prompt Optimization: Optimizing Structured Prompts with Section-Local Textual Gradients
On the map: LLM reasoning → Prompting and chain-of-thought reasoning
Abstract (arXiv)
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 while keeping the overall prompt schema fixed. Section updates are consolidated through de-duplication to reduce redundancy and interference between components, yielding an interpretable and robust optimization process. We evaluate MPO on two reasoning benchmarks, ARC-Challenge and MMLU, using LLaMA-3 8B-Instruct and Mistral-7B-Instruct as solver models. Across both benchmarks and models, MPO consistently outperforms an untuned structured prompt and the TextGrad baseline, achieving substantial accuracy gains without modifying model parameters or altering prompt structure. These results demonstrate that maintaining a fixed prompt schema while applying localized, section-wise optimization is an effective and practical approach for improving reasoning performance in small open-source LMs.
Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). Placed in Prompting and chain-of-thought reasoning, one of 17 directions in LLM reasoning. Builds on 23 of its 27 references that are in the map. First posted on arXiv 7 Jan 2026.
Builds on
23 of 27 references.
References · 23
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2020Measuring Massive Multitask Language Understandingcited by 7,768
- 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,710
- 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,064
- 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,878
- 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,769
- 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,317
- 2022Large Language Models Are Human-Level Prompt Engineerscited by 1,020
- 2019How Can We Know What Language Models Know?cited by 953
- 2020Aligning AI With Shared Human Valuescited by 706
- 2023Automatic Prompt Optimization with "Gradient Descent" and Beam Searchcited by 628
- 2021Prompt Programming for Large Language Models: Beyond the Few-Shot Paradigmcited by 599
11 more
- 2025GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learningcited by 449
- 2025Small Language Models are the Future of Agentic AIcited by 254
- 2024TextGrad: Automatic "Differentiation" via Textcited by 250
- 2024Prompt Optimization with Human Feedbackcited by 35
- 2024Task Facet Learning: A Structured Approach to Prompt Optimizationcited by 17
- 2025GAAPO: Genetic Algorithmic Applied to Prompt Optimizationcited by 10
- 2024Introducing MAPO: Momentum-Aided Gradient Descent Prompt Optimizationcited by 8
- 2025A Survey on Prompt Tuningcited by 7
- 2025A Taxonomy of Prompt Defects in LLM Systemscited by 7
- 2025promptolution: A Unified, Modular Framework for Prompt Optimizationcited by 6
- 2025EmbedGrad: Gradient-Based Prompt Optimization in Embedding Space for Large Language Modelscited by 1
Built on by
Citing papers per year: 2026: 5.
5 papers.
- 2026When Gradients Collide: Failure Modes of Multi-Objective Prompt Optimization for LLM Judgescited by 1
- 2026AgentGrad: Intervention-guided Prompt Optimization for Multi Agent Systemscited by 1
- 2026Prompt Codebooks: Discrete Compositional Optimization for Language Model Instruction Refinementcited by 0
- 2026From Monolithic to Modular: Segment-level Automatic Prompt Optimizationcited by 0
- 2026SEPO: Evidence-Grounded Prompt Optimization via Structural Editingcited by 0
- 2026AgentGrad: Intervention-guided Prompt Optimization for Multi Agent Systems8 Sep 2026
- 2026SEPO: Evidence-Grounded Prompt Optimization via Structural Editing28 Aug 2026
- 2026From Monolithic to Modular: Segment-level Automatic Prompt Optimization21 Jul 2026
- 2026Prompt Codebooks: Discrete Compositional Optimization for Language Model Instruction Refinement27 May 2026
- 2026When Gradients Collide: Failure Modes of Multi-Objective Prompt Optimization for LLM Judges25 May 2026
Similar, not cited
Close in wording, no citation either way
- 2025Rethinking Prompt Optimizers: From Prompt Merits to Optimization
- 2025Self-Supervised Prompt Optimization
- 2024GReaTer: Gradients over Reasoning Makes Smaller Language Models Strong Prompt Optimizers
- 2026Beyond Prompt or Skill? Attribution-Guided Optimization of Modular LLM Programs
- 2026Reflective Prompt Tuning through Language Model Function-Calling
- 2026STEVE: Stabilizing Textual Gradient-Based Prompt Optimization via Error-Driven Refinement and Regularized Verification
- 2026Adaptive Prompt Structure Factorization: A Framework for Self-Discovering and Optimizing Compositional Prompt Programs
- 2025ZERA: Zero-init Instruction Evolving Refinement Agent -- From Zero Instructions to Structured Prompts via Principle-based Optimization