Improving Planning with Large Language Models: A Modular Agentic Architecture

## Abstract

Abstract Large language models (LLMs) demonstrate impressive performance on a wide variety of tasks, but they often struggle with tasks that require multi-step reasoning or goal-directed planning. Both cognitive neuroscience and reinforcement learning (RL) have proposed a number of interacting functional components that together implement search and evaluation in multi-step decision making. These components include conflict monitoring, state prediction, state evaluation, task decomposition, and orchestration. To improve planning with LLMs, we propose an agentic architecture, the Modular Agentic Planner (MAP), in which planning is accomplished via the recurrent interaction of the specialized modules mentioned above, each implemented using an LLM. MAP improves planning through the interaction of specialized modules that break down a larger problem into multiple brief automated calls to the LLM. We evaluate MAP on three challenging planning tasks – graph traversal, Tower of Hanoi, and the PlanBench benchmark – as well as an NLP task requiring multi-step reasoning (strategyQA). We find that MAP yields significant improvements over both standard LLM methods (zero-shot prompting, in-context learning) and competitive baselines (chain-of-thought, multi-agent debate, and tree-of-thought), can be effectively combined with smaller and more cost-efficient LLMs (Llama3-70B), and displays superior transfer across tasks. These results suggest the benefit of a modular and multi-agent approach to planning with LLMs.

## 1 Introduction

Large Language Models (LLMs) (Devlin et al., ; Brown et al., ) have become widely accepted as highly capable generalist systems with a surprising range of emergent capacities (Srivastava et al., ; Wei et al., ; Webb et al., ). They have also sparked broad controversy, with some suggesting that they are approaching general intelligence (Bubeck et al., ), and others noting a number of significant deficiencies (Mahowald et al., ). A particularly notable shortcoming is their poor ability to plan or perform faithful multi-step reasoning (Valmeekam et al., ; Dziri et al., ). Recent work (Momennejad et al., ) has evaluated the extent to which LLMs might possess an emergent capacity for planning and exploiting cognitive maps, the relational structures that humans and other animals utilize to perform planning (Tolman, ; Tavares et al., ; Behrens et al., ). This work found that LLMs displayed systematic shortcomings in planning tasks that suggested an inability to reason about cognitive maps. Common failure modes included a tendency to ‘hallucinate’ (e.g., to use non-existent transitions and paths), and to fall into loops. This work raises the question of how LLMs might be improved so as to enable a capacity for planning, especially given the ubiquity of sequential decision making, reasoning, and planning problems across the wide application of generative AI and LLMs.

Here, we take a step toward improving planning with LLMs, by taking inspiration from both cognitive neuroscience and formal theories of decision-making and planning. In traditional theories of planning, such as those found in the field of reinforcement learning (RL) (Sutton & Barto, ), planning is carried out via the interaction of several specialized functions or modules, rather than through the activity of a single, monolithic system. For instance, many approaches involve distinct functions for action proposal, state evaluation, subgoal identification, or state prediction, many of which have also been related to the function of specific brain regions (see Section 6 for discussion). An interesting observation is that LLMs are often able to carry out these functions when probed in isolation, but are unable to reliably integrate and orchestrate these capacities in the service of a goal. For instance, Momennejad et al. () noted that LLMs often attempt to traverse invalid or hallucinated paths in planning problems (e.g., to move between rooms that are not connected), even though they can correctly identify these paths as invalid when probed separately. This suggests the possibility of an agentic approach using LLMs, in which planning is carried out through the coordinated and recurrent interaction of multiple LLM modules, each of which is specialized to perform a distinct process.

Figure: 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 $\operatorname{TaskDecomposer}$ receives high-level goals and generates a series of subgoals. The $\operatorname{Actor}$ generates proposed actions given a state and a subgoal. The $\operatorname{Monitor}$ gates these proposed actions based on whether they violate certain constraints (e.g., task rules) and provides feedback to the $\operatorname{Actor}$. The $\operatorname{Predictor}$ predicts the next state given the current state and a proposed action. The $\operatorname{Evaluator}$ is used to estimate the value of a predicted state. The $\operatorname{Predictor}$ and $\operatorname{Evaluator}$ are used together to perform tree search. The $\operatorname{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.
Refer to caption: x1.png

With this goal in mind, we propose the Modular Agentic Planner (MAP) (Figure 1), an agentic architecture composed of modules that are specialized to perform specific functions within the planning process. Specifically, we have identified and implemented the following key modules: error monitoring, action proposal, state prediction, state evaluation, task decomposition, and task coordination. Action proposal, state prediction, and state evaluation are further combined to perform tree search. All modules are implemented using an LLM, which receives instructions describing the module’s role via prompting and few-shot in-context learning (ICL). The resulting MAP algorithm (Algorithm 1) is implemented via the recurrent interaction of these modules, combining the strengths of classical planning and search algorithms with the use of LLMs as general-purpose world models and planning functions.

We evaluate MAP on four challenging decision-making tasks that require planning and multi-step reasoning. First, we performed controlled experiments on a set of graph traversal tasks according to the CogEval protocol  (Momennejad et al., ). These tasks require goal-directed navigation in novel environments (MDPs) described in natural language, of which we selected an environment that was most challenging for LLMs, including GPT-4. Second, we investigate Tower of Hanoi (ToH), a classic problem solving task that requires multi-step planning (Simon, ). Third, we investigate the two most challenging tasks in the PlanBench benchmark: mystery BlocksWorld and Logistics (Valmeekam et al., ). Finally, we investigate a challenging NLP task that requires multi-step reasoning, StrategyQA (Geva et al., ). We find that, when implemented with GPT-4, MAP significantly improves performance on all four tasks (Figures 2 and 3, Tables $\dagger$ ‣ 2 and $\dagger$ ‣ 2), and that the approach can also be effectively implemented with a smaller and more cost-efficient LLM (Llama3-70B, Table 10). Transfer experiments further indicate that MAP displays an improved ability to generalize between tasks, and ablation experiments indicate that each of the individual modules plays an important role in the overall architecture’s performance (Figure 3). Taken together, these results indicate the potential of a modular agentic approach to improve the reasoning and planning capabilities of LLMs.

## 2 Approach

What follows first describes the functions performed by each MAP module, and then how they interact to generate a plan.

### 2.1 Modules

MAP contains the following specialized modules, each constructed from a separate LLM instance through a combination of prompting and few-shot ($\leq 3$ examples) in-context learning (described in greater detail in section A.7):

$\bullet$ $\operatorname{\mathbf{TaskDecomposer}}$. The $\operatorname{TaskDecomposer}$ receives the current state $\displaystyle x$ and a goal $\displaystyle y$ and generates a set of subgoals $\displaystyle Z$ that will allow the agent to gradually work toward its final goal. In the present work, the $\operatorname{TaskDecomposer}$ is only utilized to generate a single intermediate goal, though in future work we envision that it will be useful to generate a series of multiple subgoals.

$\bullet$ $\operatorname{\mathbf{Actor}}$. The $\operatorname{Actor}$ receives the current state $\displaystyle x$ and a subgoal $\displaystyle z$ and proposes $\displaystyle B$ potential actions $\displaystyle A=a_{b=1}\dots a_{b=B}$. The $\operatorname{Actor}$ can also receive feedback $\displaystyle\epsilon$ from the $\operatorname{Monitor}$ about its proposed actions.

$\bullet$ $\operatorname{\mathbf{Monitor}}$. The $\operatorname{Monitor}$ gates the actions proposed by the $\operatorname{Actor}$ based on their validity (e.g., whether they violate the rules of a task). It emits an assessment of validity $\displaystyle\sigma$, and also feedback $\displaystyle\epsilon$ in the event the action is deemed invalid.

$\bullet$ $\operatorname{\mathbf{Predictor}}$. The $\operatorname{Predictor}$ receives the current state $\displaystyle x$ and a proposed action $\displaystyle a$ and predicts the resulting next state $\displaystyle\tilde{x}$.

$\bullet$ $\operatorname{\mathbf{Evaluator}}$. The $\operatorname{Evaluator}$ receives a next-state prediction $\displaystyle\tilde{x}$ and produces an estimate of its value $\displaystyle v$ in the context of goal $\displaystyle y$. This is accomplished by prompting the $\operatorname{Evaluator}$ (and demonstrating via a few in-context examples) to estimate the minimum number of steps required to reach the goal (or subgoal) from the current state.

$\bullet$ $\operatorname{\mathbf{Orchestrator}}$. The $\operatorname{Orchestrator}$ receives the current state $\displaystyle x$ and a subgoal $\displaystyle z$ and emits an assessment $\displaystyle\Omega$ of whether the subgoal has been achieved. When the $\operatorname{Orchestrator}$ determines that all subgoals (including the final goal) have been achieved, the plan is emitted to the environment as a series of actions.

### 2.2 Action Proposal Loop

This section describes MAP’s algorithms, the first of which is the action proposal loop. The $\operatorname{Actor}$ and $\operatorname{Monitor}$ interact via the $\operatorname{ProposeAction}$ function (Supplementary Algorithm 2). The $\operatorname{Actor}$ proposes actions which are then gated by the $\operatorname{Monitor}$. If the $\operatorname{Monitor}$ determines that the actions are invalid (e.g., they violate the rules of a task), feedback is provided to the $\operatorname{Actor}$, which then proposes an alternative action.

### 2.3 Tree Search

$\operatorname{ProposeAction}$ is further embedded in a $\operatorname{Search}$ loop (Supplementary Algorithm 3). The actions emitted by $\operatorname{ProposeAction}$ are passed to the $\operatorname{Predictor}$, which predicts the states that will result from these actions. A limited tree search is then performed, starting from the current state, and then exploring $\displaystyle B$ branches recursively to a depth of $\displaystyle L$ layers. Values are assigned to the terminal states of this search by the $\operatorname{Evaluator}$, and the action leading to the most valuable predicted state is selected.

Figure: Algorithm 1 Modular Agentic Planner (MAP). $\operatorname{MAP}$ takes a state $\displaystyle x$ and a goal $\displaystyle y$ and generates a plan $\displaystyle P$, a series of actions with a maximum length of $\displaystyle T$. The $\operatorname{TaskDecomposer}$ first generates a set of subgoals $\displaystyle Z$. The agent then pursues each individual subgoal $\displaystyle z$ in sequence, followed by the final goal $\displaystyle y$. At each time step, $\operatorname{Search}$ (Algorithm 3) is called to generate an action and a predicted next-state. Actions are added to the plan until the $\operatorname{Orchestrator}$ determines that the goal has been achieved, or the plan reaches the maximum length $\displaystyle T$.

### 2.4 Plan Generation

Algorithm 1 describes the complete MAP algorithm. To generate a plan, the $\operatorname{TaskDecomposer}$ component of MAP first generates a set of subgoals based on the final goal and current state. These subgoals guide the search and are internally pursued one at a time, utilizing the $\operatorname{Search}$ loop to generate actions until the $\operatorname{Orchestrator}$ determines that the subgoal has been achieved. The actions are accumulated in a plan buffer $\displaystyle P$ until either the $\operatorname{Orchestrator}$ determines that the final goal has been reached, or the maximum allowable number of actions $\displaystyle T$ are accumulated.

## 3 Experiments

Experiment details are described in Section A.3. Code is available at: [https://github.com/MAPLLM/MAPICLR2025sub](https://github.com/MAPLLM/MAPICLR2025sub).

### 3.1 Tasks

Graph Traversal. We performed experiments on four multi-step planning tasks based on graph traversal using the CogEval protocol (Momennejad et al., ). Natural language descriptions of a graph are provided with each node assigned to a room (e.g., ‘room 4 is connected to room 7’). The tasks included Valuepath, involving finding the shortest path between a given room and the largest of two possible rewards (but without going through the room with the smaller reward); Steppath, involving finding the shortest path between two rooms; Detour, in which the Valuepath task is first described, after which an edge is subsequently removed from the graph; and Reward Revaluation, in which the Valuepath task is first described, and the value associated with two reward locations is subsequently changed. Please see Section A.4 in the Appendix for more details.

Tower of Hanoi. We also investigated a classic multi-step planning task called the Tower of Hanoi (ToH) (Figure 5). In the original task, there are three pegs and a set of disks of different sizes. The disks must be moved into a particular goal configuration, while observing a set of constraints that prevent simple solutions. In our experiments, we designed an alternative (but isomorphic) formulation of this task in which the inputs are text-based rather than visual. This text-based formulation made it possible to evaluate language models on the task, but it also resulted in a task that does not share any surface features with the original task, making it unlikely that GPT-4 could rely on exposure to descriptions of ToH in its training data to solve the problem. Please see Section A.4 in the Appendix for more details.

PlanBench. To assess the generality and robustness of our approach, we also investigated a more extensive planning benchmark, PlanBench, consisting of synthetically generated problems in a number of distinct domains. We specifically investigated the Logistics domain, involving the transportation of goods between cities using airplanes and trucks, and the Mystery Blocksworld (deceptive) domain, which involves arbitrary names for entities and actions, and is the most challenging domain in the dataset (more details can be found in Valmeekam et al. ()).

StrategyQA. Finally, to test the extent to which MAP can be applied to more real-world tasks, we investigated StrategyQA, an NLP task that requires multi-step reasoning, and has proven challenging for standard LLM methods (Geva et al., ). In this task, an unusual question is posed (e.g. ‘Did Aristotle own a laptop?’) that requires multi-step reasoning. The question must be decomposed into sub-questions which must be successively solved in order to arrive at a final answer (more details can be found in Geva et al. ())

### 3.2 Baselines

We compared our model to several baseline methods. The first method involved asking GPT-4 (zero-shot) to provide the solution step by step. For the second method, in-context learning (ICL), we provided GPT-4 with a few in-context examples of a complete solution. We provided two examples for ToH, Valuepath, Detour, and Reward Reval, and three examples for Steppath (one each for 2, 3, and 4 steps) and PlanBench. The third method was chain-of-thought (CoT) (Wei et al., ). For this method, the in-context examples were annotated with a series of intermediate computations that break down the planning process into multiple steps (see Sections A.7.7-A.7.9 for example baseline prompts). The fourth method was multi-agent debate (MAD), using the codebase from Du et al. (). In this approach, similar to MAP, a solution is generated through the interaction between multiple LLM instances (each instance was equivalent to the GPT-4 ICL baseline); however, unlike MAP, these instances are not specialized to perform specific functions. Finally, we investigated tree-of-thought (ToT), using the original codebase from  Yao et al. (). Similar to MAP, ToT uses multiple LLM modules to perform tree search, although MAP incorporates additional modules and control processes (see Section A.2). To ensure that ToT was given the best chance of performing well on our tasks, we tested two versions, one with prompts that were similar to those in the original implementation (shown in the main results Section 4), and one that incorporated prompts from MAP (ToT-MAP, see Appendix Table 8). For ToT, multiple potential plans are generated for each problem, and a method is required to select one of these plans (a problem-specific heuristic was used in the original work). To ensure a fair comparison, we evaluated using two metrics, 1) the best plan (according to a groundtruth evaluation) for each problem, 2) the average performance of all plans for each problem. We report both of these metrics for both ToT and MAP.

