The Research Report
When One Prompt Won't Do: How MAPRO Uses Probabilistic Inference to Optimize Multi-Agent Systems
You know the problem. You build a multi-agent system. Three agents, maybe four. A coder, a reviewer, a verifier. Each one has a prompt. You tune one prompt, performance goes up. You tune another, it goes down. You tune both, something breaks downstream. The agents are connected, so their prompts can't be optimized in isolation. But nobody gave you a principled way to optimize them together.
MAPRO fixes that. Published at EACL 2026 Findings, with co-authors from Amazon Science and researchers from Notre Dame and UConn, it recasts multi-agent prompt optimization as a probabilistic inference problem. Instead of tweaking prompts one agent at a time and hoping for the best, it uses maximum a posteriori (MAP) inference to find the globally optimal combination of prompts across all agents simultaneously.
This is the second multi-agent prompt optimization paper at a major conference this quarter, alongside MAPGD at AAMAS 2026. The field is waking up to a problem that production teams already know about: when agents talk to each other, optimizing one prompt at a time is not enough.
The Problem: Exponential Search Space, Unclear Credit
Multi-agent systems compound two problems that single-agent prompt optimization does not have.
Exponential search space. Each agent has its own set of prompt candidates. If you have N agents and each has K prompt variants, the total number of possible combinations is K^N. A system with 4 agents and 8 candidates each gives you 4,096 combinations. Add one more agent, it becomes 32,768. Brute force search is dead on arrival.
Ambiguous credit assignment. When the final output is wrong, which agent's prompt is to blame? The reviewer gave bad feedback because it received a confusing code draft from the coder. The verifier rejected a correct solution because the reviewer's prompt told it to be overly cautious. You cannot trace failure back to a single prompt without understanding the entire chain of interactions.
Existing prompt optimization methods like EvoPrompt and PromptBreeder were built for single agents. They treat each agent independently. That works fine when you have one agent. It breaks when agents pass outputs to each other, because improving one agent's prompt can degrade the system's overall performance if that agent now sends different outputs that confuse its downstream neighbors.
The Key Insight: Prompts as Hidden Variables in a Probabilistic Model
MAPRO's core contribution is a reframing. Instead of treating prompt selection as a search problem, it treats it as a statistical inference problem.
Here is the setup. You model the multi-agent system as a directed acyclic graph (DAG). Each agent is a node. Each directed edge represents an information hand-off: agent i sends its output to agent j. For every node, you compute an agent score that measures how well that agent's prompt enables it to do its job. For every edge, you compute an interaction score that measures how well agent i's output, under its current prompt, sets up agent j for success.
The system's overall quality is the product of all node scores and all edge scores. This is the Joint Quality Score. It captures a hard truth: the system is only as strong as its weakest link. One bad prompt at any node, or one bad hand-off at any edge, drags down the whole system.
MAPRO then proves that maximizing this Joint Quality Score is equivalent to a classical MAP inference problem. Under the assumption that each agent's success and each hand-off's success are independent Bernoulli events conditioned on the prompt set, and with a uniform prior over prompt combinations, finding the best set of prompts is exactly the same as finding the most probable configuration of hidden variables in a probabilistic graphical model.
This is not just a mathematical trick. It means you can bring decades of algorithmic machinery from probabilistic inference to bear on prompt optimization. Specifically, you can use belief propagation.
How It Works: Four Stages
MAPRO runs through four stages. Here is what each one does.
Stage 1: Initialization
You start with an existing multi-agent system. Each agent has a base prompt. MAPRO mutates each base prompt into K candidates using standard prompt mutation techniques. This gives you a prompt candidate pool for every agent.
In parallel, you run the system on a small batch of training tasks. Successful execution traces become positive examples for a reward model. Perturbed versions of those traces become negative examples. The reward model is an LLM that will later score how well each prompt candidate enables each agent and each hand-off.
Stage 2: Language-Based MAP Selection
This is where MAPRO solves the inference problem efficiently. Instead of checking all K^N combinations, it uses a variant of max-product belief propagation guided by LLM reward scores.
First, the reward model scores every prompt candidate for every agent (node scores) and every prompt pair for every edge (interaction scores). These scores are real numbers between 0 and 1.
Then, belief propagation runs on the DAG. It starts from the leaf agents and passes messages upward to the root. Each message encodes the best achievable quality for an entire subtree, conditioned on the parent agent's prompt choice. When messages reach the root, the root can compute its optimal prompt. Then a downward pass propagates these optimal choices to every downstream agent.
For systems with multiple parents, MAPRO converts the DAG to a tree-structured equivalent using junction-tree transformation, preserving exact inference.
The result: a globally optimal set of prompts, found in polynomial time instead of exponential time.
Stage 3: Topology-Aware Refinement
Finding the best combination from the current candidate pools is just the first iteration. MAPRO iterates. After each selection round, it runs the system with the chosen prompts, collects actual execution traces, and uses the results to improve the candidate pools.
This is where the topology-aware credit assignment comes in. MAPRO does not just look at whether the system succeeded or failed. It traces failure back through the graph. Downstream agents "blame" upstream agents for bad inputs. A reviewer agent that produced poor feedback because it received a confusing code draft assigns blame to the coder agent, not to itself.
Three types of feedback drive prompt refinement:
- Global feedback from the final execution result (did the system solve the task?)
- Local feedback from downstream agents blaming upstream agents for poor hand-offs
- Mutation constraints that enforce small edits to preserve semantic stability
A critic LLM updates the preference demonstrations. A mutate LLM generates new prompt variants based on the feedback. The candidate pools evolve. The reward models improve.
Stage 4: Termination
The loop stops when improvements plateau. Specifically, when the maximum improvement over a patience window drops below a tolerance threshold, the system outputs the final optimized prompt set for evaluation on held-out test data.
Why Topology-Aware Refinement Matters
Most prompt optimization methods treat each agent independently. They find the best prompt for agent 1, then the best prompt for agent 2, and so on. This ignores the interactions between agents.
MAPRO's topology-aware refinement is different. It uses the graph structure of the multi-agent system to route credit and blame. Agents that sit upstream in the workflow receive blame from their downstream dependents. Agents that receive clean inputs but produce poor outputs get the blame themselves.
This matters because the same agent can perform well with one upstream prompt and poorly with another. The reviewer agent might be excellent when it receives well-structured code but terrible when it receives messy drafts. Topology-aware refinement captures these dependencies.
Results: Consistent State-of-the-Art Performance
MAPRO was tested on six benchmarks across three task categories:
- Code generation: HumanEval-ET, MBPP-Plus, CodeContest
- Question answering: NewsQA, WebQuestions
- Math reasoning: MATH, GSM8K
It used Claude Haiku 3.5 and Llama 3.3-70B as the underlying LLMs.
MAPRO consistently beat every baseline:
- Manual prompting baselines (Chain-of-Thought, ReAct, etc.): MAPRO outperformed all of them by significant margins.
- Single-agent automated optimizers (EvoPrompt, PromptBreeder): MAPRO beat these even when they were applied independently to each agent. The gap was largest on complex multi-step tasks where agent interactions matter most.
- Multi-agent systems without optimization (Chain, DMAD, ChatEval, Swarm): MAPRO's optimized prompts produced large improvements over unoptimized multi-agent systems.
- Multi-agent systems with direct optimization or TPE optimization: MAPRO outperformed these as well, demonstrating that its principled inference-based approach produces better results than naive optimization strategies.
The optimization trajectory was also more stable. While other methods showed erratic improvement with frequent regressions, MAPRO converged steadily. The ablation study confirmed that removing the demonstration-guided reward model caused consistent performance drops across all tasks, validating its role in the framework.
What This Means for Multi-Agent System Design
MAPRO has implications beyond the paper's benchmarks.
Joint optimization is not optional. If you run a multi-agent system, you cannot optimize each agent's prompt in isolation. The interaction effects are real and significant. MAPRO provides a principled way to optimize them jointly.
Probabilistic inference is a natural fit. The MAP formulation is not just elegant. It brings practical benefits. Belief propagation gives you polynomial-time optimization on DAGs. The probabilistic framework gives you a clean objective function. The graph structure gives you natural credit assignment.
Topology matters. The way agents are connected determines how blame flows through the system. A flat pipeline is easier to optimize than a tangled web of dependencies, but MAPRO handles both through junction-tree transformation.
Plug-and-play design. MAPRO does not require changes to the multi-agent system itself. You define your agents, your graph, and your task, then run MAPRO on top. It optimizes prompts without touching the system architecture.
Limitations and Open Questions
MAPRO optimizes prompts for a fixed topology. It does not jointly optimize the graph structure. If you want to figure out whether your system should have 3 agents or 5, or which agent should talk to which, MAPRO will not help with that. It finds the best prompts for the topology you give it.
The reward model is LLM-based rather than a fine-tuned model. The authors note this as a potential area for improvement. A specialized reward model could provide more accurate scores and faster convergence.
The method assumes the multi-agent system can be modeled as a DAG. If your system has cycles (e.g., agents that debate each other iteratively), you would need to modify the approach or unroll the cycles.
The Bigger Picture: Multi-Agent Optimization Is Heating Up
MAPRO is not happening in isolation. It is part of a growing wave of research that treats multi-agent systems as a first-class optimization target rather than a collection of independent single-agent problems.
MAPGD, published at AAMAS 2026, takes a different approach: collaborative gradient descent across agent prompts. Both papers share the same recognition: single-agent prompt optimization methods fail in multi-agent settings because they ignore inter-agent dependencies.
This convergence is significant. When two independent research groups publish at top conferences in the same quarter, both arguing that multi-agent prompt optimization requires joint, structured approaches, you are watching a field crystallize around a new paradigm.
For practitioners building multi-agent systems, the message is clear. Stop optimizing agent prompts one at a time. The interactions between agents matter as much as the individual prompts. Methods like MAPRO give you a principled way to account for those interactions.
Citations
- Zhang, Z., Ge, L., Li, H., Zhu, W., Zhang, C., & Ye, Y. (2026). MAPRO: Recasting Multi-Agent Prompt Optimization as Maximum a Posteriori Inference. Findings of EACL 2026, pages 4458–4480. arXiv:2510.07475. https://arxiv.org/abs/2510.07475
- ACL Anthology entry: https://aclanthology.org/2026.findings-eacl.233/
- Amazon Science listing: https://www.amazon.science/publications/mapro-recasting-multi-agent-prompt-optimization-as-maximum-a-posteriori-inference
Suggested Title
When One Prompt Won't Do: How MAPRO Uses Probabilistic Inference to Optimize Multi-Agent Systems
Word Count
~1,750
Fact-Check Notes
- The paper was published at EACL 2026 Findings, pages 4458-4480. Confirmed via ACL Anthology.
- Co-authors include researchers from Amazon (affiliation 3), University of Notre Dame (affiliation 1), and University of Connecticut (affiliation 2). The first author notes the work was done during an internship at Amazon.
- The benchmark results are described as "state-of-the-art" and "consistently surpassing" baselines. Specific numerical results are in the paper's tables but were not all reproduced in the HTML version. The qualitative claims (consistent improvement, stable convergence) are directly from the paper.
- The MAPGD paper at AAMAS 2026 is a separate, independent work. Both address multi-agent prompt optimization with different methods (MAP inference vs. gradient descent).
- The junction-tree transformation for handling DAGs with multiple parents is described in Appendix C.2 of the paper.
- The stopping criterion and ablation details are from the paper's Section 3 and experimental sections.