Package com.tnsai.reasoning
Class ToTResult
java.lang.Object
com.tnsai.reasoning.ToTResult
Result of a Tree of Thoughts exploration.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ToTResult.Builderbuilder()Creates a new builder for ToTResult.Gets all leaf nodes (complete paths).Gets the best leaf node (highest scoring complete path).Gets the best reasoning path as a string.doubleGets the best path score.Gets the exploration duration.intGets the maximum depth reached in exploration.intGets the number of nodes pruned.getRoot()Gets the root node of the exploration tree.getTopPaths(int k) Gets the top-k best paths.intGets the total number of nodes explored.booleanReturns true if a solution was found.toString()
-
Method Details
-
getRoot
Gets the root node of the exploration tree. -
getBestLeaf
Gets the best leaf node (highest scoring complete path). -
getBestPath
Gets the best reasoning path as a string. -
getBestScore
public double getBestScore()Gets the best path score. -
getAllLeaves
Gets all leaf nodes (complete paths). -
getTopPaths
Gets the top-k best paths. -
getTotalNodes
public int getTotalNodes()Gets the total number of nodes explored. -
getPrunedNodes
public int getPrunedNodes()Gets the number of nodes pruned. -
getMaxDepthReached
public int getMaxDepthReached()Gets the maximum depth reached in exploration. -
getDuration
Gets the exploration duration. -
hasSolution
public boolean hasSolution()Returns true if a solution was found. -
builder
Creates a new builder for ToTResult. -
toString
-