## 4 Results

Figure: Figure 2: Graph traversal results. ‘% solved’ indicates percentage of problems solved without proposing invalid actions ($\uparrow$ better). GPT-4 Zero-shot, ICL, COT, and MAD baselines are deterministic, and therefore a single run was performed on all problems. Note that MAP did not employ tree search on the Steppath task, and did not employ task decomposition on any of the graph traversal tasks. Without tree search, MAP’s performance is deterministic, and therefore only a single run was performed on the Steppath task, whereas we performed 5 runs with ToT. Gray error bars reflect 95% binomial confidence intervals (for models evaluated on a single run). Dots reflect values of 0%. Dark bars indicate average performance over multiple plans/runs. Light bars indicate best performance. For Valuepath, Detour, and Reward Revaluation we performed 10, 10, and 5 runs respectively with MAP and ToT, and present average performance $\pm$ the standard error of the mean (black error bars).
Refer to caption: x2.png

Figure: Figure 3: Tower of Hanoi (ToH) results. ‘% solved’ indicates percentage of problems solved without proposing invalid actions ($\uparrow$ better). ‘% invalid’ indicates percentage of moves that are invalid ($\downarrow$ better). Note that 4-disk problems are out-of-distribution (OOD). GPT-4 Zero-shot, ICL, CoT, and MAD baselines are deterministic and reflect a single run. Gray error bars reflect 95% binomial confidence intervals. Dots reflect values of 0%. Dark bars indicate average performance over multiple plans/runs. Light bars indicate best performance. MAP results for 3-disk problems reflect the average over 5 runs $\pm$ the standard error of the mean (black error bars). MAP results for 4-disk problems reflect a single run, due to the high computational cost of multiple runs.
Refer to caption: x3.png

Figure 2 shows the results on the four graph traversal tasks (see Section A.5 for all results in tabular form). On the Valuepath task, MAP solved 100% of problems, outperforming all baselines. On the Steppath task, MAP displayed perfect performance for 2-step and 3-step paths, and near-perfect performance for 4-step paths, again outperforming all baselines. MAP also outperformed all baselines on the Detour task, and performed on par with the baselines on the Reward Revaluation task (while still outperforming GPT-4 zero-shot). This demonstrates that MAP can flexibly adjust to new circumstances when generating plans. Finally, the model did not propose any invalid actions in any of the four tasks (i.e., it did not hallucinate the presence of non-existent edges), due to the filtering of invalid actions by the $\operatorname{Monitor}$ (Figure 6).

Figure 3 shows the results on Tower of Hanoi (ToH). MAP demonstrated a significant improvement both in terms of the number of problems solved (left) and the number of invalid actions proposed (right). On 3-disk problems, MAP yielded a nearly seven-fold improvement in the number of problems solved over zero-shot performance, and significantly outperformed standard in-context learning (ICL), chain-of-thought (CoT), multi-agent debate (MAD), and tree-of-thought (ToT). When considering the best plan (out of 5 runs) for each problem, MAP achieved a perfect score of 100%. MAP’s improved performance relative to MAD demonstrates the importance of interaction between specialized LLM instances (i.e., a modular approach), whereas MAD involves interactions between multiple LLM instances prompted to perform the same task. MAP’s superior performance relative to ToT demonstrates that tree search, though an important part of the approach, is not sufficient to explain MAP’s performance, and the other modules play an important role. For the problems that MAP solved, the average plan length (5.4) was close to the optimal number of moves (4.4). The model also demonstrated some ability to generalize out-of-distribution (OOD) to more complex 4-disk problems (not observed in any in-context examples), whereas the baseline models solved close to 0% of these problems. Notably, MAP did not propose any invalid actions, even on OOD 4-disk problems, whereas the baselines proposed a significant number of invalid actions.

We also performed several experiments with ToH to better understand the MAP algorithm. First, we investigated how MAP’s performance varied as a function of the depth of tree search. We found that a depth of $L=2$ provided the best tradeoff between performance and cost (Table 14). A depth of $L=1$ resulted in worse performance, while a depth of $L=3$ incurred greater cost without significantly improving performance. Second, we investigated the extent to which MAP’s performance on this task depended on being provided with an explicit strategy for task decomposition (the goal recursion strategy). To address this, we provided the GPT-4 zero-shot, ICL, and CoT baselines with a description of this strategy. We found that this strategy did improve baseline performance, but MAP still outperformed these baselines even when they were provided with the strategy (Table 12). Third, we investigated whether the computational costs of the MAP algorithm could be mitigated by using a smaller LLM. We found that a version of MAP that used Llama3-70B still outperformed baselines that used the same LLM, and even outperformed the best GPT-4 baseline, GPT-4 ICL (Table 10).

Table $\dagger$ ‣ 2 shows the results for the PlanBench dataset, where MAP outperformed all of the baselines that we considered. Notably, due to the complexity of the problems in this dataset, it was very costly to perform tree search, so we evaluated a minimal version of MAP that did not involve tree search. For this same reason, we were unable to evaluate a ToT baseline on the full set of problems, but we include a comparison with ToT on a subset of problems in Table 13. Even without tree search, MAP outperformed ToT. These results demonstrate that, although MAP certainly benefits from the use of tree search, it can still provide significant performance benefits in domains where this is not feasible. We also investigated a zero-shot version of MAP (without in-context examples) on the most challenging PlanBench domain (mystery blocksworld), and found that it outperformed both GPT-4 zero-shot and GPT-4 ICL (Table 11), suggesting that MAP can be useful even in settings where in-context examples are not available.

Table $\dagger$ ‣ 2 shows the results for the StrategyQA benchmark, where MAP outperformed both CoT and ToT, and performed on par with human participants. This demonstrates the potential of MAP to be beneficial in more real-world tasks, such as question-answering tasks that require multi-step reasoning.

**Table 1: PlanBench results.(^††\dagger†^††\dagger†$\dagger$Results reflect % solved problems for a single run.)**
| Model | Logistics | Mystery BW |
| --- | --- | --- |
| GPT-4 Zero-shot | 7 | 0.2 |
| GPT-4 ICL | 12 | 7.8 |
| MAD | 16.2 | 7.3 |
| GPT-4 CoT | 17 | 10.6 |
| MAP | 24 | 27.4 |

