Agentic Engineering from First Principles All chaptersLecturesLabDownload the book
Part IV · Agents Working Together

Chapter 19: Debate and Voting

Central questionCan several agents make a better decision than one? And what happens when their errors are correlated, or when the most persuasive answer is wrong?

Lecture

Chapter principle

Collective intelligence requires error diversity. More agents help only when they contribute sufficiently independent information, and the system can aggregate that information reliably. Consensus by itself is not evidence of truth.

Key takeaways

Experiments

Every experiment in the book is small, runnable and printed with its real output. In the Lab you can replay a recorded real run of each one, with no programming, and watch what the model and the agent do.

Experiment 34: Voting

When does a majority vote fix errors, and when does it repeat them?

Which supplier had the lower defect rate last year? The true answer is B. Each voter is a real model that reads one source and answers from it. A filing and an analyst note say B; a promotional blog from supplier A says A. The votes are counted four times with different mixes of sources: three different sources, two voters reading the same blog, nine voters with seven on the blog, and an even split. This is a recorded run of a real model.

Experiment 35: Judge and debate

Can a model judge tell which of two agents is right?

Two agents disagree about 4817 × 263. The right answer is 1,266,871; the wrong one is 1,267,201. A real model, acting as a judge with no tools, must pick the right agent. There are three cases: bare claims, where the wrong agent sounds confident; only the right agent shows its working; and both show working, with a hidden slip in the wrong one. Each case runs with the right answer first and then second, three verdicts each. A grounded judge checks both answers with a calculator. This is a recorded run.

All the code for this chapter: github.com/agentic-engineering-book/code

This is Chapter 19 of Agentic Engineering from First Principles: thirty chapters, a case study and fifty-nine executable experiments, from a single model call to controlled, self-improving agents.
Download the bookBrowse all chapters
← Chapter 18: Supervisor and WorkersChapter 20: Shared State →