Package com.tnsai.coordination.council
Class CouncilExecutor
java.lang.Object
com.tnsai.coordination.council.CouncilExecutor
Multi-model council deliberation executor.
Orchestrates a 3-stage pipeline inspired by Karpathy's llm-council:
- Stage 1 - Individual Responses: All members answer independently in parallel
- Stage 2 - Peer Review: Members evaluate anonymized responses and rank them
- Stage 3 - Chairman Synthesis: Chairman produces final answer using responses + rankings
Usage
CouncilExecutor council = CouncilExecutor.builder()
.members(List.of(gpt4, claude, gemini, grok))
.chairman(gemini)
.anonymize(true)
.timeout(Duration.ofMinutes(5))
.build();
CouncilResult result = council.deliberate("How should we architect auth?");
System.out.println(result.finalAnswer());
result.topRanked().ifPresent(r ->
System.out.println("Top ranked: " + r.llmName() + " (avg: " + r.averageRank() + ")"));
- Since:
- 0.0.5
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder for CouncilExecutor. -
Method Summary
Modifier and TypeMethodDescriptionstatic CouncilExecutor.Builderbuilder()deliberate(String question) Runs the 3-stage council deliberation.
-
Method Details
-
deliberate
Runs the 3-stage council deliberation.- Parameters:
question- the question to deliberate on- Returns:
- the complete council result with all stages and aggregate ranking
-
builder
-