Finally, we performed transfer experiments to study whether few-shot in-context learning would support generalization to different planning tasks. Table 3 shows the results for these experiments, including results for transfer from planning on a smaller graph to planning on a larger graph (n7tree $\rightarrow$ n15star), transfer to a semantically distinct but structurally isomorphic task (blocksworld (BW) $\rightarrow$ mystery blocksworld (mystery BW)), and transfer between completely different tasks (ToH $\rightarrow$ Mystery BW). We found that MAP outperformed both GPT-4 ICL and CoT in each of these settings, indicating that MAP can improve the generalizability and robustness of planning in LLMs.

**Table 3: Transfer between different planning tasks. Results reflect % solved problems.**
| Model | n7tree $\rightarrow$ n15star Valuepath | BW $\rightarrow$ Mystery BW | ToH $\rightarrow$ Mystery BW |
| --- | --- | --- | --- |
| GPT-4 ICL | 51 | 0.2 | 0 |
| GPT-4 CoT | 65 | 1.4 | 0 |
| MAP | 80 | 12.2 | 6.6 |

### 4.1 Ablation study

We also carried out an ablation study to determine the relative importance of each of MAP’s major components, focusing on the 3-disk ToH problems. Figure 3 (left) shows the results. We found that the $\operatorname{Monitor}$ was the most important component, as ablating this module resulted in significantly fewer solved problems, due primarily to an increased tendency to propose invalid moves (31% invalid moves vs. 0% for other ablation models). This highlights the importance of having a separate, modularized monitoring process. Ablating the tree search and $\operatorname{TaskDecomposer}$ module also resulted in significantly fewer solved problems. The impaired performance following the ablation of the tree search indicates the benefit of considering the multi-step implications of proposed actions, rather than committing to a single action as is done in standard autoregressive methods such as chain-of-thought. The impaired performance following the ablation of the $\operatorname{TaskDecomposer}$ highlights the benefit of decomposing a task into subgoals, which allows MAP to factorize a complex task into a set of smaller, more manageable tasks. Overall, these results suggest that all major components played an important role in MAP’s performance. Moreover, the improved performance was not due entirely to the use of tree search (which is shared with tree-of-thoughts (Yao et al., )), but also depended on the incorporation of other modules such as the $\operatorname{TaskDecomposer}$ and especially the $\operatorname{Monitor}$.

## 5 Related work

Early work in AI formalized planning as a problem of search through a combinatorial state space, typically utilizing various heuristic methods to make this search tractable (Newell & Simon, ; Newell et al., ). Problems such as ToH figured prominently in this early research (Simon, ), as it affords the opportunity to explore ideas based on hierarchical or recursive planning (in which a larger problem is decomposed into a set of smaller problems). Our proposed architecture adopts some of the key ideas from this early work, including tree search and hierarchical planning.

A few recent studies have investigated planning and multi-step decision making in LLMs. These studies suggest that, although LLMs can perform relatively simple planning tasks (Huang et al., ), and can learn to make more complex plans given extensive domain-specific fine-tuning (Pallagani et al., ; Wu et al., ), they struggle on tasks that require zero-shot or few-shot generation of multi-step plans (Valmeekam et al., ; Momennejad et al., ). These results also align with studies that have found poor performance in tasks that involve other forms of extended multi-step reasoning, such as arithmetic (Dziri et al., ). Our approach is in large part motivated by the poor planning and reasoning performance exhibited by LLMs in these settings.

Some recent approaches have employed various forms of heuristic search to improve performance in LLMs (Lu et al., ; Zhang et al., ), but these approaches have generally involved search at the level of individual tokens. Importantly, this is in contrast to our approach, in which search is performed at the more abstract level of task states (described in natural language). Ours is similar to other recently proposed black-box approaches in which ‘thoughts’ – meaningful chunks of natural language – are utilized as intermediate computations to solve more complex problems. These approaches include scratchpads (Nye et al., ), chain-of-thought (Wei et al., ), tree-of-thoughts (Yao et al., ), reflexion (Shinn et al., ), multi-agent methods (Du et al., ; Zhang et al., ), Describe-Explain-Plan-Select (Wang et al., ), and methods for combining planning with external tools (Ruan et al., ; Kong et al., ). All of these approaches can be viewed as implementing a form of controlled, or ‘system 2’, processing (as contrasted with automatic, or ‘system 1’, processing) (Schneider & Shiffrin, ; Sloman, ; Kahneman, ). Our approach has a similar high-level motivation, and shares some components with other black box approaches (e.g., tree search (Yao et al., )), but also introduces a number of new components (error monitoring, task decomposition, task coordination, state/action distinction), and combines these components in a novel manner (see Section A.2 for further discussion).

There have also been a number of proposals for incorporating modularity into deep learning systems, including neural module networks (Andreas et al., ), and recurrent independent mechanisms (Goyal et al., ). Ours is distinguished from these approaches by the use of black-box modules that perform specific high-level functions (many of which are inspired by formal theories of decision-making, as discussed below), rather than merely incorporating a general bias toward modularity.

Our approach is inspired by formal theories of decision-making and planning, and has a particularly close connection to reinforcement learning (RL) (Sutton & Barto, ). In particular, many of the modules in the MAP algorithm are closely related to aspects of traditional RL algorithms. Specifically, the $\operatorname{Actor}$ and $\operatorname{Evaluator}$ modules bear some resemblance to the actor and the critic in the popular actor-critic framework (Barto et al., ), and the TaskDecomposer is related to hierarchical RL (Sutton et al., ; Dietterich, ; Bacon et al., ), in which temporal abstractions are learned to achieve subgoals. The $\operatorname{Predictor}$ is also closely related to the world model that can substitute for direct interation with the environment in model-based RL (Sutton & Barto, ; Daw, ). An important difference in each of these cases is that the modules in MAP only receive a task description and a couple of examples, relying on the general-purpose knowledge of the LLM to effectively perform the task, rather than being trained through RL. This also distinguishes the approach from other recent efforts to combine LLMs and RL (Carta et al., ; Zhou et al., ; Zhai et al., ), which involve training with RL through direct interaction with an external environment, whereas MAP generates plans internally. Finally, there are also some modules that have no obvious analog in previous RL algorithms, but which were necessitated by weaknesses that LLMs display in the planning domain. These include the $\operatorname{Monitor}$, which was necessitated by the tendency of LLMs to hallucinate or violate task constraints, and the $\operatorname{Orchestrator}$, which allows MAP to autonomously determine when a goal has been achieved (without groundtruth evaluation) and thus terminate planning.

## 6 Conclusion and future directions

In this work, we have proposed the MAP architecture, a modular agentic approach aimed at improving planning with LLMs. In experiments on four challenging domains, we found that MAP significantly improved multi-step planning and decision-making performance over other LLM methods (e.g., Chain of Thought, Multi-Agent Debate, Tree of Thought). While these results represent a significant step forward, there is still room for improvement. In particular, while improving performance significantly, the model still has less than optimal performance on Tower of Hanoi, the Reward Revaluation graph traversal task, and the PlanBench benchmark (Valmeekam et al., ) (see Section A.6 for discussion of failure modes). This may be due in part to the inherent limitations of prompting and in-context learning as methods for the specialization of MAP’s modules. A promising avenue for further improvement may be to jointly fine-tune smaller open-source LLMs to serve as modules across a range of diverse tasks, rather than relying only on black box methods (as with GPT-4). This approach would also eliminate the need for task-specific prompts, and may further improve zero-shot planning on novel tasks.

An additional limitation of the current implementation is the computational cost incurred by the model (see Section A.8). Although this aligns well with the deliberative nature of controlled (i.e., ‘system 2’) processes (Kahneman, ), it would nevertheless be desirable to find ways to reduce these costs. In Section A.8, we present results from a version of MAP that achieves significantly improved efficiency, while retaining the same level of performance, by caching and re-using the outputs of some modules. We also found that MAP is effective when used with a smaller model (Llama3-70B), though performance was not as strong as the version that used GPT-4. Further improvements may result from fine-tuning smaller models to perform the specialized roles of each module.

Finally, it is interesting to consider the close parallels between our proposed approach and the neural basis of human planning and decision-making. In the human brain, planning is generally thought to depend on the prefrontal cortex (PFC) (Owen, ; Momennejad et al., ; Momennejad, ; Russin et al., ; Brunec & Momennejad, ; Mattar & Lengyel, ), a region in the frontal lobe that is notably most developed in humans and is broadly involved in executive function, decision-making, and reasoning (Miller & Cohen, ). Research in cognitive neuroscience has revealed the involvement of several subregions or modules within the PFC that appear to be specialized to perform certain functions, many of which are closely aligned with some of the modules in our proposed approach. These include the Anterior Cingulate Cortex, which is known to play a role in conflict monitoring (Botvinick et al., ), similar to our $\operatorname{Monitor}$ module; the Orbitofrontal Cortex, which plays a role in state prediction and state evaluation (Wallis, ; Schuck et al., ), similar to our $\operatorname{Predictor}$ and $\operatorname{Evaluator}$ modules; and the Anterior PFC, which plays a role in task decomposition and coordination, similar to our $\operatorname{TaskDecomposer}$ and $\operatorname{Orchestrator}$ modules. Human planning then emerges through the coordinated and recurrent interactions among these specialized subregions, and, similar to our approach, the algorithms implemented via these interactions are closely related to RL (O’doherty, ; Daw et al., ; Valentin et al., ; Takahashi et al., ; Silvetti et al., ; Brunec & Momennejad, ; Wang et al., ; Botvinick et al., ). An exciting direction for future work is to consider how the present approach might further contribute to understanding the brain basis of planning and decision-making.

## Appendix A Appendix

### A.1 Supplementary Algorithms

Figure: Algorithm 2 Action proposal loop. $\operatorname{ProposeAction}$ takes a state $\displaystyle x$ and a goal $\displaystyle y$ and generates $\displaystyle B$ potential actions $\displaystyle A=a_{b=1}\dots a_{b=B}$. This is implemented via a loop, in which the $\operatorname{Actor}$ first proposes potential actions, and the $\operatorname{Monitor}$ then assesses those actions according to certain constraints (e.g., task rules), providing feedback if any of the actions are deemed to be invalid. This continues until the proposed actions are considered valid. See Sections A.7.2 and A.7.3 for more details.

Figure: Algorithm 3 Search loop. Tree search with a depth of $\displaystyle L$ layers, with $\displaystyle B$ branches at each layer $\displaystyle l$. For each branch, a proposed action is sampled, and the $\operatorname{Predictor}$ predicts the next state $\displaystyle\tilde{x}$. This process continues recursively until the terminal layer $\displaystyle L$, at which point the value $\displaystyle v_{l=L}$ of the terminal states is estimated by the $\operatorname{Evaluator}$. The values are backpropagated to their parent states in the first layer, and the action that leads to the most valuable state is selected. In our implementation, we accelerate this process by caching the actions and predicted states from deeper search layers and then reusing them in subsequent searches. We also employ the $\operatorname{Orchestrator}$ to prematurely terminate search if the goal state is achieved.

