Module contents
Lesson 26 of 31Advanced 110 min

Multi-agent architectures

Study multi-agent topologies, debate and voting, specialized roles, context isolation and empirical failure taxonomies. Compare multi-agent systems with single agents and self-consistency at equal budgets, accounting for coordination cost and correlated errors.

After this lesson you can

  • Describe multi-agent topologies and reason about token cost, latency and error propagation.
  • Implement agent debate and compare it with self-consistency at equal token cost using a paired comparison.
  • Build an orchestrator launching isolated research subagents on the local corpus and measure the token multiplier.
  • Analyze multi-agent traces with MAST and validate classification using a second annotator or judge.
  • Use Condorcet’s jury theorem to explain why correlated agents limit gains from voting and debate.

Before you start

Splitting work has a cost

Research with independent sources supports parallel branches: each worker receives a bounded question and returns findings with citations. Splitting a tightly coupled change, however, can duplicate reading, create incompatible interfaces and require rework. A multi-agent system distributes decisions among components with distinct roles, contexts or tools; an extra call is not automatically an independent second perspective.

In a star, an orchestrator decomposes, delegates and synthesizes. A hierarchy adds intermediate coordinators; peers communicate directly; a blackboard exposes shared artifacts; and debate exchanges proposals and reviews before deciding. A star centralizes synthesis and can make it a bottleneck; peer communication grows with the number of links and a blackboard needs rules to avoid incompatible writes. In every case log input and output tokens, calls, errors, wall time and critical path. Parallelism reduces latency only with available resources; it does not necessarily reduce total computation.

InteractiveTopology and common failure

Channels: coordinator → 2 workers in parallel → 1 reviewer in sequence → result.

Coordinator
1: worker2: worker
→ 3: reviewerResult

Without common failure all workers must succeed: base probability is p to the number of workers. On error, each reviewer independently detects it with probability d and repair succeeds with probability 0.8. A common shock invalidates the result with probability ρ. Without workers there is no initial solution. Calls each count one token unit; branches overlap only in the parallel topology. Values illustrate assumptions, not empirical estimates or Pearson correlation.

Assumed success75.7 %
Relative tokens4
Critical steps3
Assign roles, choose channels and compare the assumed effect of review and common failure.

Majority, dependence and debate

Debate proposes answers, exchanges them and allows revision. Du and colleagues study this mechanism in reasoning and factuality; Smit and colleagues compare strategies, and Wang and colleagues examine discussion limits. The result depends on task, instructions, model and budget; consensus does not verify an answer.

Let XiX_i indicate whether agent ii succeeds, with probability p>1/2p>1/2, independently and identically distributed, and let nn be odd. The vote fails if ∑iXi/n≤1/2\sum_i X_i/n \leq 1/2. By Hoeffding, that probability is at most exp⁡[−2n(p−1/2)2]\exp[-2n(p-1/2)^2], which tends to zero. Thus the probability of a correct vote tends to one: a form of Condorcet’s jury theorem.

Now introduce a common shock with probability ρ\rho: when it occurs everyone fails; otherwise successes are independent with probability pp. The vote succeeds with probability (1−ρ)P(mayorıˊa correcta∣sin shock)(1-\rho)P(\text{mayoría correcta}\mid\text{sin shock}), which never exceeds 1−ρ1-\rho and tends to that limit. This is a concrete counterexample, not a formula for arbitrary correlation. In general the variance of a sum includes covariances: if many errors move together, extra votes may add less evidence than independent votes.

InteractiveDebate or vote

In the first trial, correct responses per round: 1 → 1 → 0 of 3. With probability ρ a common failure makes all samples incorrect; otherwise each initial response is independent and correct with probability p. Each round, each agent copies the previous majority with probability c, without new evidence.

Voting uses n·(rounds + 1) samples under the same shock and assumed cost; ties are random. Copying the majority cannot reverse it in this model: unanimity can increase without improving accuracy. One unit per answer is a simplification, not equality of real tokens; model measurement counts input and output.

Correct debate68.6 %
Correct vote80.1 %
Unanimous debate95.6 %
Units per method9
Change conformity and compare simulated debate with a vote at assumed equal cost.

The figure models only agents copying the majority without receiving new evidence; conformity can produce mistaken unanimity. In real systems an argument can add evidence but can also pull the rest toward a wrong answer. For an equal-budget comparison, measure all tokens in prior messages, answers, evaluation and synthesis. Compare debate, self-consistency and an agent with review on the same questions, with declared seeds and limits. If methods consume different tokens, report quality versus cost rather than calling nominal budgets equivalent.

