Skip to main content
Swarm Type: DebateWithJudge

Overview

The DebateWithJudge swarm type implements a structured debate architecture with progressive self-refinement. Two debater agents — one arguing in favor (Pro) and one arguing against (Con) — present opposing arguments on a given topic. An impartial Judge agent evaluates both sides, provides feedback, and synthesizes the strongest elements into a refined answer. This process repeats over multiple loops, with each round producing progressively better arguments and a more nuanced final synthesis. Key features:
  • Structured Argumentation: Pro and Con agents present opposing perspectives with evidence-based reasoning
  • Impartial Evaluation: A Judge agent objectively assesses argument quality and provides constructive feedback
  • Progressive Refinement: Each debate loop builds on the judge’s synthesis, producing increasingly refined arguments
  • Convergent Synthesis: The final output combines the strongest elements from both sides into a well-reasoned conclusion

Use Cases

  • Policy analysis requiring balanced pro/con evaluation
  • Strategic decision-making with structured trade-off analysis
  • Risk assessment where both opportunities and threats need rigorous examination
  • Technology evaluation comparing competing approaches
  • Investment analysis weighing bull and bear cases
  • Ethical dilemma resolution with multi-perspective reasoning

API Usage

Basic DebateWithJudge Example

The DebateWithJudge architecture requires exactly 3 agents in a specific order:
  1. Pro Agent — argues in favor of the proposition
  2. Con Agent — argues against the proposition
  3. Judge Agent — evaluates both sides and provides synthesis
Example Response:

Best Practices

  • Always provide exactly 3 agents in the correct order: Pro (first), Con (second), Judge (third)
  • Design Pro and Con prompts to be balanced in depth — a one-sided debate produces a weak synthesis
  • Use lower temperature (0.3-0.4) for the Judge agent to ensure consistent, objective evaluation
  • Increase max_loops for complex topics that benefit from multiple rounds of refinement — each loop produces stronger arguments
  • DebateWithJudge works best for binary or comparative questions where opposing perspectives add genuine analytical value