### A.2 Extended Related Work

In this section, we consider in more detail how MAP relates to existing black-box and agentic LLM approaches:

- •
Similar to MAP, both scratchpad (Nye et al., ) and chain-of-thought (CoT) (Wei et al., ) decompose a problem into intermediate computations. However, unlike MAP, neither scratchpad nor CoT factorize these intermediate computations into specialized modules.
- •
Tree-of-thought (ToT) (Yao et al., ) introduces some degree of factorization, but the factorization is not as extensive as in MAP. The ‘generator’ module in ToT carries out a combination of the functions carried out by both the $\operatorname{Actor}$ (action proposal) and the $\operatorname{Predictor}$ (prediction of the states that will result from these actions) in MAP. The ‘evaluator’ module in ToT carries out a combination of the functions carried out by both the $\operatorname{Monitor}$ (error detection) and the $\operatorname{Evaluator}$ (prediction of state value) in MAP. ToT does not contain any component that carries out the functions of the $\operatorname{TaskDecomposer}$ (subgoal proposal) and the $\operatorname{Orchestrator}$ (autonomously determining when a goal or subgoal has been achieved).
- •
Multi-agent debate (i.e., Society of Mind) (Du et al., ) involves the interaction of multiple LLM instances; but, unlike MAP, these model instances are not specialized to perform specific functions. Similarly, the Large Language Model-based Actor-Critic (LLaMAC) approach (Zhang et al., ) involves interaction between many LLM agents, and incorporates more specialization (there is a ’critic’ module that coordinates the decision-making process across many ’actors’), though there is less module specialization than there is in MAP.
- •
Similar to MAP, reflexion (Shinn et al., ) involves an element of self evaluation of proposed policies, but this depends on interaction with the external environment to determine the outcome of each policy (whereas in MAP, this self evaluation process is entirely internal to the agent). The dependence on interaction with the external environment makes this approach unsuitable for the planning domain (planning is, by definition, performed internally).
- •
Describe-Explain-Plan-Select (Wang et al., ) involves the coordination of multiple modules, but the approach is specific to settings involving an agent that is spatially embedded in a 2D environment. For instance, the method utilizes the spatial proximity of objects to the agent for prioritization of subgoals. This approach cannot be directly applied to the tasks that we consider in the present work.
- •
Some recent work has aimed to combine external tool use with LLM planning agents, including Task Planning and Tool Usage (TPTU) (Ruan et al., ; Kong et al., ). Because this work evaluates on tasks involving external tool use, it is not directly comparable with our approach, but we plan to extend our approach to incorporate tool use in future. We expect that MAP’s modular approach will afford improved performance in this domain, relative to the more minimal planning approaches that have previously been employed (i.e., involving planning in a single LLM agent).

### A.3 Experiment Details

We implemented each of the modules using a separate GPT-4 (32K context, ‘2023-03-15-preview’ model index for ToH and cogeval tasks, and 128K context, ‘0125-preview‘ model index for strategyQA and planbench tasks from Microsoft Azure openAI service) instance through a combination of prompting and few-shot in-context examples. We set Top-p to 0 and temperature to 0, except for the $\operatorname{Actor}$ (as detailed in section A.7.2). The $\operatorname{Search}$ loop explored $B=2$ branches recursively for a depth $L=2$.

For ToH, we used two randomly selected in-context examples of three-disk problems, and a description of the problem in the prompts for all the modules. For the graph traversal tasks, we used two in-context examples for all modules, except for the $\operatorname{Actor}$ and $\operatorname{Evaluator}$ in the Steppath task, where we used three in-context examples, one each for 2-, 3-, and 4-step paths. For strategyQA, we didn’t use any in-context examples. For the logistics task from Planbench, we used two incontext examples for all modules except for $\operatorname{Actor}$ which used three in-context examples. For the mystery blocksworld (deceptive) task from Planbench, we used two incontext examples for all modules except for $\operatorname{Actor}$ and $\operatorname{Predictor}$ which used three in-context examples. For both the tasks from Planbench, we extracted the goal from the initial state conditions, and the state and the goal was separately fed as input to the modules as required. The prompt also described the specific task that was to be performed by each module (e.g., monitoring, task decomposition). For more details about the prompts and specific procedures used for each module, see Section A.7.

For three-disk problems, we allowed a maximum of $\displaystyle T=10$ actions per problem, and evaluated on 24 out of 26 possible problems (leaving out the two problems that were used as in-context examples for the $\operatorname{Actor}$). We also evaluated on four-disk problems, for which we allowed a maximum of $\displaystyle T=20$ actions per problem. The same three-disk problems were used as in-context examples, meaning that the four-disk problems tested for out-of-distribution (OOD) generalization. For the graph traversal tasks, we allowed a maximum of $\displaystyle T=6$ actions per problem. For strategyQA we allowed $\displaystyle T=1$ action per problem. For the Planbench tasks we allowed a maximum of $\displaystyle T=4$ + number of actions in the ground truth plan.

We didn’t use a separate $\operatorname{Predictor}$ for the graph traversal tasks, since the action proposed by the $\operatorname{Actor}$ gives the next state. We also did not include the $\operatorname{TaskDecomposer}$ for these tasks, and did not use the $\operatorname{Search}$ loop for the Steppath task, as the model’s performance was already at ceiling without the use of these components. For strategyQA we didn’t use the $\operatorname{Evaluator}$ or the $\operatorname{Orchestrator}$. For the Planbench tasks we didn’t use tree search, and for mystery blocksworld task we didn’t use the $\operatorname{TaskDecomposer}$.

### A.4 Additional Description of Planning Tasks

Graph Traversal. We focused on a particular type of graph (Figure 4) with community structure (Schapiro et al., ) previously found to be challenging for a wide variety of LLMs. The first task, Valuepath, involves finding the shortest path from a given room to the room with the largest reward, while avoiding the room that has a smaller reward. A smaller reward and a larger reward are located at two different positions in the graph. We fixed the two reward locations, and created 13 problems based on different starting locations. The second task, Steppath, involves finding the shortest path between a pair of nodes. We evaluated problems with an optimal shortest path of 2, 3, or 4 steps. We generated 20 problems for each of these conditions by sampling different starting and target locations.

The other two tasks, Detour and Reward Revaluation, involve modifications to the Valuepath task that test for flexibility in planning. In these tasks, the problem description and in-context examples for the Valuepath task are presented, and a single Valuepath problem is solved as in the original task. The task is then modified in-context in one of two ways. In the Detour task, an edge is removed from the graph and replaced with a new edge (e.g., ‘the door from room 1 to room 11 is locked and now room 13 is connected to room 11’). In the Reward Revaluation task, the value associated with the two reward locations is changed (e.g., ‘the reward of the chest in room 8 has been changed to 12 and the reward of the chest in room 15 has been changed to 48’). As with the Valuepath task, the Detour and Reward Revaluation tasks each involved 13 problems based on different starting locations.

Figure: Figure 4: Graph Traversal. We investigated two graph traversal tasks utilizing a challenging graph with community structure. Steppath: Find shortest path between two nodes, e.g. node 3 and node 7. Valuepath: Find shortest path from starting location (e.g., node 10) to location with maximum reward (node 8 in depicted example).
Refer to caption: x4.png

Tower of Hanoi. In the original version of the Tower of Hanoi (ToH) task, there are three pegs and a set of disks of different sizes. The disks are stacked in order of decreasing size on the leftmost peg. The goal is to move all disks to the rightmost peg, such that the disks are stacked in order of decreasing size. There are a couple of rules that determine which moves are considered valid. First, a disk can only be moved if it is at the top of its stack. Second, a disk can only be moved to the top of another stack if it is smaller than the disks in that stack (or if the peg is empty). More complex versions of the task can be created by using a larger number of disks.

We designed an alternative formulation of this task in which the inputs are text-based rather than visual. In this alternative formulation, three lists (A, B, and C) are used instead of the three pegs, and a set of numbers (0, 1, 2, and so on) is used instead of disks of different sizes. The goal is to move all numbers so that they are arranged in ascending order in list C. The rules are isomorphic to ToH. First, a number can only be moved if it is at the end of a list. Second, a number can only be moved to the end of a new list if it is larger than all the numbers in that list. Note that although this novel formulation is isomorphic to ToH (and equally complex), it does not share any surface features with the original ToH puzzle (disks, pegs, etc.), and thus GPT-4 cannot rely on exposure to descriptions of ToH in its training data to solve the problem. We created multiple problem instances by varying the initial state (the initial positions of the numbers). This resulted in 26 three-disk problems and 80 four-disk problems.

Figure: Figure 5: Tower of Hanoi. Top: Depiction of the Tower of Hanoi (ToH) puzzle. Disks are stacked in order of decreasing size on the leftmost peg. The goal is to move these disks so that they are stacked in order of decreasing size on the rightmost peg. Only the disk on the top of the stack may be moved, and a disk can only be placed on top of larger disks (or on an empty peg). The version shown involves three disks, but more disks can be used (making the task significantly more difficult). Bottom: Modified text-based version of ToH. Three lists are presented, labelled A, B and C. A set of integers is distributed amongst these lists. The goal is to move the numbers so that they are arranged in ascending order in list C. Only the number at the end of the list may be moved, and a number can only be placed in front of a smaller number. Multiple problem instances were created by varying the initial state.
Refer to caption: x5.png

### A.5 Supplementary Results

Figure: Figure 6: Graph traversal results. ‘% invalid’ indicates percentage of moves that are invalid ($\downarrow$ better). GPT-4 Zero-shot, ICL, CoT, and MAD baselines are deterministic, and therefore a single run was performed on all problems. Note that MAP did not employ tree search on the Steppath task, and did not employ task decomposition on any of the graph traversal tasks. Without tree search, MAP’s performance is deterministic, and therefore only a single run was performed on the Steppath task, whereas we performed 5 runs with ToT. Gray error bars reflect 95% binomial confidence intervals (for models evaluated on a single run). Dots reflect values of 0%. For Valuepath, Detour, and Reward Revaluation we performed 10, 10, and 5 runs respectively with MAP and ToT, and present average performance $\pm$ the standard error of the mean (black error bars).
Refer to caption: x6.png

**Table 4: Results on Valuepath task. Values within brackets indicate best performance.**
| Model | % solved problems | % invalid actions | Avg plan steps |  |  |
| --- | --- | --- | --- | --- | --- |
|  |  |  | 1-step | 2-step | 4-step |
| GPT-4 Zero-shot | 54 | 8 | 2.5 | 2.5 | 5 |
| GPT-4 ICL | 91 | 0 | 1.75 | 2.33 | 4.67 |
| GPT-4 CoT | 91 | 4 |  |  |  |
| MAD | 73 | 9 |  |  |  |
| ToT | 55(100) | 0 |  |  |  |
| MAP | 100 | 0 | 1.5 | 2 | 4.75 |

