Class PeerReviewExecutor

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

public final class PeerReviewExecutor extends Object
Peer review executor where one agent produces and another reviews iteratively.

Agent A produces output, Agent B reviews it and suggests improvements, Agent A incorporates feedback and produces a revised version. This repeats until the reviewer is satisfied or max iterations reached.

Usage


 PeerReviewExecutor review = PeerReviewExecutor.builder()
     .producer(producerLLM)
     .reviewer(reviewerLLM)
     .maxIterations(3)
     .build();

 PeerReviewResult result = review.execute("Write a REST API design document");
 System.out.println(result.finalOutput());
 System.out.println("Iterations: " + result.iterationsUsed());
 
Since:
0.0.5