Skip to content

Shunyu Yao — Language Agents: From Next-Token Prediction to Digital Automation

optionalcorefrontiertalkrubric 9/122024 · Princeton PhD defense (not a faculty job talk; he joined industry — his site lists OpenAI) · ~60 min

Shunyu Yao

Status

This is a PhD defense, not a faculty job talk (he went to industry), but it has the same shape and is one clear public example of defining a new area: “language agents”.

Talk arc of Shunyu Yao, Language Agents: From Next-Token Prediction to Digital Automation Five stages from top to bottom, with chapter start times from the PhD defense video. Framing, 0:00 to 8:39: introduction and thesis overview, defining language agents as a category. New problems, 8:39: the WebShop and SWE-bench benchmarks. Methods, 18:56: ReAct, which interleaves reasoning and acting, then at 31:20 the limits of next-token prediction as the transition into Tree of Thoughts at 35:40. Framework, 42:13: CoALA, cognitive architectures for language agents. Vision, 50:55: future directions, then the conclusion at 54:37. Shunyu Yao: new task category, then methods, then a framework Framing 0:00 – 8:39 Define a category: language agents Introduction and thesis overview 1 · New problems 8:39 Benchmarks as new problems WebShop (8:39); SWE-bench (15:40) 2 · Methods 18:56 ReAct, then deliberate search Limits of next-token prediction (31:20) → Tree of Thoughts (35:40) 3 · Framework 42:13 CoALA: cognitive architectures for language agents Turns a list of papers into a research program Vision 50:55 Future directions (50:55); conclusion (54:37)
Original sketch of the talk's narrative, built from this page's chapter list. Times are chapter starts in the defense video.

WebShop · SWE-bench · ReAct · Tree of Thoughts · CoALA

  • If you created benchmarks (BEIR, MIRACL, FreshStack, BrowseComp-Plus), open with them as new problems, the way this talk opens with WebShop and SWE-bench.
  • A framework section near the end turns a list of papers into a research program.

Technical preparation (from the papers, not the recording)

Section titled “Technical preparation (from the papers, not the recording)”

Read this before the questions below. Canonical notes: ReAct and chain-of-thought prompting; there is no separate site note on Tree of Thoughts.

ReAct. The action space is extended with free-form thoughts that do not change the environment. A trajectory alternates thought → action → observation. In the HotpotQA and FEVER experiments the actions are a deliberately simple Wikipedia API: search[entity], lookup[string] and finish[answer]. Thoughts let the model plan and track progress; observations let it correct facts that chain-of-thought alone would hallucinate.

Tree of Thoughts with breadth-first search. A “thought” is one intermediate step (on Game of 24, one arithmetic equation). At each of T steps, every kept state gets a propose call that returns candidate thoughts, each candidate is scored by value calls (a short sure/likely/impossible verdict), and the best b states are kept. The first step starts from a single root state.

Worked example (smaller numbers than the question). T = 2, b = 2, 4 candidates per propose call and 1 value call per candidate. Step 1: 1 propose + 4 value calls. Step 2: 2 propose + 8 value calls. Total 3 + 12 = 15 calls. Token cost depends on how long each call’s output is, not only on the number of calls.

Questions to think through