**Table 5: Results on Steppath task. Values within brackets indicate best performance.**
| Model | % solved problems | % invalid actions | Avg plan steps |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
|  | 2-step | 3 step | 4-step | 2-step | 3-step | 4-step | 2-step | 3-step | 4-step |
| GPT-4 Zero-shot | 75 | 40 | 20 | 9 | 13 | 18 | 2.07 | 4 | 5.25 |
| GPT-4 ICL | 74 | 74 | 42 | 10 | 6 | 14 | 2.14 | 3.78 | 4.38 |
| GPT-4 CoT | 95 | 79 | 47 | 0 | 7 | 14 |  |  |  |
| MAD | 82 | 79 | 39 | 8 | 6 | 14 |  |  |  |
| ToT | 67(100) | 67(89) | 50(63) | 0 | 0 | 0 |  |  |  |
| MAP | 100 | 100 | 95 | 0 | 0 | 0 | 2.1 | 3.42 | 4.5 |

**Table 6: Results on Detour task. Values within brackets indicate best performance.**
| Model | % solved problems | % invalid actions |
| --- | --- | --- |
| GPT-4 Zero-shot | 54 | 6 |
| GPT-4 ICL | 38 | 4 |
| GPT-4 CoT | 69 | 6 |
| MAD | 38 | 9 |
| ToT | 33 (100) | 0 |
| MAP | 85 (100) | 1 |

**Table 7: Results on Reward Revaluation task. Values within brackets indicate best performance.**
| Model | % solved problems | % invalid actions |
| --- | --- | --- |
| GPT-4 Zero-shot | 31 | 15 |
| GPT-4 ICL | 54 | 6 |
| GPT-4 CoT | 54 | 13 |
| MAD | 46 | 14 |
| ToT | 36 (77) | 0 |
| MAP | 48 (69) | 0 |

**Table 8: Results on ToH. Note that we also include results here for the GPT-4 ICL baseline when prompted with 5 ICL examples (as opposed to 2 examples in the standard version of the baseline). Surprisingly, more ICL examples hurts performance on this task, perhaps due to overfitting to the specific examples (Hasanbeig et al., ). Values within brackets indicate best performance.**
| Model | % solved problems | % invalid actions |  |  |
| --- | --- | --- | --- | --- |
|  | 3-disk | 4-disk (OOD) | 3-disk | 4-disk (OOD) |
| GPT-4 Zero-shot | 11 | 2 | 30 | 50 |
| GPT-4 ICL | 46 | 1 | 12 | 41 |
| GPT-4 ICL (5 examples) | 38 | 1 | 19 | 41 |
| GPT-4 CoT | 42 | 5 | 22 | 39 |
| MAD | 25 | 1 | 24 | 43 |
| ToT-MAP | 6 (25) | 1(4) | 4 | 5 |
| ToT | 6 (25) | 0 (0) | 14 | 11 |
| MAP | 74 (100) | 24 | 0 | 0 |

**Table 9: Ablation study on ToH with 3 disks. Values within brackets indicate best performance.**
| Model | % solved problems | % invalid actions |
| --- | --- | --- |
| MAP | 74 (100) | 0 |
| w/o Task Decomposer | 50 (67) | 0 |
| w/o Tree Search | 32 (42) | 0 |
| w/o Monitor | 27 (33) | 31 |

**Table 10: Results on ToH with 3 disks with a smaller LLM (Llama3-70B). MAP with Llama3-70B even outperforms the best GPT-4 baseline (GPT-4 ICL).**
| Model | % solved problems | % invalid actions |
| --- | --- | --- |
| Llama3-70B Zero-shot | 19.2 | 33.8 |
| Llama3-70B ICL | 12.5 | 41.4 |
| Llama3-70B CoT | 29.2 | 33.3 |
| GPT-4 ICL | 46 | 12 |
| Llama3-70B MAP | 50 | 2 |

**Table 11: Results on Mystery Blocksworld domain of PlanBench using a zero-shot version of MAP (no in-context examples were provided for any module).**
| Model | % solved problems |
| --- | --- |
| GPT-4 Zero-shot | 0.2 |
| GPT-4 ICL | 7.8 |
| MAP Zero-shot | 8.2 |

**Table 12: Results on ToH 3 disks with baselines also provided with the goal recursion strategy (provided to the $\operatorname{Decomposer}$ of MAP).**
| Model | % solved problems |
| --- | --- |
| GPT-4 Zero-shot | 11 |
| GPT-4 Zero-shot w/ goal recursion | 23 |
| GPT-4 ICL | 46 |
| GPT-4 ICL w/ goal recursion | 46 |
| GPT-4 CoT | 42 |
| GPT-4 CoT w/ goal recursion | 50 |
| MAP w/ goal recursion | 74 |

**Table 13: Results on Planbench with ToT on a subset of problems. Values within brackets indicate best performance.**
| Model | Logistics (30 problems) | Mystery BW (100 problems) |
| --- | --- | --- |
| ToT | 10.4 (16.7) | 0.6 (3) |
| MAP | 53.3 | 35 |

**Table 14: Results on ToH with 3 disks varying the tree search hyperparameters of MAP. Mean and standard error are reported across 10 runs for computational cost and performance.**
| Model | Num. calls | Num. input tokens | Num. output tokens | % solved |
| --- | --- | --- | --- | --- |
| MAP ($B=2,L=1$) | 32.04 $\pm$ 1.5 | 32,630.62 $\pm$ 1,318.4 | 2,197.37 $\pm$ 146.7 | 55 $\pm$ 6 |
| MAP ($B=2,L=2$) | 43.46 $\pm$ 2.4 | 49,537.37 $\pm$ 2,563.7 | 2,727.55 $\pm$ 214.2 | 72 $\pm$ 2 |
| MAP ($B=2,L=3$) | 65.65 $\pm$ 3.6 | 90,406.30 $\pm$ 4,784.7 | 3,845.88 $\pm$ 294.8 | 69 $\pm$ 2 |

### A.6 Analysis of Failure Modes

To better understand the failure modes displayed by MAP, we analyzed the log files for the Tower of Hanoi (ToH) task (3-disk problems, run accuracy=75%, failed to solve 6/24 problems). We identified the following three general failure modes:

1. Incorrect decomposition: failure to identify subgoals that lie along the optimal path.
2. No progress: taking actions that either move away from or do not make progress toward a subgoal.
3. Falling into loops: visiting a state more than once.

These failure modes were not mutually exclusive. Table  15 shows the number of problems (out of 6 total failures) that involved these failure modes. We then identified which modules were responsible for these failures. The ‘incorrect decomposition’ failure mode was due to mistakes by the Decomposer (2/6 failures). The ‘no progress’ and ‘falling into loops’ failure modes were due to mistakes made both by the Actor and the Evaluator. Specifically, the Actor sometimes failed to propose at least one action that made progress toward the goal, and the Evaluator sometimes failed to select the action that made progress toward the goal. The Actor and Evaluator made these mistakes at least once for each of the 6 failures. Overall, we found that failures stemmed from errors made by the Decomposer, Actor, and Evaluator modules, whereas the other modules (Monitor, Predictor, and Orchestrator) performed perfectly.

**Table 15: Results for number of failures (out of 6 total failures for a given run) of MAP on ToH with 3 disks for each of the three failure modes.**
| Incorrect decomposition | No progress | Falling into loops |
| --- | --- | --- |
| 2/6 | 6/6 | 5/6 |

### A.7 Prompts and In-context Examples

#### A.7.1 Task Decomposer

For ToH, the $\operatorname{TaskDecomposer}$ generated a single subgoal per problem. The in-context examples included chain-of-thought reasoning (Wei et al., ) based on the goal recursion strategy (Simon, ), which is sometimes provided to human participants in psychological studies of problem solving (Carpenter et al., ). The specific prompt and in-context examples are shown below:

Consider the following puzzle problem:

Problem description:
- There are three lists labeled A, B, and C.
- There is a set of numbers distributed among those three lists.
- You can only move numbers from the rightmost end of one list to the rightmost end of another list.
Rule #1: You can only move a number if it is at the rightmost end of its current list.
Rule #2: You can only move a number to the rightmost end of a list if it is larger than the other numbers in that list.
A move is valid if it satisfies both Rule #1 and Rule #2.
A move is invalid if it violates either Rule #1 or Rule #2.

Goal: The goal is to generate a single subgoal from the current configuration, that helps in reaching the goal configuration using minimum number of moves.

To generate subgoal use the goal recursion strategy. First if the smallest number isn’t at the correct position in list C, then set the subgoal of moving the smallest number to its correct position in list C.But before that, the numbers larger than the smallest number and present in the same list as the smallest number must be moved to a list other than list C. This subgoal is recursive because in order to move the next smallest number to the list other than list C, the numbers larger than the next smallest number and present in the same list as the next smallest number must be moved to a list different from the previous other list and so on.

Note in the subgoal configuration all numbers should always be in ascending order in all the three lists.

Here are two examples:

Example 1:

This is the current configuration:
A = [0,1]
B = [2]
C = []

This is the goal configuration:
A = []
B = []
C = [0, 1, 2]

Answer:
I need to move 0 from list A to list C.
Step 1. Find the numbers to the right of 0 in list A. There is 1 to the right of 0.
Step 2. Find the numbers larger than 0 in list C. There are none.
I will move the numbers found in Step 1 and Step 2 to list B. Hence I will move 1 from list A to list B. Also numbers should be in ascending order in list B.
Subgoal:
A = [0]
B = [1, 2]
C = []

Example 2:

This is the current configuration:
A = [1]
B = [0]
C = [2]

This is the goal configuration:
A = []
B = []
C = [0, 1, 2]

Answer:
I need to move 0 from list B to list C.
Step 1. Find the numbers to the right of 0 in list B. There are none.
Step 2. Find the numbers larger than 0 in list C. There is 2 which is larger than 0.
I will move the numbers found in Step 1 and Step 2 to list A. Hence, I will move 2 from list C to list A. Also numbers should be in ascending order in list A.
Subgoal:
A = [1, 2]
B = [0]
C = []

Here is the task:

This is the current configuration:
A = [0, 1, 2]
B = []
C = []

This is the goal configuration:
A = []
B = []
C = [0, 1, 2]

Answer:

#### A.7.2 Actor

The $\operatorname{Actor}$ was prompted to propose $\displaystyle B=2$ distinct actions. In some instances, the $\operatorname{Actor}$ failed to propose two distinct actions. In those cases, we iteratively scaled the temperature by a factor of 0.1. This was done for a maximum of 10 attempts or until two distinct actions were produced. If the $\operatorname{Actor}$ was not able to propose two distinct actions even after 10 attempts, we then used only a single action. The specific prompt and in-context examples for the ToH task are shown below:

