Dynamic Planning with a LLM

Gautier Dagan, Frank Keller, Alex Lascarides

TL;DR

LLM Dynamic Planner (LLM-DP) is a neuro-symbolic framework that pairs a Large Language Model with a classical symbolic planner to solve complex embodied decision-making tasks. By using the LLM for goal specification and belief-state hypothesis sampling while offloading multi-step search to a symbolic solver, LLM-DP achieves an almost perfect 97% task success rate on the Alfworld benchmark while consuming less than a tenth of the tokens needed by an LLM-only agent like ReAct.

What Problem Does This Paper Address?

Embodied agents must carry out long-horizon goals (such as "heat a potato and put it on a countertop") in environments where the location of objects is unknown upfront. While LLM-only agents (e.g., ReAct) can handle natural language instructions and adapt to feedback, they struggle with long-term multi-step reasoning, suffer from hallucinations, and accumulate massive token costs as interaction histories bloat the context window.

Conversely, classical symbolic planners (like PDDL solvers) can find guaranteed, optimal plans extremely quickly, but they require a complete, deterministic, and fully specified model of the environment and goal upfront—an impossible demand when an agent must explore to find items. The paper addresses this gap by combining the complementary strengths of LLMs (common sense, semantic priors, and language grounding) and symbolic planners (rigorous, hallucination-free, multi-step search).

Methods

LLM-DP operates in a closed-loop system maintaining a known world state $W$ and uncertain beliefs $B$:

  • PDDL Goal Generation: Given a natural language task description and valid PDDL predicates, an LLM (gpt-4o-mini, few-shot prompted) translates the user's instruction into a formal PDDL :goal.
  • Belief Sampling: Because object locations are hidden, the agent cannot feed a standard initial state into a symbolic planner. Instead, LLM-DP prompts the LLM to generate plausible locations for missing objects given the current world state (e.g., hypothesizing that a tomato might be in the fridge). By generating $n$ sampled states ($w_{\text{belief}} \cup W$), it creates $n$ concrete PDDL planning problems.
  • Plan Generation (PG): An off-the-shelf classical symbolic planner—specifically the BFS($f$) solver from the LAPKT framework—computes valid action sequences for the sampled problems.
  • Action Selection & Execution: An Action Selector module picks the shortest plan and executes its first action in the environment.
  • Observation Processing & Dynamic Re-planning: New observations update known facts $W$ and prune beliefs $B$ (e.g., opening a drawer reveals if an object is there or not). Any newly discovered state triggers dynamic re-planning.

Datasets

  • Alfworld: A widely used text-based interactive household benchmark built on top of the ALFRED environment. It involves seven task types (e.g., clean, cool, heat, put, puttwo, examine) requiring navigation, searching containers/receptacles, and object manipulation under partial observability.

Key Insights and Ideas

  • Separation of Concerns: LLMs are great at intuitive semantic inference (e.g., "where would a potato usually be located?") and translating language into formal syntax, while classical planners excel at combinatorial state search. Forcing an LLM to simultaneously track state, handle syntax, search paths, and avoid cycles is inefficient.
  • Planning Under Uncertainty via Plausible State Sampling: Instead of requiring full epistemic logic or belief-space planning, classical deterministic planners can handle uncertainty simply by having an LLM sample likely world completions, which are iteratively pruned by real observations.
  • Radical Token Efficiency: Classical search is executed offline relative to the model API; the LLM is only called to translate the goal and sample beliefs, avoiding step-by-step reasoning tokens during path execution.

Key Results

  • Success Rate (SR): LLM-DP achieves an overall success rate of 97% (0.97 ± 0.00) on the Alfworld test set, compared to 64–65% for ReAct.
  • Token Efficiency: LLM-DP uses roughly 702k tokens across the evaluation suite, compared to 9.48 million tokens required by ReAct—a reduction of over 92%. A variant with random belief sampling (LLM-DP-random) achieved the same 97% overall accuracy while using only 67k tokens, though with slightly longer episode lengths.
  • Trajectory Length: LLM-DP completes tasks faster, averaging 12.53 ± 7.11 actions per episode compared to ReAct’s 20.27 ± 12.32 actions.

Limitations and Future Work

  • Reliance on Formal Domain Definitions: LLM-DP assumes access to a pre-defined PDDL domain file containing accurate action schemata (preconditions and effects) and symbolic predicate sets.
  • Perfect Textual Observations: The system relies on noiseless, ground-truth text descriptions of objects in the agent's current location, assuming valid actions always succeed.
  • Semantic Mismatches: The LLM can still occasionally produce semantic mapping errors during goal generation (e.g., classifying a mug as an immovable receptacle rather than a graspable object, causing planner failure).
  • Future Directions: Expanding to multimodal inputs (e.g., visual observations from image models), handling uncertain action outcomes, and developing interactive "Action Selector" mechanisms capable of self-reflection or asking an oracle/human when domain models fail.

Summary updated

BibTeX
@inproceedings{dagan2024dynamic,
  author = {Gautier Dagan and Frank Keller and Alex Lascarides},
  title = {{Dynamic Planning with a LLM}},
  booktitle = {LanGame @ NeurIPS},
  year = {2024},
  url = {https://openreview.net/forum?id=ewx2RFiEYR},
}
Figure