Roles, isolation and contracts

Role specialization assigns concrete responsibilities and outputs, such as planning, implementation and review. MetaGPT and ChatDev explore development processes with roles; a standard procedure can reduce ambiguity, but formal compliance does not guarantee a specification is correct. Define schema, sources, length limits and what the recipient should do with incomplete data.

Context isolation gives each worker only the relevant task, permissions and documents. A useful answer includes claims, verifiable citations, uncertainty and a list of sources consulted, not the entire history. The orchestrator verifies citations exist and support claims before synthesis. Isolation does not automatically turn correlated outputs into independent evidence or guarantee a summary retains every nuance. AutoGen and Magentic-One describe different conversation and coordination frameworks; the protocol must specify who speaks, when it stops and what happens on error.

On twenty HotpotQA questions we compared a star with two isolated researchers and synthesis against one call retrieving four passages. The orchestrator used 20,423 tokens and the baseline 11,049: a 1.85 multiplier, with unequal spending. Both scored 0/20 on literal match after citations were removed; many answers contain the correct fact plus an explanation, so zero is not a semantic error rate. Citations were checked after generation, not as a gate before delivery: 13/20 and 15/20 answers contained valid identifiers, respectively; sentence-level NLI marked support in 1/20 and 4/20. NLI is not a human audit or proof of causality. Branches ran serially on a shared GPU even though the graph expresses parallelizable dependencies.

To inspect the run, download the 20 recorded traces. To repeat it, first prepare rag-eval/hotpot.json, docs.json and index.npz using lesson 23 cells; download the workflow engine and orchestrator to the same directory and run python orchestrator.py with CUDA, transformers, bitsandbytes, sentence-transformers and NumPy. Each question saves its trace, budget, answers, citations and tokens in multiagent-lab/orchestrator.json. Caps are equal as limits, not as consumed cost.

Failures and evidence

The MAST taxonomy organizes observed failures into system design, inter-agent misalignment and task verification. Cemri and colleagues analyze real traces; a category can describe a symptom without itself proving its root cause. Retain task, messages, tools, state and success criterion so another annotator can disagree. An automatic judge label requires validation against independent in-domain annotations; do not treat it as truth by definition.

InteractiveExplore your own traces

Question: Were Scott Derrickson and Ed Wood of the same nationality?

Reference: yes