Consider the following puzzle problem:

Problem description:
- There are three lists labeled A, B, and C.
- There is a set of numbers distributed among those three lists.
- You can only move numbers from the rightmost end of one list to the rightmost end of another list.
Rule #1: You can only move a number if it is at the rightmost end of its current list.
Rule #2: You can only move a number to the rightmost end of a list if it is larger than the other numbers in that list.
A move is valid if it satisfies both Rule #1 and Rule #2.
A move is invalid if it violates either Rule #1 or Rule #2.

Goal: The goal is to end up in the goal configuration using minimum number of moves.

Here are two examples:

Example 1:

This is the starting configuration:
A = [0, 1]
B = [2]
C = []
This is the goal configuration:
A = []
B = []
C = [0, 1, 2]

Here is the sequence of minimum number of moves to reach the goal configuration from the starting configuration:

Move 2 from B to C.
A = [0, 1]
B = []
C = [2]

Move 1 from A to B.
A = [0]
B = [1]
C = [2]

Move 2 from C to B.
A = [0]
B = [1, 2]
C = []

Move 0 from A to C.
A = []
B = [1, 2]
C = [0]

Move 2 from B to A.
A = [2]
B = [1]
C = [0]

Move 1 from B to C.
A = [2]
B = []
C = [0, 1]

Move 2 from A to C.
A = []
B = []
C = [0, 1, 2]

Example 2:

This is the starting configuration:
A = [1]
B = [0]
C = [2]
This is the goal configuration:
A = []
B = []
C = [0, 1, 2]

Here is the sequence of minimum number of moves to reach the goal configuration from the starting configuration:

Move 2 from C to A.
A = [1, 2]
B = [0]
C = []

Move 0 from B to C.
A = [1, 2]
B = []
C = [0]

Move 2 from A to B.
A = [1]
B = [2]
C = [0]

Move 1 from A to C.
A = []
B = [2]
C = [0, 1]

Move 2 from B to C.
A = []
B = []
C = [0, 1, 2]

Here is the task:

This is the starting configuration:
A = [0, 1, 2]
B = []
C = []
This is the goal configuration:
A = [0]
B = [1, 2]
C = []

Give me only two different valid next moves possible from the starting configuration that would help in reaching the goal configuration using as few moves as possible.
Your answer should be in the format as below:
1. Move <N> from <src> to <trg>.

#### A.7.3 Monitor

The $\operatorname{Monitor}$ was prompted with chain-of-thought reasoning in which each of the rules of the task were checked before determining action validity. We stored the actions deemed valid by the $\operatorname{Monitor}$ in a separate buffer, and we terminated the action proposal loop (Algorithm  2) when there were two distinct actions in this buffer, or exceeded a maximum of 10 interactions with the $\operatorname{Monitor}$. After termination of the action proposal loop, if the buffer didn’t contain two distinct actions, we used the only action in the buffer. If the buffer was empty, we used the action(s) proposed by the $\operatorname{Actor}$ at the last attempt. The following text was used as a prompt and in-context examples in the ToH task:

Consider the following puzzle problem:

Problem description:
- There are three lists labeled A, B, and C.
- There is a set of numbers distributed among those three lists.
- You can only move numbers from the rightmost end of one list to the rightmost end of another list.
Rule #1: You can only move a number if it is at the rightmost end of its current list.
Rule #2: You can only move a number to the rightmost end of a list if it is larger than the other numbers in that list.
A move is valid if it satisfies both Rule #1 and Rule #2.
A move is invalid if it violates either Rule #1 or Rule #2.

Goal: The goal is to check if the proposed move satisfies or violates Rule #1 and Rule #2 and based on that if it is a valid or invalid move.

Here are two examples:

Example 1:

This is the initial configuration:
A = []
B = [1]
C = [0, 2]

Proposed move:
Move 0 from C to B.

Answer:
First check whether the move satisfies or violates Rule #1. Index of 0 in list C is 0. Length of list C is 2. The difference in length of list C and index of 0 in list C is 2, which is not equal to 1. Hence 0 is not at the rightmost end of list C, and the move violates Rule #1.
Next check whether the move satisfies or violates Rule #2. For that compute the maximum of list B, to which 0 is moved. Maximum of list B is 1. 0 is not larger than 1. Hence the move violates Rule #2.
Since the Move 0 from list C to list B violates both Rule #1 and Rule #2, it is invalid.

Example 2:

This is the initial configuration:
A = []
B = [1]
C = [0, 2]

Proposed move:
Move 2 from C to B.

Answer:
First check whether the move satisfies or violates Rule #1. Index of 2 in list C is 1. Length of list C is 2. The difference in length of list C and index of 2 in list C is 1. Hence 2 is at the rightmost end of list C, and the move satisfies Rule #1.
Next check whether the move satisfies or violates Rule #2. For that compute the maximum of list B, to which 2 is moved. Maximum of list B is 1. 2 is larger than 1. Hence the move satisfies Rule #2.
Since the Move 2 from list C to list B satisfies both Rule #1 and Rule #2, it is valid.

Here is the task:

This is the initial configuration:
A = []
B = [0, 1]
C = [2]

Proposed move:
Move 1 from B to A.

Answer:

#### A.7.4 Predictor

The $\operatorname{Predictor}$ was prompted to predict the next state, given the current state and the proposed action. The following text was used as a prompt and in-context examples in the ToH task:

Consider the following puzzle problem:

Problem description:
- There are three lists labeled A, B, and C.
- There is a set of numbers distributed among those three lists.
- You can only move numbers from the rightmost end of one list to the rightmost end of another list.
Rule #1: You can only move a number if it is at the rightmost end of its current list.
Rule #2: You can only move a number to the rightmost end of a list if it is larger than the other numbers in that list.

Goal: The goal is to predict the configuration of the three lists, if the proposed move is applied to the current configuration.

Here are two examples:

Example 1:

This is the current configuration:
A = []
B = [1]
C = [0, 2]

Proposed move:
Move 2 from list C to list B.

Answer:
A = []
B = [1, 2]
C = [0]

Example 2:

This is the current configuration:
A = []
B = [1]
C = [0, 2]

Proposed move:
Move 1 from list B to list A.

Answer:
A = [1]
B = []
C = [0, 2]

Here is the task:

This is the current configuration:
A = []
B = [0, 1]
C = [2]

Proposed move:
Move 1 from list B to list A.

Answer:

#### A.7.5 Evaluator

For the $\operatorname{Evaluator}$, in the ToH task, GPT-4 was prompted to generate a heuristic function that could be used to estimate the distance between the current state and the goal state. The description of this heuristic function was then included in the $\operatorname{Evaluator}$’s prompt. In the graph traversal tasks, we used only in-context examples, with no heuristic function prompt.

The following text shows prompt and in-context examples used in the ToH task. The first User message prompts GPT-4 to generate a heuristic function. After GPT-4’s response, another User message prompts the $\operatorname{Evaluator}$ to use this function:

USER: Consider the following puzzle problem:

Problem description:
- There are three lists labeled A, B, and C.
- There is a set of numbers distributed among those three lists.
- You can only move numbers from the rightmost end of one list to the rightmost end of another list.
Rule #1: You can only move a number if it is at the rightmost end of its current list.
Rule #2: You can only move a number to the rightmost end of a list if it is larger than the other numbers in that list.
A move is valid if it satisfies both Rule #1 and Rule #2.
A move is invalid if it violates either Rule #1 or Rule #2.

Goal: The goal is to predict the minimum number of valid moves required to reach the goal configuration from the current configuration.

Here are two examples:

Example 1:

This is the current configuration:
A = [0, 1, 2]
B = []
C = []

This is the goal configuration:
A = []
B = []
C = [0, 1, 2]

Answer:
The minimum number of valid moves required to reach the goal configuration from the current configuration is 7.

Example 2:

This is the current configuration:
A = [1, 2]
B = [0]
C = []

This is the goal configuration:
A = []
B = []
C = [0, 1, 2]

Answer:
The minimum number of valid moves required to reach the goal configuration from the current configuration is 4.

What heuristic function can be used to estimate the minimum number of valid moves required to reach the goal configuration from a given current configuration?

GPT-4: A suitable heuristic function for this problem is the "sum of the distances" heuristic. This heuristic estimates the minimum number of valid moves required to reach the goal configuration by calculating the sum of the distances each number needs to travel to reach its final position in the goal configuration.

Here’s how the heuristic function works:

1. For each number in the current configuration, determine its current position (list and index) and its goal position (list and index) in the goal configuration.
2. Calculate the distance between the current position and the goal position for each number. The distance can be calculated as the absolute difference between the indices of the current and goal positions, plus a penalty if the number needs to move to a different list.
3. Sum the distances calculated in step 2 for all numbers.

The heuristic function will return the sum of the distances, which is an estimate of the minimum number of valid moves required to reach the goal configuration from the current configuration.

This heuristic is admissible because it never overestimates the cost of reaching the goal configuration. It considers the minimum number of moves required for each number to reach its goal position, without taking into account the constraints imposed by the rules of the puzzle. Therefore, the actual number of moves required to reach the goal configuration will always be greater than or equal to the heuristic value.

USER: This is the current configuration:
A = [0]
B = []
C = [1, 2]
This is the goal configuration:
A = [0]
B = [1, 2]
C = []

Use the heuristic function to predict the minimum number of valid moves required to reach the goal configuration from the current configuration.

Please provide your answer according to the heuristic function in the format as below:
The minimum number of valid moves required to reach the goal configuration from the current configuration is <N>.

#### A.7.6 Orchestrator

The $\operatorname{Orchestrator}$ was prompted to determine whether the current subgoal was achieved by the current state. The following text was used as a prompt and in-context examples in the ToH task:

Consider the following puzzle problem:

Problem description:
- There are three lists labeled A, B, and C.
- There is a set of numbers distributed among those three lists.
- You can only move numbers from the rightmost end of one list to the rightmost end of another list.
Rule #1: You can only move a number if it is at the rightmost end of its current list.
Rule #2: You can only move a number to the rightmost end of a list if it is larger than the other numbers in that list.

Goal: The goal is to predict whether the current configuration matches the goal configuration or not.

Here are two examples:

Example 1:

This is the current configuration:
A = []
B = []
C = [0, 1, 2]

This is the goal configuration:
A = []
B = []
C = [0, 1, 2]

Answer:
The current configuration matches the goal configuration. Hence yes.

Example 2:

This is the current configuration:
A = [0, 1]
B = [2]
C = []

This is the goal configuration:
A = []
B = []
C = [0, 1, 2]

Answer:
The current configuration doesn’t match the goal configuration. Hence no.

Here is the task:

This is the current configuration:
A = []
B = [0, 1, 2]
C = []

This is the goal configuration:
A = []
B = []
C = [0, 1, 2]

Answer:

#### A.7.7 Zero-shot prompt

