TLDR: MA-SAPO is a novel multi-agent framework designed to optimize Large Language Model (LLM) prompts. It overcomes limitations of existing methods by explicitly linking evaluation scores to structured reasoning. In its ‘Reasoning Phase,’ specialized agents create reusable ‘reasoning assets’ (explanations, diagnoses, and edit directives). In the ‘Test Phase,’ other agents retrieve these assets to analyze new prompts and apply evidence-grounded refinements. This approach results in more transparent, auditable, and controllable prompt optimizations, consistently outperforming single-pass, retrieval-augmented, and other multi-agent baselines on HelpSteer benchmarks while being computationally efficient.
Large Language Models (LLMs) have become incredibly powerful tools for a wide array of tasks, from complex reasoning to generating creative content. However, their performance is highly sensitive to the quality and structure of the prompts they receive. This sensitivity has led to the emergence of prompt optimization as a crucial area of research, offering a practical alternative to costly model retraining.
Traditional prompt optimization methods often treat the evaluation process as a ‘black box,’ relying solely on numerical scores without providing clear insights into why a prompt succeeds or fails. Many approaches also depend heavily on repetitive trial-and-error refinements, which can be difficult to interpret and control. To address these limitations, researchers have introduced MA-SAPO, a Multi-Agent framework for Score-Aware Prompt Optimization.
MA-SAPO stands out by explicitly connecting evaluation outcomes with structured reasoning to guide systematic prompt edits. The framework operates in two distinct phases: the Reasoning Phase and the Test Phase.
The Reasoning Phase: Building Knowledge Assets
During the Reasoning Phase, MA-SAPO employs a collaborative team of AI agents to transform raw evaluation scores into valuable, reusable ‘reasoning assets.’ This process involves three specialized agents:
- Metric Explainer Agent: This agent interprets the numerical evaluation scores (such as helpfulness, correctness, coherence, complexity, and verbosity) and provides natural language justifications for why certain scores were assigned.
- Diagnostician Agent: Building on the explanations, this agent analyzes metric-level weaknesses and trade-offs. It identifies the root causes of low scores and explains how different metrics might interact (e.g., increasing verbosity might decrease coherence).
- Action Synthesizer Agent: This agent converts the diagnostic insights into concrete, actionable edit directives. These directives are specific modification strategies designed to improve the prompt while preserving its original intent.
These outputs—the reasoning card, diagnostic summary, and edit directives—are stored as semi-structured text, forming a corpus of ‘reasoning assets’ that can be retrieved and utilized later.
The Test Phase: Guided Prompt Refinement
In the Test Phase, when a new prompt needs optimization, MA-SAPO uses a retrieval-augmented pipeline. It identifies and retrieves the most relevant reasoning assets from its stored corpus. Two agents then work in tandem:
- Analyzer Agent: This agent compares the new prompt against the retrieved examples and their associated reasoning assets. It identifies specific improvement opportunities and highlights concrete weaknesses by contrasting the current prompt with evidence-backed insights from the assets.
- Refiner Agent: Based on the improvement report generated by the Analyzer Agent, the Refiner Agent regenerates an optimized version of the prompt. This process ensures that refinements are focused, justifiable, and consistent with diagnostic evidence, avoiding arbitrary changes.
This systematic approach ensures that prompt optimizations are not only effective but also transparent, auditable, and controllable, allowing users to understand the rationale behind each change.
Also Read:
- Adaptive Search: How Reinforcement Learning Powers Intelligent AI Agents
- Boosting AI Teamwork: How Verification-Aware Planning Enhances Multi-Agent Systems
Performance and Efficiency
Extensive experiments conducted on the HelpSteer1 and HelpSteer2 benchmarks demonstrate that MA-SAPO consistently outperforms various baselines, including single-pass prompting methods, retrieval-augmented generation (RAG) without reasoning assets, and other multi-agent frameworks like MAD and MARS. MA-SAPO achieved higher average scores across all five quality dimensions (helpfulness, correctness, coherence, complexity, and verbosity).
Ablation studies further confirmed the importance of MA-SAPO’s modular design, showing that separating the Analyzer and Refiner roles leads to more robust and consistent performance. Human evaluations also validated the framework’s ability to produce higher-quality, more useful, accurate, and consistent reasoning, while effectively preserving the semantic intent of the original prompts during optimization.
Beyond its effectiveness, MA-SAPO is also significantly more computationally efficient than other multi-agent systems. By constructing reasoning assets offline and employing a streamlined Analyzer-to-Refiner loop during testing, it drastically reduces the number of tokens processed and API calls required, making it a more practical solution for prompt optimization.
In conclusion, MA-SAPO offers a principled and efficient framework for prompt optimization, transforming evaluation signals into interpretable reasoning chains. This leads to prompt refinements that are more transparent, auditable, and controllable, marking a significant step forward in enhancing the performance of Large Language Models. For more details, you can refer to the full research paper here.