These questions have no single right answer. Write or say your answer before you open the hints. Mark a question once you could defend your answer in a reading group.

  1. Derive / compute

    Count the cost of Tree of Thoughts with breadth-first search on Game of 24: depth T = 3 steps, breadth b = 5 states kept per step, one "propose" call per state that returns 8 candidate thoughts (assume 8 every time), and each candidate scored by 3 "value" calls. How many LM calls does one game take? The paper reports about 5.5k completion tokens per game for ToT versus about 6.7k for 100 CoT samples, with 74% versus 49% success for best-of-100 CoT. Why can ToT use fewer tokens despite all these calls?

    What a strong answer covers
    • Step 1: 1 propose call, 8 candidates × 3 = 24 value calls. Steps 2 and 3: 5 states → 5 propose calls, 40 candidates × 3 = 120 value calls each. Total 11 propose + 264 value = 275 calls.
    • Calls are short (one equation, or a short "sure/likely/impossible" verdict), while a CoT sample writes the whole solution. Token cost tracks output length, not call count.
    • CoT samples are independent, so about 60% fail at the first step and the rest of each is wasted. ToT prunes bad first steps early, so compute goes to promising branches.
    • Breadth matters: b = 1 gives 45% versus 74% with b = 5, so the gain comes from search over states, not only from decomposition.
  2. Mechanism

    ReAct interleaves reasoning traces with actions on a search API. Explain why adding "thoughts" to the action space changes failure modes compared with CoT alone and with acting alone, using the HotpotQA error analysis, and explain how the paper combines ReAct with CoT self-consistency.

    What a strong answer covers
    • The action space becomes A ∪ L: thoughts change only the agent's context, not the environment. They let the model plan, track progress, and decide what to search next.
    • CoT fails mostly through hallucination (56% of its failures), with a higher false-positive rate among successes (14% versus 6%). ReAct grounds facts in retrieved text.
    • ReAct's own failures: non-informative search results cause 23% of errors and derail reasoning, and repeated actions form loops. More structure brings less flexible reasoning.
    • Combination: back off from ReAct to CoT-SC after a step limit (7 on HotpotQA, 5 on FEVER), or from CoT-SC to ReAct when the majority answer gets less than half the n samples. Internal and external knowledge complement each other.
  3. What if…

    For ToT, predict and explain the effect of (a) keeping only b = 1 state per step on Game of 24, (b) removing pruning in the Crosswords DFS, (c) removing backtracking. Then interpret this result: an oracle picking the best DFS state solves 7 of 20 games, more than the search actually solved.

    What a strong answer covers
    • (a) b = 1 drops to 45% (from 74%): greedy step-by-step decomposition helps but cannot recover from a wrong early choice.
    • (b) Without pruning DFS explores dead branches and performs worse, which shows the value heuristic is doing real work.
    • (c) Without backtracking, word-level success falls to about 20%, so revisiting choices is a core ingredient.
    • The oracle gap means correct states were reached but the LM's value heuristic failed to recognise them. The bottleneck is evaluation, not generation, which points toward better verifiers or learned value functions.
  4. Critique

    ReAct's HotpotQA and FEVER results use a deliberately weak Wikipedia API: search[entity] returns the first 5 sentences of a page or the 5 most similar titles, and lookup[string] finds the next sentence containing a string. As an IR researcher, what does this design confound, and how would you redesign the experiment to separate reasoning gains from retrieval quality?

    What a strong answer covers
    • Exact entity search forces the model to guess page titles, so its success mixes reasoning with title-guessing. Many failures may be retrieval failures, consistent with the share of errors from non-informative searches.
    • The weak API was meant to simulate how humans browse and to force reasoning, but it makes absolute numbers depend on the tool, so results do not transfer to real search engines.
    • Redesign: same agent prompts with a ladder of retrievers (title match, BM25, dense, oracle passage) and measure how the gain over CoT and act-only changes. If it shrinks with a strong retriever, part of it was compensating for bad retrieval.
    • Also report retrieval recall of gold supporting facts per trajectory, so reasoning errors and retrieval misses can be separated.
  5. Design

    Shunyu's benchmarks (WebShop with 1.18M products and 12,087 instructions, where the best model scored 29% against 59% for human experts; SWE-bench with 2,294 real GitHub issues from 12 repositories, where Claude 2 resolved 1.96%) share design choices that made them durable. Design a benchmark for deep-research search agents with the same properties, and say how you would stop it from saturating or being gamed.

    What a strong answer covers
    • Shared properties: real data at scale, automatic and hard-to-game evaluation (attribute match for WebShop, unit tests for SWE-bench), a large gap between models and humans or experts, and tasks that need many steps of interaction.
    • For deep research: a fixed, reproducible corpus (so results are not tied to a changing web), questions needing evidence from several documents, and answers checkable automatically (short verifiable answers or nugget lists).
    • Anti-gaming: hidden test set, verifying that answers cannot be found by one search, contamination checks against pretraining data, and limits or reporting on cost (tokens and calls).
    • Longevity: a difficulty range so progress is visible, plus a refresh process that adds new questions over time, which sourcing from live real-world data (as SWE-bench does from GitHub) makes possible.

Done with this page?

Status