Answer: Yes, Scott Derrickson and Ed Wood were both of American nationality. This can be concluded from the following evidence: - Scott Derrickson is described as an "American director, screenwriter and producer" [d1]. - Ed Wood was an "American filmmaker, actor, writer, producer, and director" [d

First-pass rationale: La cita de Ed Wood queda abierta: [d no es un identificador de fuente válido.

Exact match may reject a correct answer with explanation. UNKNOWN also includes cases where the trace cannot support a cause; do not count them as proven semantic failures.

Assistant passVERIFICATION
Automatic judgeVERIFICATION
Your choiceChoose
Filter by category and compare the result with evidence for each assistant annotation.

In orchestrator traces the assistant selected 30 component events with observable defects and labeled SYSTEM 16, INTERACTION 1 and VERIFICATION 13. Each reading cites an output fragment. Twenty-seven events reached the 64-token maximum: many issues are cut-off sentences or citations even when the main answer is correct. These are events from 15 questions, not 30 independent runs, and two branches may repeat the same output. A second pass by the same assistant agreed 30/30, kappa 1; both passes are AI annotations, neither human nor independent.

A Qwen2.5-7B GGUF CPU judge classified the same events using an adaptation of the three MAST families and an UNKNOWN option. Two outputs had no valid category and were excluded from agreement: among the remaining 28 it agreed on 10, with kappa 0.166 and a question-clustered bootstrap interval [0.027, 0.321]. The judge shares a model family with the evaluated system and is not independent human validation. In this sample, reviewing completion and citations merits priority by frequency, without confusing frequency with severity. Inspect events, both readings and the judge.

The selector also retains another sample: the first 30 outputs not literally matching the reference, 15 from the star and 15 from the single agent. In that sample the first pass labeled SYSTEM 2, INTERACTION 1, VERIFICATION 6 and UNKNOWN 21. The judge assigned UNKNOWN to all: it agreed on 21/30, but kappa was 0 due to its label distribution. UNKNOWN includes semantically correct answers with extra explanation and cases whose cause cannot be attributed; literal mismatch alone does not establish failure. Full traces and annotations are available.

Useful analysis distinguishes frequency from severity: a rare error invalidating all answers may deserve priority over a frequent, easily recoverable failure. Define rules for traces with several failures, compare two passes and measure agreement beyond raw matching. The published human MAST dataset is an external reference, not a replacement for traces and annotations from your own system.

To repeat the judge with the same CPU model, download the adapter, evaluator, events and 20 orchestrator traces under their original names to the same directory; run python component-judge-cpu.py. Manual excerpts do not enter the judge prompt.

[ ]Agreement between readings and judgeBrowser
from collections import Counter

primera = ['VERIFICATION', 'SYSTEM', 'SYSTEM', 'SYSTEM', 'SYSTEM', 'SYSTEM', 'VERIFICATION', 'VERIFICATION', 'VERIFICATION', 'SYSTEM', 'VERIFICATION', 'VERIFICATION', 'VERIFICATION', 'VERIFICATION', 'SYSTEM', 'SYSTEM', 'SYSTEM', 'SYSTEM', 'SYSTEM', 'SYSTEM', 'SYSTEM', 'VERIFICATION', 'INTERACTION', 'SYSTEM', 'SYSTEM', 'VERIFICATION', 'VERIFICATION', 'SYSTEM', 'VERIFICATION', 'VERIFICATION']
segunda = ['VERIFICATION', 'SYSTEM', 'SYSTEM', 'SYSTEM', 'SYSTEM', 'SYSTEM', 'VERIFICATION', 'VERIFICATION', 'VERIFICATION', 'SYSTEM', 'VERIFICATION', 'VERIFICATION', 'VERIFICATION', 'VERIFICATION', 'SYSTEM', 'SYSTEM', 'SYSTEM', 'SYSTEM', 'SYSTEM', 'SYSTEM', 'SYSTEM', 'VERIFICATION', 'INTERACTION', 'SYSTEM', 'SYSTEM', 'VERIFICATION', 'VERIFICATION', 'SYSTEM', 'VERIFICATION', 'VERIFICATION']
juez = ['VERIFICATION', 'VERIFICATION', 'UNKNOWN', 'UNKNOWN', 'UNKNOWN', 'UNKNOWN', 'SYSTEM', 'VERIFICATION', None, 'SYSTEM', 'VERIFICATION', 'INTERACTION', 'VERIFICATION', 'VERIFICATION', 'VERIFICATION', 'VERIFICATION', 'UNKNOWN', 'UNKNOWN', 'UNKNOWN', 'VERIFICATION', 'INTERACTION', 'UNKNOWN', 'INTERACTION', 'INTERACTION', 'VERIFICATION', None, 'VERIFICATION', 'INTERACTION', 'VERIFICATION', 'VERIFICATION']
categorias = ('SYSTEM', 'INTERACTION', 'VERIFICATION', 'UNKNOWN')

def acuerdo(a, b):
    pares = [(x, y) for x, y in zip(a, b) if y in categorias]
    n = len(pares)
    observado = sum(x == y for x, y in pares) / n
    izquierda, derecha = Counter(x for x, _ in pares), Counter(y for _, y in pares)
    esperado = sum(izquierda[c] * derecha[c] for c in categorias) / n**2
    return n, observado, (observado - esperado) / (1 - esperado) if esperado < 1 else None

print('frecuencias:', dict(Counter(primera)))
print('segundo pase:', acuerdo(primera, segunda))
print('juez:', acuerdo(primera, juez))

Local laboratory: debate, vote and review

We compare three agents with two review rounds, nine samples for self-consistency and one initial answer with eight successive revisions. Each method processes nine 512-token inputs and generates exactly 64 tokens per call: 5184 tokens per method and question. Shorter inputs are padded with neutral token . before the chat template and end tokens are blocked until 64 are complete. Padding and forced length can alter responses; they are not a natural production budget. The nine voting calls are generated separately, and each debate round receives all three outputs from the previous round.

The experiment uses Qwen2.5-7B-Instruct GGUF Q4_K_M on CPU with llama-cpp-python 0.3.36, eight threads, temperature 0.7 and top-p 0.95. Seeds, revisions, padding and sampling appear in the manifest; the same seeds are reused across questions, so question-level intervals are exploratory. It uses ten GSM8K questions and ten computer science MMLU questions. An answer without marker FINAL: is counted incorrect even if it contains a correct solution in another format.

It requires transformers, llama-cpp-python, pandas, pyarrow and requests, and space for both model shards. The downloadable script saves each call in multiagent-cpu/events.json, checks the manifest before resuming and calculates paired bootstrap on completion. The campaign ran on CPU under shared load; all 540 calls completed.

On GSM8K, debate solved 3/10, voting 1/10 and review 2/10. The paired debate-minus-vote difference was 0.200, bootstrap interval [0.000, 0.500]; against review it was 0.100 [0.000, 0.300]. An aggregate answer could not be extracted in 7, 9 and 7 cases, respectively.

On MMLU, debate solved 3/10, voting 7/10 and review 7/10. The paired debate-minus-vote difference was -0.400, bootstrap interval [-0.700, -0.100]; against review it was -0.400 [-0.700, -0.100]. An aggregate answer could not be extracted in 6, 2 and 2 cases, respectively.

Each method spent 103680 tokens on the twenty questions. Intervals are exploratory: there are ten questions per dataset, repeated seeds across questions and a strict format limit. Padding and 64 forced tokens can change behavior. Answers, events, manifest and analysis allow review of each case.

[ ]Debate, vote and review with equal tokensLocal GPU
"""Debate, voto y revisión con 5184 tokens por pregunta y método en CPU GGUF."""
import collections,decimal,hashlib,itertools,json,random,re,time
from pathlib import Path
import pandas as pd
import llama_cpp
from huggingface_hub import hf_hub_download
from transformers import AutoTokenizer
ROOT=Path('multiagent-cpu');ROOT.mkdir(parents=True,exist_ok=True)
MODEL_REV='bb5d59e06d9551d752d08b292a50eb208b07ab1f'
MANIFEST={'protocol':'cpu-gguf-512-64-v1','model':'Qwen/Qwen2.5-7B-Instruct-GGUF',
          'revision':MODEL_REV,'quantization':'Q4_K_M','tokenizer_revision':'a09a35458c702b33eeacc393d103063234e8bc28',
          'backend':'llama-cpp-python 0.3.36','threads':8,'context':2048,'input_tokens':512,'output_tokens':64,
          'temperature':0.7,'top_p':0.95,'top_k':50,'min_p':0,'repeat_penalty':1,
          'filler_token':659,'eog_mask':[128247,151643,151645,151662,151663,151664],
          'weight_sha256':['dfce12e3862a5283ccfb88221b48480e58745165de856439950d0f22590580db','539cf93f78e887edea1c04e2d7d8cdaca9d01dae9c9025bcb8accbe29df3d72a'],
          'seeds':'debate 260000+3*ronda+agente; voto 261000+agente; revisión 262000+paso; mismas semillas por pregunta',
          'gsm8k_sha256':'3730d312f6e3440559ace48831e51066acaca737f6eabec99bccb9e4b3c39d14',
          'mmlu_sha256':'6e1b210896afc60f2ea3a1b011733b86dedd74690adce6ff0893346089f83252'}
def run(cases_override=None):
 manifest=ROOT/'manifest.json'
 if cases_override is None:
  if manifest.exists():
   if json.loads(manifest.read_text(encoding='utf8'))!=MANIFEST:raise ValueError('Manifiesto de protocolo incompatible')
  elif (ROOT/'events.json').exists():raise ValueError('Hay eventos sin manifiesto: preservar y revisar antes de reanudar')
  else:manifest.write_text(json.dumps(MANIFEST,ensure_ascii=False,indent=2),encoding='utf8')
 names=['qwen2.5-7b-instruct-q4_k_m-00001-of-00002.gguf','qwen2.5-7b-instruct-q4_k_m-00002-of-00002.gguf']
 paths=[hf_hub_download('Qwen/Qwen2.5-7B-Instruct-GGUF',name,revision=MODEL_REV) for name in names]
 if cases_override is None:
  for path,digest in zip(paths,MANIFEST['weight_sha256']):
   h=hashlib.sha256()
   with open(path,'rb') as f:
    while chunk:=f.read(8*1024*1024):h.update(chunk)
   if h.hexdigest()!=digest:raise ValueError('Hash de pesos inesperado')
 path=paths[0]
 model=llama_cpp.Llama(model_path=path,n_ctx=2048,n_threads=8,n_batch=512,n_gpu_layers=0,verbose=False)
 tok=AutoTokenizer.from_pretrained('Qwen/Qwen2.5-7B-Instruct',revision='a09a35458c702b33eeacc393d103063234e8bc28')
 if cases_override is None:
  for filename,key in [(str(ROOT/'gsm8k-test.jsonl'),'gsm8k_sha256'),(str(ROOT/'mmlu.parquet'),'mmlu_sha256')]:
   if hashlib.sha256(Path(filename).read_bytes()).hexdigest()!=MANIFEST[key]:raise ValueError('Hash del conjunto inesperado')
  gsm=[json.loads(x) for x in (ROOT/'gsm8k-test.jsonl').read_text(encoding='utf8').splitlines()][:10]
  table=pd.read_parquet(ROOT/'mmlu.parquet').head(10)
  cases=[(r['question'],'numeric',r['answer'].split('####')[-1].strip().replace(',','')) for r in gsm]
  for _,r in table.iterrows():
   question=r['question']+'\n'+'\n'.join(f'{chr(65+i)}: {v}' for i,v in enumerate(r['choices']))
   cases.append((question,'letter',chr(65+int(r['answer']))))
 else:cases=cases_override
 filler=tok.encode(' .',add_special_tokens=False);assert filler==[MANIFEST['filler_token']] if cases_override is None else len(filler)==1
 vocab=llama_cpp.llama_model_get_vocab(model._model.model)
 eog=[i for i in range(model.n_vocab()) if llama_cpp.llama_vocab_is_eog(vocab,i)]
 if cases_override is None:assert eog==MANIFEST['eog_mask']
 def mask_eog(ids,scores):scores[eog]=-float('inf');return scores
 processor=llama_cpp.LogitsProcessorList([mask_eog])
 ledger_path=ROOT/'events.json';ledger=json.loads(ledger_path.read_text(encoding='utf8')) if ledger_path.exists() else {}
 def ask(prompt,key,seed):
  if key in ledger:
   old=ledger[key];assert old['prompt']==prompt and old['seed']==seed
   return old['text']
  chat=tok.apply_chat_template([{'role':'user','content':prompt}],tokenize=False,add_generation_prompt=True)
  ids=tok(chat,add_special_tokens=True)['input_ids'];assert ids==model.tokenize(chat.encode(),add_bos=False,special=True)
  if len(ids)>512:raise ValueError(f'{key}: {len(ids)} tokens de entrada significativos exceden 512')
  inputs=filler*(512-len(ids))+ids;model.reset();model.set_seed(seed);started=time.perf_counter()
  generated=list(itertools.islice(model.generate(inputs,temp=.7,top_p=.95,min_p=0,top_k=50,repeat_penalty=1,logits_processor=processor),64))
  assert len(generated)==64
  text=model.detokenize(generated).decode('utf8',errors='replace')
  ledger[key]={'prompt':prompt,'seed':seed,'text':text,'input_tokens':512,'meaningful_input_tokens':len(ids),
               'filler_tokens':512-len(ids),'output_tokens':64,'seconds':time.perf_counter()-started}
  temp_path=ledger_path.with_suffix('.tmp');temp_path.write_text(json.dumps(ledger,ensure_ascii=False,indent=2),encoding='utf8');temp_path.replace(ledger_path)
  print('CPU debate',len(ledger),'/540',key,round(ledger[key]['seconds'],2),'s',flush=True)
  return text
 def parse(text,kind):
  pattern=r'FINAL\s*:\s*\$?\s*([-+]?\d[\d,]*(?:\.\d+)?)' if kind=='numeric' else r'FINAL\s*:\s*([A-D])\b'
  m=re.search(pattern,text,re.I)
  if not m:return None
  if kind=='letter':return m.group(1).upper()
  try:return str(decimal.Decimal(m.group(1).replace(',','')).normalize())
  except decimal.InvalidOperation:return None
 def majority(items):
  xs=[x for x in items if x is not None]
  if not xs:return None
  counts=collections.Counter(xs);return next(x for x in xs if counts[x]==max(counts.values()))
 records=[]
 for index,(question,kind,gold) in enumerate(cases):
  gold_norm=str(decimal.Decimal(gold).normalize()) if kind=='numeric' else gold
  prompt=question+'\n'+('Finish with FINAL: followed by the numeric answer.' if kind=='numeric' else 'Finish with FINAL: followed by A, B, C or D.')
  result={}
  previous=[]
  for round_no in range(3):
   extra='' if not previous else '\nOther answers:\n'+'\n'.join(previous)+'\nReview independently.'
   previous=[ask(prompt+extra,f'{index}-debate-{round_no}-{a}',260000+round_no*3+a) for a in range(3)]
  answer=majority([parse(x,kind) for x in previous]);result['debate']={'answer':answer,'correct':answer==gold_norm if answer is not None else False,'tokens':5184}
  samples=[ask(prompt,f'{index}-voto-0-{a}',261000+a) for a in range(9)]
  answer=majority([parse(x,kind) for x in samples]);result['voto']={'answer':answer,'correct':answer==gold_norm if answer is not None else False,'tokens':5184}
  previous=ask(prompt,f'{index}-revision-0-0',262000)
  for j in range(1,9):previous=ask(prompt+'\nReview your previous answer:\n'+previous,f'{index}-revision-{j}-0',262000+j)
  answer=parse(previous,kind);result['revision']={'answer':answer,'correct':answer==gold_norm if answer is not None else False,'tokens':5184}
  records.append({'index':index,'question':question,'kind':kind,'gold':gold_norm,'results':result})
  (ROOT/'debate.json').write_text(json.dumps(records,ensure_ascii=False,indent=2),encoding='utf8')
  print('CPU pregunta completa',index,{k:v['correct'] for k,v in result.items()},flush=True)
 rng=random.Random(26);summary={}
 for kind in ('numeric','letter'):
  subset=[r for r in records if r['kind']==kind];summary[kind]={}
  for baseline in ('voto','revision'):
   delta=[int(r['results']['debate']['correct'])-int(r['results'][baseline]['correct']) for r in subset]
   boot=sorted(sum(rng.choice(delta) for _ in delta)/len(delta) for _ in range(2000))
   summary[kind][baseline]={'difference':sum(delta)/len(delta),'ci':[boot[49],boot[1949]]}
 (ROOT/'summary.json').write_text(json.dumps(summary,ensure_ascii=False,indent=2),encoding='utf8')
 print('CPU resumen',summary,flush=True)

if __name__=='__main__':
 import hashlib,requests
 sources=[('gsm8k-test.jsonl','https://raw.githubusercontent.com/openai/grade-school-math/3101c7d5072418e28b9008a6636bde82a006892c/grade_school_math/data/test.jsonl','3730d312f6e3440559ace48831e51066acaca737f6eabec99bccb9e4b3c39d14'),('mmlu.parquet','https://huggingface.co/datasets/cais/mmlu/resolve/c30699e8356da336a370243923dbaf21066bb9fe/high_school_computer_science/test-00000-of-00001.parquet','6e1b210896afc60f2ea3a1b011733b86dedd74690adce6ff0893346089f83252')]
 for name,url,digest in sources:
  p=ROOT/name
  if not p.exists():
   response=requests.get(url,timeout=90);response.raise_for_status();p.write_bytes(response.content)
  if hashlib.sha256(p.read_bytes()).hexdigest()!=digest:raise ValueError('Hash inesperado')
 hf_hub_download('Qwen/Qwen2.5-7B-Instruct-GGUF','qwen2.5-7b-instruct-q4_k_m-00002-of-00002.gguf',revision=MODEL_REV)
 run()
This cell needs the local lab (PyTorch with your GPU). Start it with npm run lab and open the connection link.

Exercises

CodeRound and aggregation
Implement debate_round(agents, question, previous_answers): each agent function receives the question and an independent copy of previous answers and returns its new answer. Implement aggregate(answers, mode, judge=None): in majority mode return the most frequent answer and, on a tie, the first among tied answers; in judge mode call judge with a copy of answers. Reject empty lists and unknown modes.
def debate_round(agents, question, previous_answers):
  pass

def aggregate(answers, mode, judge=None):
  pass
Shift+Enter to run
Quiz
What follows from introducing probability ρ of a common failure that makes all agents fail?
NumericMultiplier
An orchestrator spends 6,000 tokens and launches four subagents of 25,000 tokens each. What is the cost multiplier relative to a 12,000-token agent?
Quiz
Which task has a decomposition worth testing with parallel subagents?
Quiz
Five agents outperform a single cheap prompt. What additional comparison is needed?
Key idea
More agents can broaden exploration, but consensus is useful evidence only when dependence, sources and coordination cost are understood.