Skip to content

Parallel Sampling

ParallelSamplingStepDescription runs the same reasoning N times and aggregates the candidates — majority vote or an LLM judge. This is the “LLM council” pattern.

from mmar_carl import (
ParallelSamplingStepDescription, ParallelSamplingStepConfig, ParallelSamplingAggregation,
)
ParallelSamplingStepDescription(
number=1,
title="Sample answers",
aim="Answer the question.",
config=ParallelSamplingStepConfig(
n_samples=5,
aggregation=ParallelSamplingAggregation.MAJORITY_VOTE,
),
)
FieldDefaultPurpose
n_samples—How many candidates to sample.
aggregation—How to pick a winner (below).
judge_prompt""Prompt for the best_of_n / llm_judge judge.
normalize_for_vote—Normalise text before majority comparison.
ParallelSamplingAggregationPicks the winner by…
MAJORITY_VOTEmost common response (exact / normalised match).
BEST_OF_Nan LLM judge selects the best candidate.
LLM_JUDGEalias for best_of_n with an explicit judge_prompt.
  • Debate — structured argument instead of independent samples.