Tree of Thoughts can also drop branches the model judges hopeless, instead of keeping a fixed beam. A score threshold is the simplest pruning rule.
Implement prune_below(score, threshold), returning whether the branch survives pruning.
Compare the score with the threshold.
No results yet
Run your code to check it against the examples, or submit to run every test.