Package com.tnsai.reasoning.got
Class GraphOfThoughtsExecutor
java.lang.Object
com.tnsai.reasoning.got.GraphOfThoughtsExecutor
Graph of Thoughts (GoT) executor for complex problem solving.
Extension of Tree of Thoughts that allows cycles and merging of thought branches. Better for problems where partial solutions can be combined.
Usage
GraphOfThoughtsExecutor got = GraphOfThoughtsExecutor.builder()
.llm(client)
.evaluator(BranchEvaluator.llm(client))
.operations(List.of(GoTOperation.GENERATE, GoTOperation.AGGREGATE, GoTOperation.REFINE))
.maxNodes(20)
.build();
GoTResult result = got.explore("Design a database schema for e-commerce");
System.out.println(result.getBestThought());
System.out.println(result.aggregatedInsight());
Research Reference
"Graph of Thoughts" (Besta et al., 2023)
-
Nested Class Summary
Nested Classes -
Method Summary
-
Method Details
-
explore
Explores the problem space using Graph of Thoughts. -
builder
-