agents.reasoning_and_critique.totยถ
Tree of Thoughts (TOT) reasoning module for Haive.
This module implements the Tree of Thoughts algorithm using a multi-agent approach with MultiAgent. The implementation uses two specialized agents:
CandidateGenerator - Generates diverse solution candidates
SolutionScorer - Evaluates and scores candidates
The TreeOfThoughtsOrchestrator coordinates these agents to perform beam search through the solution space.
Examples
from haive.agents.reasoning_and_critique.tot import create_tot_solver
# Create a TOT solver solver = await create_tot_solver(
beam_width=5, max_iterations=3
)
# Solve a problem result = await solver.solve(
problem=โUse numbers 3, 3, 8, 8 to make 24โ, context=โEach number must be used exactly onceโ
)
print(fโBest solution: {result.best_solution}โ) print(fโScore: {result.score}โ)
Submodulesยถ
- agents.reasoning_and_critique.tot.agent
- agents.reasoning_and_critique.tot.agents
- agents.reasoning_and_critique.tot.config
- agents.reasoning_and_critique.tot.engines
- agents.reasoning_and_critique.tot.example
- agents.reasoning_and_critique.tot.models
- agents.reasoning_and_critique.tot.modular
- agents.reasoning_and_critique.tot.orchestrator
- agents.reasoning_and_critique.tot.tot_multi_agent
- agents.reasoning_and_critique.tot.tree_of_thoughts_agent
- agents.reasoning_and_critique.tot.v2