chapter six

6 Voter: Leveraging stochasticity for improved outputs

 

This chapter covers

  • Leveraging stochasticity in probabilistic for agentic workflows
  • How Voter uses ensemble sampling for robustness, possible-outcome exploration, and confidence estimation
  • Voter architecture, including the dispatch element, worker IE, and reconciliation procedure.
  • Voter variants: Committee and Divergent Committeefor bias reduction and space mapping
  • Voter in action: math reasoning, evaluation committees, aggregate safety analysis

The transition from a naïve but often wrong agent to a robust agent can be helped with a simple realization: language models are not calculators; they are probabilistic engines. When a model’s generation temperature (the scaling factor applied to the probability distribution of its output tokens) is set to anything above zero and the predicted tokens are sampled, the model effectively “rolls the dice” for every word it produces. While fixing the random seed can make this process deterministic, the natural stochasticity of these models means that for any given set of inputs, their outputs are generally not reproducible. Ask a model the same complex question eight times, and you may receive eight different paths to an answer.

6.1 To quickly summarize the above: By running an ensemble of probabilistic model instances on the same problem, one can arrive at a distribution of outcomes or results. This distribution can then be leveraged to explore the set of possible answers, find the most favored answer, or to estimate the confidence one should place in any given answer. This approach is captured by the Voter pattern. The pain point: Stochastic inference producing variable outputs

6.2 How the Voter pattern works

6.2.1 Tradeoffs

6.2.2 Implementation sketch

6.2.3 When and where to use the Voter pattern

6.2.4 How Voter works with other patterns

6.3 Voter pattern variants

6.3.1 Committee

6.3.2 Divergent Committee (“Loose Ensemble”)

6.4 Applying the Voter pattern: Use case examples

6.4.1 Simple test-time compute scaling (TTCS) of mathematical reasoning

6.4.2 Committee of judges

6.4.3 Automatic travel safety assessment

6.5 Summary