Multi-Agent Patterns: Ensembling
Intent
Sample independently many times and aggregate by voting or by a synthesizer, with no interaction between the samples.
Introduction
Generative language models are inherently stochastic; a single inference pass can fall into local reasoning traps, arithmetic slips, or hallucinated formatting. When architectural designers seek higher reliability, two distinct multi-agent paradigms emerge: Peer Debate and Ensembling.
While Peer Debate orchestrates multi-turn conversational cross-examination—multiplying sequential path depth and interactive latency—the Ensembling pattern takes a non-interactive, feed-forward approach. It samples independent candidate responses concurrently and reconciles them through a deterministic aggregation function or a synthesizer model. Because candidate generations share no runtime communication, control flow is completely fixed and execution is embarrassingly parallel.
Latency vs. Cost: The Critical Path Advantage
In production agentic architectures, total token cost and sequential path depth represent fundamentally different trade-offs:
- Debate: Incurs ~5× token cost and ~4× sequential model call depth. Each round must wait for the preceding turn to complete, making debate unsuitable for user-facing, real-time interactive budgets.
- Ensembling: Also incurs ~5× token cost, but maintains a path depth of ~1×. Because all samples fire simultaneously over a batch or parallel async requests, latency matches that of a single generation (plus a minor constant aggregation overhead).
Aggregation Topologies: Voting vs. Synthesis
The core mechanism of Ensembling is the aggregation function that resolves diverse samples into a single response:
- Majority Voting & Self-Consistency: Applied to tasks with decidable or exact answers (code output, mathematical calculations, classification). Multiple chain-of-thought trajectories are sampled with non-zero temperature, and the answer corresponding to the mathematical mode is selected.
- Model-Based Synthesis (Mixture-of-Agents): Applied when outputs are long-form or unstructured prose where exact string equality does not exist. A synthesizer LLM receives all candidate generations simultaneously in context, evaluating strengths and merging the most accurate elements into a unified response.
- Best-of-N with Verifiers: Candidate samples are individually scored by an independent verifier model or test harness, selecting the highest-ranked output without full synthesis.
Trade-offs & Failure Modes
Ensembling provides powerful error-reduction guarantees, but introduces distinct economic and structural constraints:
Trivially Parallel Latency
Maintains a sequential path depth of ~1×. Unlike multi-round debate, all samples execute concurrently, fitting comfortably within interactive user budgets.
Deterministic Control Flow
Eliminates runaway dynamic routing and debate loops. The harness executes a fixed number of samples and feeds them to the aggregator every time.
Decidable Aggregation Bound
Majority voting requires outputs that can be tested for equality. In open-ended creative tasks, no two answers match, forcing reliance on a synthesizer.
Confidence Inflation & Correlated Errors
Identical models sharing the same underlying pre-training biases will make correlated mistakes. Unanimous consensus among samples often mimics certainty when all are wrong.
Known Uses
Ensembling is pervasive in state-of-the-art inference scaling and competitive reasoning frameworks:
- Self-Consistency: A widely deployed reasoning framework where models sample diverse reasoning chains with non-zero temperature, selecting the most consistent final answer [1].
- Mixture-of-Agents (MoA): An architecture that groups multiple LLMs across layered rounds, ensembling intermediate model answers to synthesize a final answer superior to any individual model [2].
- Code Generation Best-of-N: Competitive code generation benchmarks run N parallel generations through sandboxed unit test runners, accepting the first sample that passes all assertions.
References
-
[1]
Wang, X., Wei, J., Schuurmans, D., Le, Q., Chi, E., Narang, S., Chowdhery, A., & Zhou, D. (2022). Self-Consistency Improves Chain of Thought Reasoning in Language Models. arXiv preprint arXiv:2203.11171.
https://arxiv.org/abs/2203.11171 -
[2]
Wang, J., Wang, J., Athiwaratkun, B., Zhang, C., & Zou, J. (2024). Mixture-of-Agents Enhances Large Language Model Capabilities. arXiv preprint arXiv:2406.04692.
https://arxiv.org/abs/2406.04692