Module 3 · Communication & protocols

Conflict resolution, voting and consensus

5 min read

Two researchers read different sources and reach contradictory conclusions. Two evaluations of the same note diverge. A router hesitates between two agents. Disagreements are inevitable in a multi-agent system — and that's often good news: they signal real uncertainty. You still need to resolve them explicitly rather than letting the last agent to speak win by default.

First: tell the kinds of disagreement apart

KindExampleSuitable resolution
Verifiable factTwo different dates for the same eventDeterministic check, reference source
Unverifiable factTwo reliable sources contradicting each otherReport the disagreement, with sources
JudgmentNote publishable or notVote, arbiter, explicit criteria
Format / contractAn agent returns an out-of-schema valueValidation, retry

The most common trap is treating an unverifiable factual disagreement as a problem to "solve": forcing a single answer erases valuable information. A good summary says "sources diverge: A states X [doc-1], B states Y [doc-2]".

Rule #1: deterministic before probabilistic

Anything that can be settled by code should be. In Atlas, when the critic approves a note but check_citations detects a nonexistent source, the deterministic check wins:

problems = check_citations(state["draft"], allowed)
if problems:
    review.verdict, review.issues = "revise", [*review.issues, *problems]

A model can be wrong about whether a source exists; a set comparison can't.

Voting: several independent opinions

For a judgment call, asking the model several times and keeping the majority answer reduces the variance of a single opinion. That's the principle of self-consistency.

from collections import Counter
from concurrent.futures import ThreadPoolExecutor


def vote_review(draft: str, question: str, n: int = 3) -> Review:
    prompt = f"Question: {question}\n\nNote:\n{draft}"
    with ThreadPoolExecutor(max_workers=n) as pool:        # independent calls, in parallel
        reviews = list(pool.map(lambda _: extract(SYSTEM_CRITIC, prompt, Review), range(n)))

    verdict, votes = Counter(r.verdict for r in reviews).most_common(1)[0]
    issues = sorted({i for r in reviews if r.verdict == "revise" for i in r.issues})
    return Review(verdict=verdict, issues=issues if verdict == "revise" else [],
                  score=round(sum(r.score for r in reviews) / n))

Points to watch:

  • Cost is multiplied by n. Reserve voting for high-stakes decisions: publishing, approving an action, settling a dispute.
  • An odd number avoids ties on a binary decision.
  • Diversity of opinions is essential: if all voters see exactly the same context phrased the same way, they tend to be wrong together. Vary the perspective (different criteria per voter, presentation order) rather than relying on generation randomness alone.
  • Merge intelligently: here we keep the union of problems raised by "revise" voters, so the writer gets every lead.

The arbiter: an agent that decides with criteria

When positions diverge on substance, an arbiter agent receives the competing positions and an explicit decision grid:

class Arbitration(BaseModel):
    analysis: str                                     # reasoning first
    decision: Literal["A", "B", "both_valid", "insufficient_evidence"]
    justification: str


SYSTEM_ARBITER = """You arbitrate between two contradictory summaries. Criteria, in priority order:
1. The position supported by the most direct source wins.
2. With sources of equal quality, conclude "both_valid" and describe the disagreement.
3. If neither position is sourced, conclude "insufficient_evidence".
Never decide based on the most confident wording."""

Two traits of a good arbiter:

  1. Non-binary options (both_valid, insufficient_evidence): the arbiter can conclude that the disagreement is legitimate instead of forcing a winner.
  2. Ordered criteria: without them, a model tends to prefer the longest or most assertive answer — a bias we'll meet again with the LLM judge (lesson 5.3).

Debate: handle with care

In a debate, agents exchange arguments over several rounds before reaching a conclusion. Debate can surface errors a single agent would have missed, but it has costs and risks:

  • cost grows with rounds × participants;
  • agents tend to converge on the most assertive position, not the most accurate one;
  • without a bound, the debate never ends.

If you use it: limit it to two or three rounds, require each participant to cite sources, and conclude with an arbiter with criteria — not with a soft consensus.

Choosing the strategy

Is the disagreement verifiable by code?                 → deterministic check
Is the disagreement legitimate (contradictory sources)?  → report it, with sources
High-stakes binary decision?                            → vote with 3 (or 5) opinions
Argued positions to decide between?                     → arbiter with ordered criteria
None of the above?                                      → a single opinion is enough

Key takeaways

  • Identify the kind of disagreement: verifiable, legitimate, judgment, or format.
  • Anything that can be settled by code should be, and it overrides a model's opinion.
  • Voting reduces variance but multiplies cost: reserve it for high-stakes decisions and diversify the voters.
  • An effective arbiter has ordered criteria and non-binary options; a legitimate disagreement should be reported, not erased.

Hands-on

  1. Integrate vote_review into Atlas for the final decision only (before human approval), and measure the impact on the number of calls.
  2. Create two contradictory Finding objects and test the arbiter: do you get both_valid when sources are of equal quality?
  3. Change the writer's prompt so it explicitly flags disagreements between sources.

Resources