The Research Report
Two Frameworks Walk Into a Multi-Agent Prompt Problem
How MAPRO and MASPO Are Rewriting the Rules of Multi-Agent Prompt Optimization
Multi-agent AI systems need more than good prompts. They need coordinated prompts—sets where each agent's instructions fit together like parts in a machine. One agent generates reasoning. Another checks it. A third synthesizes. If any prompt is misaligned, the whole chain breaks down.
Optimizing prompts for a single agent is hard enough. Optimizing them jointly across a graph of interacting agents? That is a different problem entirely. The search space explodes. Credit assignment becomes ambiguous. Changing one agent's prompt shifts what downstream agents see, which changes their behavior, which changes the system outcome.
Two papers published in early 2026 tackle this problem directly. MAPRO (Amazon Science, EACL 2026 findings) recasts multi-agent prompt optimization as a Maximum a Posteriori inference problem and solves it with a language-guided belief propagation algorithm. MASPO (arXiv:2605.06623, May 2026) frames it as a joint evaluation problem and solves it with trace-guided evolutionary beam search.
Both papers arrive at the same insight from different directions: multi-agent prompt optimization is fundamentally an inference problem. But their techniques, evaluation mechanisms, and practical trade-offs differ in ways that matter for anyone building production agent systems.
The Problem: Why Multi-Agent Prompt Optimization Is Hard
Before getting into the solutions, it helps to understand why this problem resists simpler approaches.
A multi-agent system is a directed graph. Agents are nodes. Edges represent information flow—one agent's output becomes another's input. When you optimize prompts in such a system, you are not tuning isolated components. You are tuning a coupled system where every change cascades.
The challenges break into two categories:
Combinatorial search space. Each agent has its own prompt candidate pool. If you have N agents each with K candidates, the joint search space contains K^N combinations. Brute-force enumeration is not feasible.
Credit assignment ambiguity. When the system produces a bad final output, which agent's prompt is responsible? An upstream agent might generate reasoning that looks locally correct but mislead downstream peers. Or a downstream agent might fail to extract useful signals from good upstream output. Isolating which prompt should change is genuinely difficult.
Existing single-agent prompt optimization methods do not handle these issues well. They assume you can evaluate a prompt in isolation. In a multi-agent setting, that assumption breaks.
MAPRO: Maximum a Posteriori Inference on DAGs
MAPRO, from researchers at the University of Notre Dame, University of Connecticut, and Amazon, published at EACL 2026, takes a probabilistic framing from the start.
The Joint Quality Score
The key insight in MAPRO is that a multi-agent system can be modeled as a collection of independent events—each agent succeeding at its task, each hand-off between agents being clean. If you assume these events are independent given the prompt configuration, then the probability that the entire system executes correctly is the product of all individual probabilities.
MAPRO defines a Joint Quality Score for a prompt configuration P:
𝓣(P) = (∏ agents g(pᵢ)) × (∏ edges g(pᵢ, pⱼ))
Here, g(pᵢ) measures how well agent i performs under prompt pᵢ. And g(pᵢ, pⱼ) measures how reliably the hand-off works from agent i under pᵢ to agent j under pⱼ.
Under a uniform prior over prompt sets, maximizing 𝓣(P) is equivalent to solving a Maximum a Posteriori (MAP) inference problem. This is the framing MAPRO builds around.
Language-Guided Max-Product Belief Propagation
Finding the optimal prompt assignment in a DAG is not trivial even with the probabilistic framing. MAPRO uses a language-guided variant of the max-product belief propagation (MPBP) algorithm to navigate the search space efficiently.
The algorithm works in two stages:
Reward model scoring. An LLM-based reward model R evaluates each prompt candidate in isolation. For each agent i, Rᵢ scores g(pᵢᵏ) for every candidate k in the pool. For each directed edge (i → j), Rᵢⱼ scores g(pᵢᵏ, pⱼˡ) for every pair of prompt candidates. Scores range from 0 to 1, where 1 means flawless behavior.
Optimal prompt searching. With scores in hand, MPBP runs on the DAG. Messages pass from leaf nodes toward the root, aggregating local最优 sub-solutions. Because the graph is acyclic, this message-passing converges to a global optimum in polynomial time.
For multi-parent dependencies (nodes receiving from multiple predecessors), MAPRO uses a junction-tree transformation to convert the structure to an equivalent tree, then runs MPBP on that.
Topology-Aware Refinement for Credit Assignment
The probabilistic framing also helps with credit assignment. MAPRO maintains distinct prompt policies for each agent—not a single global policy. During iterations, execution feedback is propagated backward through the graph, with downstream agents assigning blame to upstream prompts that failed them.
This topology-aware refinement means that when a downstream agent produces a bad output, the system can trace back through edges to identify which upstream prompts contributed to the failure. Credit is distributed based on the graph structure, not just final outcomes.
Results
MAPRO achieves state-of-the-art performance across benchmarks in mathematical reasoning, question answering, and code generation. The MAP inference formulation lets it approximate globally optimal prompt assignments efficiently rather than getting stuck in local optima from greedy search.
MASPO: Joint Evaluation and Evolutionary Search
MASPO, published May 7, 2026 on arXiv by researchers from Tianjin University, takes a different approach. Where MAPRO borrows probabilistic inference machinery, MASPO builds its solution around joint evaluation and evolutionary search.
The Credit Assignment Problem in MAS
MASPO identifies a specific failure mode it calls Local-Global Misalignment: an agent satisfies its local instructions perfectly but generates outputs that mislead downstream peers, causing system-wide failure.
Existing evaluation approaches either check local validity (did this agent do what it was asked?) or final outcome alignment (did the system succeed?). Neither captures what MASPO calls the ripple effect—how an agent's output propagates through the chain to affect successors.
Multi-Granularity Joint Evaluation
MASPO addresses credit assignment with a composite evaluation function that scores each prompt candidate across three dimensions:
Local Validity asks: does the candidate's output satisfy role-specific constraints better than the baseline?
Lookahead Potential asks: do downstream agents produce better outputs when fed the new context generated by this agent? This measures the ripple effect on immediate successors.
Global Alignment asks: does the final system response improve?
The joint reward is a weighted combination:
R = α·Local + θ·Global + β·Lookahead
By combining all three, MASPO identifies misalignment cases—samples where local validity holds but lookahead or global alignment fails. These cases are stored and fed back into the generation stage to guide the optimizer toward fixes for specific coordination breakdowns.
Misalignment-Aware Sampling
This is one of MASPO's key innovations. Rather than treating all failed traces equally, MASPO explicitly mines and stores Misalignment Cases—scenarios where an agent fulfilled its local role but induced system-wide failure.
During candidate generation, these cases are injected into the few-shot context for the Optimizer Model. By exposing the optimizer to hard negatives where local success coexisted with global failure, MASPO forces the generation of offspring that specifically bridge the gap between local instructions and global goals.
Trace-Guided Evolutionary Beam Search
MASPO navigates the high-dimensional prompt space with an evolutionary beam search. For each optimization step, it maintains a beam of top-K candidates. Each candidate is evaluated on sampled traces, and cumulative performance scores are accumulated:
J(p') = R(p', pparent; Biter) + J(p_parent)
The beam is refreshed dynamically as agents co-adapt. When one agent's prompt changes, downstream agents face new input distributions. The Beam Refresh mechanism realigns each agent's search tree to the current state of its peers, mitigating the non-stationarity that plagues sequential optimization.
The overall scheduling follows topological order—agents are optimized sequentially following the graph structure—but with interleaved evolution: each agent is optimized for only T steps before freezing and moving to the next, then cycles through D rounds. This prevents upstream agents from overfitting to early, suboptimal downstream behaviors.
Results
MASPO reports an average accuracy improvement of 2.9 percentage points over state-of-the-art baselines across six diverse tasks. It consistently outperforms methods that optimize prompts independently or use simpler beam search without misalignment guidance.
How the Two Frameworks Compare
MAPRO and MASPO share a conceptual framing—both treat multi-agent prompt optimization as an inference problem—but their technical approaches diverge significantly.
| Dimension | MAPRO | MASPO |
|---|---|---|
| Framing | MAP inference (probabilistic) | Joint evaluation (multi-objective) |
| Core algorithm | Language-guided max-product belief propagation | Trace-guided evolutionary beam search |
| Credit assignment | Topology-aware backward blame propagation | Multi-granularity joint evaluation with misalignment mining |
| Search strategy | Exact inference on DAG via message passing | Beam search with dynamic refresh |
| Evaluation | Agent scores + edge scores (0-1 scalar) | Local validity + lookahead + global alignment |
| Handling non-stationarity | Implicit in inference | Explicit via Beam Refresh mechanism |
| Key innovation | MAP formulation + junction-tree transformation | Misalignment-Aware Sampling |
| Benchmarks | Math reasoning, QA, code generation | 6 diverse tasks (MATH-500, AGIEval, AQuA, etc.) |
MAPRO's strengths come from its principled probabilistic framing. The MAP formulation gives a clear objective function, and max-product belief propagation lets it find global optima efficiently on DAGs. The topology-aware credit assignment via backward blame propagation is elegant and well-motivated.
MASPO's strengths come from its richer evaluation mechanism. By scoring on lookahead potential—does this agent's output actually help downstream agents?—it catches coordination failures that local-only or global-only evaluation miss. Misalignment-Aware Sampling is a practical technique that directly addresses the hardest failure mode in multi-agent systems.
What the Inference-Time Framing Adds
Both papers make a point that deserves emphasis: treating prompt optimization as an inference problem changes how you design solutions.
Traditional prompt optimization, even automated approaches, tends to treat prompts as fixed strings to be tuned against a fixed evaluation signal. That works for single agents. For multi-agent systems, it fails because the evaluation signal is non-stationary—changing one prompt changes the input distribution for all downstream agents.
The inference framing avoids this by:
Exploiting structure. Both MAPRO and MASPO exploit the graph topology of the multi-agent system rather than treating it as a flat optimization landscape. MAPRO uses message passing along edges. MASPO respects topological ordering and uses lookahead evaluation.
Distributing credit. Both frameworks assign credit to specific agent-edge pairs rather than to global outcomes. MAPRO propagates blame backward through the graph. MASPO evaluates ripple effects directly.
Handling non-stationarity explicitly. In multi-agent optimization, the objective function changes as you optimize because other agents are changing simultaneously. Both frameworks have mechanisms to handle this: MAPRO's inference process naturally accounts for changing contexts; MASPO's Beam Refresh explicitly re-aligns search trees.
This inference framing also suggests future directions. If multi-agent prompt optimization is MAP inference, then techniques from probabilistic inference—variational methods, sampling-based approaches, incremental updating—could all transfer. The framing also invites thinking about uncertainty: not just which prompt is best, but how confident the system is that a given prompt assignment will work.
Practical Implications
For teams building multi-agent systems today, both frameworks offer concrete guidance:
MAPRO is well-suited to systems where the agent graph is fixed and the main question is which prompt candidates to assign to each role. Its belief propagation approach is efficient for moderate-sized graphs and provides optimality guarantees within its modeling assumptions. The junction-tree transformation handles complex dependency structures.
MASPO is better suited to systems where coordination failures are the primary failure mode and you need explicit mechanisms to detect and fix them. Its misalignment mining is particularly valuable for systems with long chains where local errors compound. The evolutionary beam search is more flexible for open-ended prompt refinement.
Neither framework requires labeled data—MAPRO seeds its reward model with synthetic positives and negatives from initial runs, and MASPO uses self-supervised comparison against baseline prompts. This makes them applicable to production settings where ground-truth labels are scarce.
The Convergence to Come
MAPRO and MASPO represent a convergence: the multi-agent AI community is recognizing that prompt optimization in multi-agent settings is not a scaling problem or a prompting problem. It is an inference problem.
The two papers land on similar high-level conclusions from different technical directions. That convergence is a signal. As multi-agent systems grow in complexity and deployment scale, the need for principled, scalable prompt optimization will only increase. The inference framing gives researchers and engineers a shared vocabulary and a set of tools to build on.
The next wave of work will likely combine elements of both—MAP inference with joint evaluation, belief propagation with evolutionary search. Where that leads is an open question. But the foundation being built right now, by these two papers and others like them, is establishing the terms of the debate.
When your agent system starts failing in ways you cannot trace, it will not be because your prompts are wrong. It will be because your prompts are not coordinated. And that is an inference problem, not a tuning problem.