liveBook · Manning

Voter

As explained in Agent Design Patterns

Voter is an agent design pattern that aggregates outputs from multiple invocations to provide a robust result or confidence information.

A model may take different reasoning paths on repeated attempts at the same problem. When an agent needs one answer, that variability can produce inconsistent results. A Voter uses it instead: run the same worker multiple times, treat each result as a vote, and reconcile the votes into a final output. section 6.0 section 6.1

Figure 6.1 The sketch AFD of the Voter pattern. The input initially makes its way through the dispatcher, which starts multiple instances of the worker IE. Each worker IE instance produces an intermediate “voting trajectory'” output, which is then gathered by a reconciliation procedure such as majority voting. The reconciliation procedure then yields the final output (the “voting result”).

The flow is dispatcher → parallel worker invocations → reconciliation → final result. Each worker invocation produces one voting trajectory. section 6.2

The three responsibilities are:

  • Dispatch: launch a chosen number of independent trajectories. Different seeds can exploit the worker’s natural stochasticity; small input perturbations can create variation instead. section 6.2
  • Work: invoke the same model or agent on the task and produce an identifiable answer from each run. section 6.2
  • Reconcile: normalize the answers, then return the most frequent one, a subset of favorable outcomes, or a distribution over outcomes. section 6.2

A generic implementation accepts a worker, vote count, reconciliation function, and optional input perturbation. It prepares one input per vote, starts the worker calls as parallel tasks, waits for their results, and passes those results to reconciliation. If an irreversible majority is reached, an implementation can stop remaining trajectories early rather than wait for every vote. section 6.2.2

Voting on a mathematical answer

Run the same solver on a problem several times with different random seeds. Extract the final answer from each reasoning chain and return the most frequent answer. This can filter out some stochastic reasoning errors, but it spends more inference compute than a single solver call. section 6.4.1 section 6.2.1

Choose the reconciliation output to match the task. For a single-answer task, a frequent answer can make repeated engagements more consistent. For a task with several plausible results, retain the outcome distribution to explore alternatives or report estimated confidence and uncertainty. These estimates come from the sampled outcomes. section 6.2.3

Voting is most useful when the worker has a reasonable chance of finding the right answer and its runs can be independent. Repeating the same worker is not the same as assigning different jobs to cooperating agents: Voter trajectories pursue the same task, and reconciliation is typically simple. Compared with a Resampler’s failure-dependent retries, independent votes can run in parallel but increase cost. Committee variants use distinct models, personas, or objectives to reduce bias or map a broader outcome space. section 6.2 section 6.2.4 section 6.5

How Agent Design Patterns covers it

How deep it goes
Defines dispatcher, worker, and reconciliation responsibilities, then sketches asynchronous parallel execution and optional early stopping.
Examples
Illustrates parallel mathematical reasoning chains whose extracted answers are reconciled by most-frequent-answer voting.
What it assumes
Assumes familiarity with model or agent invocations while defining their roles within dispatch, voting, and reconciliation.
What you can do after
Build it from scratch with a worker, optional input perturbation, parallel tasks, vote collection, and a reconciliation function.
How it connects
Contrasts independent voting with Resampler retries and distinguishes shared-worker trajectories from Orchestrator, Agent Swarm, and DPR workflows.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Agent Design Patterns. The section links point to the parts of the book it draws on.