Package com.tnsai.reasoning
Interface BranchEvaluator
public interface BranchEvaluator
Evaluates branches in Tree of Thoughts exploration.
The evaluator assigns a score (0.0 - 1.0) to each thought node based on how promising it appears for reaching the goal.
-
Method Summary
Modifier and TypeMethodDescriptionstatic BranchEvaluatorcombined(BranchEvaluator... evaluators) Creates a combined evaluator that averages multiple evaluators.doubleEvaluates a thought node and returns a score (0.0 - 1.0).static BranchEvaluatorCreates a simple heuristic evaluator based on thought length and keywords.static BranchEvaluatorllm(com.tnsai.llm.LLMClient client) Creates an LLM-based evaluator.
-
Method Details
-
evaluate
Evaluates a thought node and returns a score (0.0 - 1.0).- Parameters:
node- The node to evaluate (ThoughtNode or GoTNode)goal- The original goal/problem being solved- Returns:
- Score between 0.0 (poor) and 1.0 (excellent)
-
llm
Creates an LLM-based evaluator. -
heuristic
Creates a simple heuristic evaluator based on thought length and keywords. -
combined
Creates a combined evaluator that averages multiple evaluators.
-