An example prompt for the GPT-4 zero-shot baseline is shown below:

Consider the following puzzle problem:

Problem description:
- There are three lists labeled A, B, and C.
- There is a set of numbers distributed among those three lists.
- You can only move numbers from the rightmost end of one list to the rightmost end of another list.
Rule #1: You can only move a number if it is at the rightmost end of its current list.
Rule #2: You can only move a number to the rightmost end of a list if it is larger than the other numbers in that list.
A move is valid if it satisfies both Rule #1 and Rule #2.
A move is invalid if it violates either Rule #1 or Rule #2.

Goal: The goal is to end up in the configuration where all numbers are in list C, in ascending order using minimum number of moves.

This is the starting configuration:
A = [0, 1, 2]
B = []
C = []
This is the goal configuration:
A = []
B = []
C = [0,1,2]

Give me the sequence of moves to solve the puzzle from the starting configuration, updating the lists after each move. Please try to use as few moves as possible, and make sure to follow the rules listed above. Please limit your answer to a maximum of 10 steps.

Please format your answer as below:
Step 1. Move <N> from <src> to <tgt>.
A = []
B = []
C = []

#### A.7.8 ICL prompt

An example prompt for the GPT-4 ICL baseline is shown below:

Consider the following puzzle problem:

Problem description:
- There are three lists labeled A, B, and C.
- There is a set of numbers distributed among those three lists.
- You can only move numbers from the rightmost end of one list to the rightmost end of another list.
Rule #1: You can only move a number if it is at the rightmost end of its current list.
Rule #2: You can only move a number to the rightmost end of a list if it is larger than the other numbers in that list.
A move is valid if it satisfies both Rule #1 and Rule #2.
A move is invalid if it violates either Rule #1 or Rule #2.

Goal: The goal is to end up in the configuration where all numbers are in list C, in ascending order using minimum number of moves.

Here are two examples:

Example 1:

This is the starting configuration:
A = [0, 1]
B = [2]
C = []
This is the goal configuration:
A = []
B = []
C = [0, 1, 2]

Here is the sequence of minimum number of moves to reach the goal configuration from the starting configuration:

Move 2 from B to C.
A = [0, 1]
B = []
C = [2]

Move 1 from A to B.
A = [0]
B = [1]
C = [2]

Move 2 from C to B.
A = [0]
B = [1, 2]
C = []

Move 0 from A to C.
A = []
B = [1, 2]
C = [0]

Move 2 from B to A.
A = [2]
B = [1]
C = [0]

Move 1 from B to C.
A = [2]
B = []
C = [0, 1]

Move 2 from A to C.
A = []
B = []
C = [0, 1, 2]

Example 2:

This is the starting configuration:
A = [1]
B = [0]
C = [2]
This is the goal configuration:
A = []
B = []
C = [0, 1, 2]

Here is the sequence of minimum number of moves to reach the goal configuration from the starting configuration:

Move 2 from C to A.
A = [1, 2]
B = [0]
C = []

Move 0 from B to C.
A = [1, 2]
B = []
C = [0]

Move 2 from A to B.
A = [1]
B = [2]
C = [0]

Move 1 from A to C.
A = []
B = [2]
C = [0, 1]

Move 2 from B to C.
A = []
B = []
C = [0, 1, 2]

Here is the task:

This is the starting configuration:
A = [0, 1, 2]
B = []
C = []
This is the goal configuration:
A = []
B = []
C = [0,1,2]

Give me the sequence of moves to solve the puzzle from the starting configuration, updating the lists after each move. Please try to use as few moves as possible, and make sure to follow the rules listed above. Please limit your answer to a maximum of 10 steps.

Please format your answer as below:
Step 1. Move <N> from <src> to <tgt>.
A = []
B = []
C = []

#### A.7.9 CoT ICL prompt

An example prompt for the GPT-4 CoT ICL baseline is shown below:

Consider the following puzzle problem:

Problem description:
- There are three lists labeled A, B, and C.
- There is a set of numbers distributed among those three lists.
- You can only move numbers from the rightmost end of one list to the rightmost end of another list.
Rule #1: You can only move a number if it is at the rightmost end of its current list.
Rule #2: You can only move a number to the rightmost end of a list if it is larger than the other numbers in that list.
A move is valid if it satisfies both Rule #1 and Rule #2.
A move is invalid if it violates either Rule #1 or Rule #2.

Goal: The goal is to end up in the configuration where all numbers are in list C, in ascending order using minimum number of moves.

Here are two examples:

Example 1:

This is the starting configuration:
A = [0, 1]
B = [2]
C = []
This is the goal configuration:
A = []
B = []
C = [0, 1, 2]

Here is the sequence of minimum number of moves along with reasoning for each move to reach the goal configuration from the starting configuration:

I need to move 0 from A to C. But before that I need to move the number present to the right of 0, which is 1 to B. There is a number larger than 1 already present in list B. Hence I first need to move 2 from B to C.
Move 2 from B to C.
A = [0, 1]
B = []
C = [2]

I need to move 0 from A to C. But before that I need to move the number present to the right of 0, which is 1 to B.
Move 1 from A to B.
A = [0]
B = [1]
C = [2]

I need to move 0 from A to C. There is a number larger than 0 already present in list C. Hence I first need to move 2 from C to B.
Move 2 from C to B.
A = [0]
B = [1, 2]
C = []

There is no number to the right of 0 in A, and there is no number larger than 0 in C. Hence, I can move 0 from A to C.
Move 0 from A to C.
A = []
B = [1, 2]
C = [0]

I need to move 1 from B to C. But before that I need to move the number present to the right of 1, which is 2 to A.
Move 2 from B to A.
A = [2]
B = [1]
C = [0]

There is no number to the right of 1 in B, and there is no number larger than 1 in C. Hence, I can move 1 from B to C.
Move 1 from B to C.
A = [2]
B = []
C = [0, 1]

There is no number to the right of 2 in A, and there is no number larger than 2 in C. Hence, I can move 2 from A to C.
Move 2 from A to C.
A = []
B = []
C = [0, 1, 2]

Example 2:

This is the starting configuration:
A = [1]
B = [0]
C = [2]
This is the goal configuration:
A = []
B = []
C = [0, 1, 2]

Here is the sequence of minimum number of moves along with reasoning for each move to reach the goal configuration from the starting configuration:

I need to move 0 from B to C. There is a number larger than 0 already present in list C. Hence I first need to move 2 from C to A.
Move 2 from C to A.
A = [1, 2]
B = [0]
C = []

There is no number to the right of 0 in B, and there is no number larger than 0 in C. Hence, I can move 0 from B to C.
Move 0 from B to C.
A = [1, 2]
B = []
C = [0]

I need to move 1 from A to C. But before that I need to move the number present to the right of 1, which is 2 to B.
Move 2 from A to B.
A = [1]
B = [2]
C = [0]

There is no number to the right of 1 in A, and there is no number larger than 1 in C. Hence, I can move 1 from A to C.
Move 1 from A to C.
A = []
B = [2]
C = [0, 1]

There is no number to the right of 2 in B, and there is no number larger than 2 in C. Hence, I can move 2 from B to C.
Move 2 from B to C.
A = []
B = []
C = [0, 1, 2]

Here is the task:

This is the starting configuration:
A = [0, 1, 2]
B = []
C = []
This is the goal configuration:
A = []
B = []
C = [0,1,2]

Give me the sequence of moves to solve the puzzle from the starting configuration, updating the lists after each move. Please try to use as few moves as possible, and make sure to follow the rules listed above. Please limit your answer to a maximum of 10 steps.

Please format your answer as below:
Step 1. Move <N> from <src> to <tgt>.
A = []
B = []
C = []

### A.8 Computational Cost: Thinking Fast and (very) Slow

Tables 16 and 17 show various cost metrics for both MAP vs. baseline models, and compares these cost metrics with performance. To address the significant computational cost of MAP, we also developed a more efficient version that cached and re-used results for redundant prompts. This was done for all modules except the $\operatorname{Actor}$ and the $\operatorname{TaskDecomposer}$. This version of the model was significantly more efficient, while retaining the same level of performance.

**Table 16: Average per-problem computational cost ($\pm$ the standard error of the mean) on ToH with 3 disks. 5 runs were done for MAP.**
| Model | Num. calls | Num. input tokens | Num. output tokens | % solved |
| --- | --- | --- | --- | --- |
| GPT-4 ICL | 1 $\pm$ 0.0 | 810.88 $\pm$ 0.1 | 190.38 $\pm$ 15.4 | 46 |
| GPT-4 CoT | 1$\pm$ 0.0 | 1309.88 $\pm$ 0.1 | 422.42<br>$\pm$ 22.8 | 42 |
| ToT | 45.75 $\pm$ 0.6 | 26649.88 $\pm$ 454.0 | 7523.96<br>$\pm$ 322.4 | 6 |
| MAP | 148.6 $\pm$ 8.2 | 109,090.025 $\pm$ 6,567.2 | 14,543.57 $\pm$ 844.6 | 74 $\pm$ 3 |
| MAP (efficient) | 41.99 $\pm$ 3.6 | 47242.43 $\pm$ 3848.4 | 2766.34 $\pm$ 324.5 | 77 $\pm$ 3 |

**Table 17: Average per-problem computational cost ($\pm$ the standard error of the mean) incurred by each module of MAP on ToH with 3 disks.**
| Module | Num. calls | Num. input tokens | Num. output tokens |
| --- | --- | --- | --- |
| Actor | 24.68 $\pm$ 1.5 | 38,274.62 $\pm$ 2,796.8 | 758.69 $\pm$ 54.1 |
| Monitor | 46.26 $\pm$ 2.8 | 32,135.44 $\pm$ 1,933.2 | 7,131.85 $\pm$ 429.6 |
| Predictor | 29.48 $\pm$ 1.6 | 11,284.65 $\pm$ 601.3 | 477.48 $\pm$ 25.7 |
| Evaluator | 22.52 $\pm$ 1.2 | 17,054.15 $\pm$ 917.6 | 5,730.11 $\pm$ 334.3 |
| Orchestrator | 24.67 $\pm$ 1.2 | 9,553.3 $\pm$ 466.7 | 316.0 $\pm$ 16.0 |
| Task Decomposer | 1 $\pm$ 0.0 | 787.88 $\pm$ 0.0 | 129.44 ± 2.0 |

## Peer Reviews

