Class DebateExecutor

java.lang.Object
com.tnsai.coordination.debate.DebateExecutor

public final class DebateExecutor extends Object
Debate executor for adversarial collaboration between LLM agents.

Two agents argue opposing positions while a judge evaluates and synthesizes the arguments into a final verdict. This pattern improves reasoning quality by exposing weaknesses through adversarial challenge.

Usage


 DebateExecutor debate = DebateExecutor.builder()
     .proponent(proponentLLM)
     .opponent(opponentLLM)
     .judge(judgeLLM)
     .maxRounds(3)
     .format(DebateFormat.STRUCTURED)
     .build();

 DebateResult result = debate.execute("Should we use microservices for this project?");
 System.out.println(result.verdict());
 System.out.println("Confidence: " + result.confidence());
 
Since:
0.0.5
See Also:
  • Method Details

    • execute

      public DebateResult execute(String topic)
      Executes a debate on the given topic.
      Parameters:
      topic - the topic to debate
      Returns:
      the debate result with verdict and argument history
    • builder

      public static DebateExecutor.Builder builder()