GenAIHub
← Back to Technical Section

Planning Algorithms

Planning and decision-making approaches for agents (ReAct, Tree of Thoughts, Graph-of-Thoughts), trade-offs and orchestration strategies.

Overview

Planning algorithms enable agents to decompose problems, explore possible action sequences and produce step-by-step plans that increase the probability of task success. In the context of LLMs, planning techniques bridge reasoning capabilities with action—by structuring intermediate thoughts, searches, and verification steps.

Key idea: Instead of producing a single answer, planning algorithms let the model generate and evaluate multiple candidate reasoning traces, leading to more robust decisions.

Core Techniques

Chain of Thought (CoT)

Ask the model to reveal its intermediate reasoning as a linear chain of steps. Useful for arithmetic and logical puzzles but can be brittle for large search spaces.

ReAct

Interleave reasoning and actions: the model reasons, then issues an action (e.g., tool call), then observes results and continues reasoning.

Tree of Thoughts (ToT)

Treat reasoning traces as nodes in a tree, explore multiple branches (breadth/depth strategies), and use heuristics to select promising branches.

Graph of Thoughts (GoT)

Generalize the tree idea to graphs, enabling merging of equivalent states and richer search strategies.

Architectures & Patterns

Planner + Executor

Split responsibilities: planner proposes a sequence of steps (or a partial plan); executor runs the steps (including tool calls) and returns observations.

Hierarchical Planning

Decompose tasks into subtasks, solve at multiple abstraction levels; use coarse plans to guide expensive, fine-grained searches.

Search-based (MCTS, Beam Search)

Use Monte Carlo Tree Search for stochastic environments or beam search for deterministic planning to balance exploration and exploitation.

Neuro-symbolic Hybrids

Combine neural LLM reasoning with symbolic planners/constraints for predictable behavior (e.g., constraint solvers or symbolic validators).

Evaluation & Metrics

Task Success

Percent of cases the final plan achieves the goal.

Steps & Cost

Average number of steps, API calls, and token cost.

Robustness

Performance under noise and perturbations; sensitivity to prompt or observation errors.

Minimal Example (Pseudo-code)

// 1) Prompt model to expand possible next steps
thoughts = model.generate_candidates(prompt)

// 2) Score or filter candidates using heuristics or a value model
scored = score_candidates(thoughts)

// 3) Expand top-K candidates and repeat (tree search)
plan = tree_search(scored, depth=4, beam=5)

// 4) Execute plan with validation and rollback
execute_with_validation(plan)

Best Practices

  • Start with constrained search spaces and iteratively relax them while monitoring cost.
  • Instrument intermediate states—store traces so you can replay and debug decisions.
  • Combine deterministic checks and validators to catch hallucinations early in the plan.
  • Use hybrid approaches: neural proposals + symbolic verification for critical domains.

Related Topics