confidence: 4
contribution: 2
initial_rating: 3
presentation: 2
questions: Refer to the weakness, please.
soundness: 3
strengths: 1. Reasonable Modular Design: The proposed MAP employs a modular architecture that enhances the planning capabilities of large language models through the coordination of dedicated modules for task decomposition, state evaluation, and error monitoring. The design approach is reasonable and systematically structured.
2. Validation Across Multiple Tasks: The authors evaluated MAP on several representative tasks, including graph traversal, Tower of Hanoi, PlanBench, and the multi-step reasoning NLP task StrategyQA, providing a relatively comprehensive demonstration of the method’s applicability.
3. Demonstrated Transfer Performance: MAP shows a certain level of task transferability, suggesting that the approach can adapt to task variations in some cases, offering a reference for applying modular methods to complex tasks.
summary: The paper introduces the Modular Agentic Planner (MAP), a modular architecture designed to improve the planning capabilities of large language models (LLMs). MAP integrates several specialized modules—such as action proposal, state evaluation, task decomposition, and error monitoring—each fulfilled by an LLM instance to enhance multi-step reasoning and decision-making. These modules work interactively, decomposing complex tasks into subgoals, validating actions, predicting outcomes, and assessing states, which allows the system to adapt and refine its plans dynamically.
weaknesses: 1. Lack of Novelty in Agent Design: Numerous studies have already explored agent system design using role-playing, multi-module coordination, or multi-agent frameworks, such as DEPS, JARVIS-1, Voyager, and CAMEL. These approaches have been validated on more complex, open-world benchmarks. For instance, DEPS includes Descriptor, Explainer, Planner, and Selector modules. Compared to these works, what are the specific advantages and unique contributions of this paper?
2. Predictor Module Challenges: The paper introduces a Predictor module, aiming to forecast the next state, which is inherently challenging, particularly in complex and stochastic real-world environments. This essentially functions as a world model, a field still underdeveloped in research. Thus, I believe this approach may struggle to generalize to more complex environments or tasks.
3. Evaluation on Standardized but Limited Tasks: The paper’s evaluation is primarily on two tasks—Graph Traversal and Tower of Hanoi—both of which are well-established problems in graph theory and search, with mature solutions already available. These tasks are not widely recognized as agent benchmarks, and the community may not find the experiments on these tasks compelling.
4. Lack of Comparison with Other Role-Playing Methods: The paper lacks comparisons with other role-playing-based approaches, limiting insight into its relative effectiveness.

[1] DEPS: Describe, Explain, Plan and Select: Interactive Planning with LLMs Enables Open-World Multi-Task Agents
[2] JARVIS-1: Open-World Multi-task Agents with Memory-Augmented Multimodal Language Models
[3] Voyager: An open-ended embodied agent with large language models
[4] CAMEL: Communicative Agents for "Mind" Exploration of Large Language Model Society

---

confidence: 4
contribution: 2
initial_rating: 5
presentation: 3
questions: * The metrics for evaluating the planning tasks should be discussed explicitly in Sec 3.1
* The presentation of tables 1-3 can be improved by adding the column lines to clearly see the content boundaries and summarize the key takeaways and why you report different baselines for these tasks.
* In Sec 4, it will be helpful to state the numerical margins of improvements in the text for all the plots, since it is not discussed in the paper and is a bit hard to read from the plots.
soundness: 3
strengths: * The paper is well-written and easy to follow
* The empirical results of the method are compelling, with good performance gains across several planning tasks, and is easy enough to implement from the description in the paper, so it should be readily reproducible and easy to implement
summary: This paper proposes MAP, a modular, agentic LLM program that uses specialized modules: task decomposer, actor, monitor, predictor, evaluator, and orchestrator, by prompting GPT-4 with in-context learning to perform complex planning tasks. Empirically, the paper shows strong results improving over baselines such as few-shot prompting, multi-agent debate, and tree-of-thought and also shows analysis supporting the need for each component in their pipeline.
weaknesses: * Background on planning tasks and assumptions: The authors seem to operate under a fully observable setting that governs how the monitor, predictor, and orchestrator modules are set up. This assumption should be explicitly stated in Section 2, and how it would change when planning in a partially observable setting should be discussed, as well as whether it is in the scope of this work.
* Missing related work: The paper is missing a few relevant works in partially observable settings:
     * [Adapt](https://arxiv.org/abs/2311.05772): This paper also has recursive task decomposition using three modules (which is similar to some of the modules in MAP) for text games that can be argued have planning components in partially observable settings. 
     * [LATS](https://arxiv.org/abs/2310.04406): Similarly, this paper also uses several LLM components or modules and fuses them with tree search (MCTS) which is relevant to MAPS. A discussion of the similarities and distinctions between these works would place the work better in the broader context of the existing work.
* Lack of acknowledgment of and addressing computational overhead and cost tradeoff with performance: As noted in Appendix A.8, it can be argued that MAP uses a significantly higher token budget (which also translates into monetary cost) as compared to the baselines to get the performance gains it achieves. A fairer comparison would be to increase the computation budget of baselines such as depth and breadth of tree search and verify that the performance gains persist. Similar to the Adapt paper, the authors can increase the number of tokens generated or report the best of n trials to enable such a comparison.

---

confidence: 3
contribution: 2
initial_rating: 5
presentation: 2
questions: See weaknesses
soundness: 3
strengths: 1. The experiments and ablation analysis are thoroughly conducted with statistical significance.
2. Inspirations from cognitive neuroscience are interesting.
3. Writing is clear and easy to follow, and the method section is clear. 
4. Thorough ablation analysis on method's failure method
5. Solid results compared to the baselines provided (especially on challenging tasks like PlanBench).
summary: This paper proposes the Modular Agentic Planner (MAP), a modular agentic architecture that improves the planning capabilities of LLMs. The architecture includes components for conflict monitoring, state prediction, state evaluation, task decomposition, and orchestration. Each module is implemented using an LLM and performs a specific function in the planning process. The authors evaluate MAP on four tasks: graph traversal, Tower of Hanoi, PlanBench, and StrategyQA, and showed improvement over baselines like CoT, ToT, ICL and Zero-shot. An ablation study is performed to highlight TreeSearch and TaskDecomposer's contribution to the MAP's performance.
weaknesses: 1. Novelty and relation to prior work -- MAP seems to be a modular agentic framework with search, which is not the first time this high-level structure is introduced, and works with similar framework were not explicit discusses. See references below.
2. In relation to point 1, I find the baselines in the experiments all too weak. There are plenty of work on LLM agents that use explicit planning modules and/or MCTS. It would be more convincing if the MAP can still outperform those. If that's the case, an analysis on why MAP outperforms planning-based methods would be great to have as well. 
**Minor stuff**: tables contains odd spacing, and a lot of white spaces.

Additional references:
https://arxiv.org/pdf/2308.05960
https://arxiv.org/pdf/2212.04088
https://arxiv.org/abs/2305.14078
https://arxiv.org/pdf/2305.14992

---

confidence: 4
contribution: 3
initial_rating: 5
presentation: 2
questions: - Each module is inspired by neuroscience and RL. Is there a theoretical background that also covers interactions between these modules?
- How are in-context examples selected and constructed for each module? Are they fixed or dynamically selected according to task requirements?
- Is prompt design automated, or does it require manual configuration? Given MAP’s architecture, prompt design for all modules could be costly and time-consuming. The automatic insights collection approach used by ExpeL [4] could also serve as a useful reference.
- Why does the Task Decomposer currently generate only a single subgoal?
- The Actor’s in-context examples (A.7.2) lack feedback examples. Can the Actor effectively process feedback when it is provided by the Monitor?
- Is there a plan to test in more complex environments (e.g., Minecraft [1], ALFWorld [2], WebShop [3]), where prediction errors may occur more frequently?
- Even efficient version of MAP incurs significant computational costs. How do the authors plan to address this issue?

[4] Zhao, Andrew, et al. "Expel: Llm agents are experiential learners." *Proceedings of the AAAI Conference on Artificial Intelligence*. Vol. 38. No. 17. 2024.
soundness: 2
strengths: - The concept of using multiple LLM-based modules, each with a specific role in planning, is well-conceived. Additionally, grounding each module in neuroscience and RL theories strengthens the approach.
- The tasks used in the experiments, such as graph traversal and PlanBench, effectively isolate and test the planning capabilities of LLMs, demonstrating the system’s potential to address planning challenges.
summary: This paper proposes MAP, a modular planning architecture designed to address the limitations of LLM-based planning methods. Each module has a specific role and operates collectively within the system. Each module is inspired by concepts from cognitive neuroscience and reinforcement learning (RL). The authors demonstrate performance improvements over baselines (GPT-4 Zero-shot, GPT-4 ICL, GPT-4 CoT, ToT, MAD) in tasks such as graph traversal, Tower of Hanoi, PlanBench, and StrategyQA.
weaknesses: - The primary limitation of MAP is its high computational cost, which does not seem fully justified by the observed performance gains. According to Section A.8, the number of input tokens used in MAP is 83 times higher than GPT-4 CoT. Even the efficient version of MAP is 36 times more costly.
- The explanation of MAP in the main text is insufficient, requiring reference to multiple sections in the appendix to fully understand certain modules. For example, understanding the Actor and Monitor modules requires consulting not only the main text but also Algorithm 2, Algorithm 3, and Sections A.7.2 and A.7.3 in the appendix. Additionally, inconsistencies remain in the descriptions. For instance, Algorithm 2 shows the Actor outputting an action sequence $A$, but in Section A.7.2, both action sequences and state information are included. It is unclear whether the Actor outputs only action sequences, both action and state, or relies on other modules for state information. Similarly, in Algorithm 2, the Monitor is described as taking the action sequence $A$ from the Actor and producing validity and feedback for the sequence. However, the in-context examples in Section A.7.3 show feedback and validity generated for each individual action, creating ambiguity about how the Monitor processes an entire action sequence to produce validity and feedback.
- Like many LLM-based planners, MAP relies heavily on selecting in-context examples. However, there is no detailed explanation for how these examples are chosen. The authors should clarify whether in-context examples are fixed or dynamically selected. If fixed, identifying effective examples for each module could be costly. If dynamically selected, an explanation is needed on how examples are constructed and selected.
- The Task Decomposer appears to lack a mechanism for recovering from errors in subgoal generation, meaning that an initial mistake in generating a subgoal could lead to failure regardless of subsequent steps. Additionally, MAP currently only generates single subgoals in experiments. Verification is needed to assess its effectiveness when multiple subgoals are required.
- The Predictor module seems likely to perform well only in deterministic environments. In complex or non-deterministic environments (e.g., Minecraft [1], ALFWorld [2], WebShop [3]), accurate prediction may become challenging, risking performance degradation.

[1] Fan, Linxi, et al. "Minedojo: Building open-ended embodied agents with internet-scale knowledge." *Advances in Neural Information Processing Systems* 35 (2022): 18343-18362.

[2] Shridhar, Mohit, et al. "ALFWorld: Aligning Text and Embodied Environments for Interactive Learning." *International Conference on Learning Representations*.

[3] Yao, Shunyu, et al. "Webshop: Towards scalable real-world web interaction with grounded language agents." *Advances in Neural Information Processing Systems* 35 (2022): 20744-20757.