Improving Planning with Large Language Models: A Modular Agentic Architecture

Taylor Webb, Shanka Subhra Mondal, Ida MomennejadarXiv 2023

TL;DR

The Modular Agentic Planner (MAP) architecture significantly enhances LLM planning by decomposing the process into specialized, interacting modules—such as an Actor, Monitor, and Predictor—inspired by cognitive neuroscience. By replacing monolithic prompting with a recurrent, multi-agent loop, MAP achieves state-of-the-art results on complex benchmarks like Tower of Hanoi and PlanBench, even when using smaller models like Llama3-70B.

What Problem Does This Paper Address?

While Large Language Models (LLMs) are impressive generalists, they notoriously stumble on tasks requiring multi-step reasoning or goal-directed planning. A common failure mode is "hallucination": an LLM might correctly identify that two rooms aren't connected when asked directly, yet still attempt to move between them when generating a long-form plan.

The authors argue that the issue isn't a lack of latent capability, but rather a failure of orchestration. Monolithic LLM calls struggle to simultaneously propose actions, evaluate their validity, predict future states, and track subgoals. This paper seeks to bridge this gap by looking at how the human brain and Reinforcement Learning (RL) systems handle planning through specialized functional components.

Methods

The authors introduce the Modular Agentic Planner (MAP), an architecture where planning emerges from the interaction of several specialized LLM instances.

Figure 1: Modular Agentic Planner (MAP). The agent receives states from the environment and high-level goals. These are processed by a set of specialized LLM modules. The TaskDecomposer receives high-level goals and generates a series of subgoals. The Actor generates proposed actions given a state and a subgoal. The Monitor gates these proposed actions based on whether they violate certain constraints (e.g., task rules) and provides feedback to the Actor. The Predictor predicts the next state given the current state and a proposed action. The Evaluator is used to estimate the value of a predicted state. The Predictor and Evaluator are used together to perform tree search. The Orchestrator determines when each subgoal has been achieved, and when the final goal has been achieved, at which point the plan is emitted to the environment as a series of actions.

As shown in Figure 1, the system consists of:

  • TaskDecomposer: Breaks high-level goals into manageable subgoals.
  • Actor: Proposes potential actions based on the current state and subgoal.
  • Monitor: Acts as a "gatekeeper," checking proposed actions against task rules and providing feedback to the Actor if they are invalid.
  • Predictor: Serves as a world model, predicting the next state given an action.
  • Evaluator: Estimates the "value" (distance to goal) of a predicted state.
  • Orchestrator: Determines when a subgoal or the final goal has been reached.

These modules interact through two primary loops:

  1. Action Proposal Loop: The Actor and Monitor iterate until a valid action is found.
  2. Tree Search: The Predictor and Evaluator perform a look-ahead search (depth $L$, breadth $B$) to select the most promising path.

Datasets

The authors evaluated MAP across four diverse domains:

  • Graph Traversal (CogEval): Navigation tasks in natural language-described environments, including "Detour" and "Reward Revaluation" scenarios that test flexibility.
  • Tower of Hanoi (ToH): A classic puzzle requiring deep recursion. The authors used a text-based isomorphic version to ensure the model couldn't rely on training data memorization.
  • PlanBench: A rigorous planning benchmark featuring Logistics and the deceptive Mystery BlocksWorld.
  • StrategyQA: A real-world NLP benchmark requiring multi-step reasoning to answer complex questions.

Key Insights and Ideas

  • The Power of the Monitor: Ablation studies revealed the Monitor is the most critical component. LLMs are much better at spotting errors in a separate "monitoring" context than they are at avoiding those same errors while "acting."
  • Modularity > Search Alone: While Tree-of-Thought (ToT) also uses search, MAP outperforms it by adding specialized roles like the Monitor and TaskDecomposer. Search is a tool, but modularity provides the framework to use that tool effectively.
  • Emergent Generalization: MAP showed superior transfer learning. A MAP system prompted for one task (e.g., planning on a small graph) generalized to larger graphs or structurally similar but semantically different tasks (like BlocksWorld) much better than standard baselines.
  • Neuro-Inspiration: The architecture mirrors the prefrontal cortex, where subregions like the Anterior Cingulate (monitoring) and Orbitofrontal Cortex (evaluation) work together to produce executive function.

Key Results

MAP consistently outperformed competitive baselines like Chain-of-Thought (CoT), Multi-Agent Debate (MAD), and Tree-of-Thought (ToT).

  • Graph Traversal: MAP achieved 100% success on Valuepath tasks and near-perfect scores on Steppath, completely eliminating invalid action proposals (hallucinations).
  • Tower of Hanoi: On 3-disk problems, MAP yielded a seven-fold improvement over zero-shot GPT-4. It was also the only model to show any success on out-of-distribution 4-disk problems.
  • PlanBench: In the difficult "Mystery BlocksWorld" domain, MAP achieved a 27.4% success rate, more than doubling the performance of GPT-4 CoT (10.6%).
  • Efficiency: By using a "MAP (efficient)" version that caches redundant prompts, the authors reduced computational costs significantly while maintaining high performance.

Limitations and Future Work

The primary drawback of MAP is computational cost; the recurrent interaction of multiple LLM modules requires many more tokens than a single prompt. While caching helps, the authors suggest that the next step is jointly fine-tuning smaller, open-source LLMs (like Llama) to act as specialized modules. This would reduce costs, eliminate the need for complex task-specific prompts, and potentially improve zero-shot performance on entirely novel tasks.

Additionally, while MAP improves performance, it has not yet "solved" the most complex planning tasks (like 4-disk ToH), suggesting there is still room to refine how these agents communicate and search.

Summary updated

BibTeX
@misc{webb2023improving,
  author = {Taylor Webb and Shanka Subhra Mondal and Ida Momennejad},
  title = {{Improving Planning with Large Language Models: A Modular Agentic Architecture}},
  year = {2023},
  eprint = {2310.00194},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2310.00194},
}
Figure