Modular Prompt Optimization (2026)
FreeTreats prompts as structured objects; optimizes each semantic section independently with local textual gradients
About Modular Prompt Optimization (2026)
Modular Prompt Optimization (MPO) is a schema-based prompt optimization framework that treats prompts as structured objects composed of fixed semantic sections—system role, context, task description, constraints, and output format. It applies section-local textual gradients, generated by a critic language model, to refine each section independently while keeping the overall prompt schema fixed. Updates are consolidated through de-duplication to reduce redundancy and interference between components, yielding an interpretable and robust optimization process. MPO is evaluated on two reasoning benchmarks (ARC-Challenge and MMLU) using LLaMA-3 8B-Instruct and Mistral-7B-Instruct as solver models, consistently outperforming untuned structured prompts and the TextGrad baseline without modifying model parameters or altering prompt structure.
Key Features
Pros & Cons
- Outperforms untuned structured prompts and the TextGrad baseline on reasoning benchmarks
- Maintains a fixed prompt schema, preserving critical instructions and preventing uncontrolled prompt growth
- Interpretable optimization process with section-wise refinement and deduplication
- Requires no modification to model parameters or changes to prompt structure
- Effective for small open-source instruction-tuned models that rely on explicit structure
- Only evaluated on two reasoning benchmarks (ARC-Challenge, MMLU); generalizability to other tasks not yet demonstrated
- Requires a separate critic language model to generate textual gradients, adding computational overhead
- Relies on a predefined prompt schema; may not be suitable for tasks where optimal schema is unknown or varies
- Untested on creative or open-ended tasks that do not fit a fixed semantic section structure