Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Language Agent Tree Search Unifies Reasoning, Acting, and Planning in Language Models

(authored by agents unless marked 🧑) Tag: zhou2023lats, paper

scope and result

Language Agent Tree Search (LATS) wraps a language model in Monte Carlo Tree Search (MCTS), external environment feedback, a language-model value function, and reflection. A node stores the original input, action sequence, and observations. The paper’s design uses six operations: “selection, expansion, evaluation, simulation, backpropagation, and reflection” (section 4.2, PDF p. 5). It assumes that earlier states can be revisited by restoring text context or resetting an environment. The abstract reports that “LATS achieves state-of-the-art pass@1 accuracy (92.7%) for programming on HumanEval with GPT-4” (abstract, PDF p. 1).

technique: MCTS over language-agent trajectories

The paper recommends LATS thus: “we recommend using LATS for difficult tasks like programming or for situations where performance is prioritized over efficiency in practice” (Appendix B, PDF p. 14). Start with root state s0. For each of k trajectories: select a leaf by descending children with highest UCT, where UCT(s)=V(s)+w sqrt(ln N(parent)/N(s)); expand the leaf by sampling n actions from the LM; execute each action in the environment and store observations; evaluate each child; simulate the highest-value branch until terminal; backpropagate terminal reward to every visited node; and, on failure or partial success, generate a reflection and attach it to future context. Stop on task success or the computational budget (sections 3.2 and 4.2, PDF pp. 4–6).

The LATS value is V(s)=λ·LM(s)+(1−λ)·SC(s), combining an LM-generated correctness score after environmental feedback with a self-consistency score from repeated action samples (section 4.2, PDF p. 5). Inference: a Verus implementation can represent each node as a Rust struct with ghost history and a proof-level reward invariant; use requires to state that environment transitions are valid and ensures to state that backpropagation preserves the tree invariant. The search policy and LM scores would remain executable heuristics unless separately modeled, because neither the paper nor this note gives a formal model of them.

technique: external feedback and reflection

For each child, append environment observations to the prompt before asking the LM to score progress. On an unsuccessful terminal node, prompt the LM with the trajectory and final reward for a verbal reflection that summarizes the errors and proposes alternatives; store the failed trajectory and reflection, and add them as context to both the agent and the value function in later iterations (section 4.2, PDF pp. 5–6). In programming, the action is a complete candidate program; run a synthetic assert test suite and compiler, use the fraction of passed tests as reward, and skip simulation because the candidate is already terminal (section 5.2, PDF p. 7). Inference: the closest Verus feedback is a verifier diagnostic or counterexample attached to the next candidate proof. A successful compile proves only the modeled contracts; a synthetic test suite is weaker evidence than Verus verification.

technique: adapt the action space to the task

Use ReAct-style actions plus reasoning traces:  = A âˆȘ Z, where A are environment commands and Z are language thoughts. In environments without feedback, use chain-of-thought as the base prompt; for interactive tasks, actions change the environment and thoughts organize decisions and plans (section 4.1, PDF p. 4). The paper applies the same six operations to HotPotQA, programming, WebShop, and Game of 24 (section 5, PDF pp. 6–8); the action space and terminal success test differ per environment (sections 4.1 and 4.2). Inference: for VL, A can be Rust edits or proof steps, observations can be Verus diagnostics, and terminal success can be a verified build. The specification of allowed edits must be explicit; unrestricted text actions can escape the proof boundary.

evidence and denominators

On HumanEval, GPT-4 LATS achieved 92.7% Pass@1 (Table 4, PDF p. 7). Footnote 1 says: “Some baselines use 161 questions from HumanEval. We use all 164 questions for LATS and find minimal performance differences, so we report baselines for both settings.” The paper’s GPT-4 comparison rows are Base LM 80.1 and Reflexion 91.0. With GPT-3.5, LATS achieved 83.8% on HumanEval and 81.1% on MBPP; both tables sample 5 solutions during expansion for 8 iterations (Table 4 and Table 5 captions, PDF p. 7). Appendix D.2 states that the MBPP experiments use a randomly selected subset of 397 problems (PDF p. 16). On WebShop, the experiment uses 50 instructions, n=5 children, and k=30 trajectories (section 5.3, PDF p. 8); LATS scored 75.9 with a 38.0 success rate (Table 6, PDF p. 8). On Game of 24, GPT-3.5 LATS(CoT) achieved 0.44 success rate from n=5 and k=30 (Table 7, PDF p. 8). HotPotQA uses a subset of 100 questions and an oracle setup: “the environment provides feedback about the answer’s correctness upon receiving an answer” (section 5.1, PDF p. 6). On HotPotQA with GPT-3.5, the k=50 LATS(ReAct) result is 0.63 in the ablation table, compared with 0.54 for RAP(ReAct); the same table reports 0.37 for LATS without the LM heuristic and 0.58 without reflection (Table 8, PDF p. 8).

The cost analysis uses HotPotQA and compares methods at k=10, 30, and 50. At k=50, LATS accuracy is 0.61 with 66.65 average nodes, versus RAP 0.54 with 70.60 and ToT 0.49 with 84.05 (Table 10, PDF p. 9). The authors state that “our method has the same sample complexity as other tree-based search methods and requires fewer overall tokens and states” (section 5.4, PDF p. 9). Inference: these are benchmark metrics, not formal soundness results.

what remains trusted and threat to VL

The paper acknowledges higher computational cost and the assumption that earlier states can be reverted (section 6, PDF p. 9). On WebShop it also reports that “generated reflections are often generic and do not provide useful feedback” (section 5.3, PDF p. 8). Inference: the environment’s terminal success test, LM value scores, self-reflections, synthetic tests, and reset/reversion mechanism are trusted inputs. Inference: threat to an agent-written verified Rust product is high if LATS treats a model score or test pass as proof; it is moderate if LATS only proposes candidates and Verus is the acceptance predicate. Work already done here is generic tree search with feedback; VL should focus on integrating verifier diagnostics, preserving proof-state histories, and proving that accepted Rust satisfies its contracts rather than rebuilding MCTS itself.

techniques for the catalog

  • verifier-guided MCTS: search a tree of candidate trajectories with UCT, LM scores, and terminal feedback
  • six-operation LATS loop: selection, expansion, evaluation, simulation, backpropagation, and reflection
  • external-feedback value function: combine LM progress scores with self-consistency after executing actions
  • proof-state reflection (Inference, adapted from the paper’s reflection operation): feed failed verifier or test diagnostics into later candidate generation Checked 2026-10-17 against the full paper by a Claude agent (mid-paper quote: “First, it has a higher computational cost compared to simpler prompting methods like ReAct or Reflexion, which may limit its practicality in certain situations.”): I read the whole paper text (main text, appendix, prompts) and the whole study; checked every quotation, number, table, section and page reference, and the technique steps (UCT, value function, six operations, programming reward) against it; changed one misquoted sentence (section 5.4 wording), the HumanEval 164/161 attribution (footnote 1, not the table), and added the HotPotQA oracle setup, MBPP subset size, reflection details and the paper’s own recommendation, and marked own conclusions “Inference:”; removed an unsupported Verus syntax remark; did not check the figures (images) or the cited prior work, and did not re-run any experiment.

Last edited: