Skip to main content
QUICK REVIEW

[Paper Review] Generalized Planning in PDDL Domains with Pretrained Large Language Models

Tom Silver, Soham Dan|arXiv (Cornell University)|May 18, 2023
Software Engineering ResearchComputer Science6 citations
TL;DR

This paper proposes using GPT-4 to generate generalized planners in PDDL domains by synthesizing Python programs from few-shot PDDL task examples. With chain-of-thought prompting and automated debugging, GPT-4 achieves strong generalization—often requiring only two training tasks—demonstrating that LLMs can serve as powerful, efficient, and inspectable generalized planners across seven domains.

ABSTRACT

Recent work has considered whether large language models (LLMs) can function as planners: given a task, generate a plan. We investigate whether LLMs can serve as generalized planners: given a domain and training tasks, generate a program that efficiently produces plans for other tasks in the domain. In particular, we consider PDDL domains and use GPT-4 to synthesize Python programs. We also consider (1) Chain-of-Thought (CoT) summarization, where the LLM is prompted to summarize the domain and propose a strategy in words before synthesizing the program; and (2) automated debugging, where the program is validated with respect to the training tasks, and in case of errors, the LLM is re-prompted with four types of feedback. We evaluate this approach in seven PDDL domains and compare it to four ablations and four baselines. Overall, we find that GPT-4 is a surprisingly powerful generalized planner. We also conclude that automated debugging is very important, that CoT summarization has non-uniform impact, that GPT-4 is far superior to GPT-3.5, and that just two training tasks are often sufficient for strong generalization.

Motivation & Objective

  • To investigate whether pretrained large language models (LLMs) can function as generalized planners in PDDL domains, producing reusable programs instead of per-task plans.
  • To evaluate the effectiveness of GPT-4 in synthesizing domain-specific Python programs that generalize across unseen tasks in PDDL domains.
  • To assess the impact of methodological enhancements such as chain-of-thought summarization and automated debugging on program correctness and generalization.
  • To compare GPT-4’s performance against GPT-3.5 and ablated baselines, analyzing data efficiency and robustness.
  • To explore the feasibility of using LLMs for generalized planning in domains where traditional methods are complex or impractical.

Proposed method

  • Prompt GPT-4 with a PDDL domain and a small set of training tasks (encoded in PDDL) to generate a Python program that takes a task description and outputs a plan.
  • Incorporate Chain-of-Thought (CoT) prompting, instructing GPT-4 to first summarize the domain and propose a solution strategy in natural language before writing code.
  • Apply automated debugging: execute the generated program on training tasks; if it fails, provide feedback (e.g., exceptions) and re-prompt GPT-4 up to four times to fix errors.
  • Use a pipeline that validates the program against training tasks and iteratively improves it through feedback loops.
  • Synthesize programs that avoid search-based planning, instead favoring simple, non-search strategies as per instructions.
  • Evaluate across seven PDDL domains, including six from prior work and one novel domain, comparing to ablations and baselines.
Figure 1: Overview of pipeline for generalized planning with pretrained LLMs. See text for details.
Figure 1: Overview of pipeline for generalized planning with pretrained LLMs. See text for details.

Experimental results

Research questions

  • RQ1Can GPT-4 effectively synthesize generalized planners in PDDL domains by generating reusable Python programs from few-shot examples?
  • RQ2How does chain-of-thought prompting influence the quality and correctness of the synthesized generalized plans?
  • RQ3To what extent does automated debugging improve the reliability and generalization of LLM-generated planners?
  • RQ4How does GPT-4 compare to GPT-3.5 in generalized planning performance across diverse PDDL domains?
  • RQ5How many training tasks are minimally required for strong generalization, and does performance degrade with fewer examples?

Key findings

  • GPT-4 is a surprisingly powerful generalized planner, outperforming multiple baselines and ablations across seven PDDL domains.
  • Automated debugging is critical: without it, GPT-4 frequently produces incorrect or non-functional code, but with it, success rates improve significantly.
  • Chain-of-thought prompting has non-uniform impact—helpful in some domains but not consistently beneficial across all domains.
  • GPT-4 significantly outperforms GPT-3.5, demonstrating superior reasoning and code generation capabilities for generalized planning.
  • Just two training tasks are often sufficient for strong generalization, with only a small number of cases requiring a third task during automated debugging.
  • The LLM can generalize effectively even when PDDL names are removed, suggesting it can learn from syntactic structure, though names improve performance in most cases.
Figure 2: GPT-4 synthesized program runtime compared to a state-of-the-art planner (Fast Downward). Note the log-log axes. Each point is a median over 10 newly generated tasks, over all seeds where generalized planning solved all evaluation tasks.
Figure 2: GPT-4 synthesized program runtime compared to a state-of-the-art planner (Fast Downward). Note the log-log axes. Each point is a median over 10 newly generated tasks, over all seeds where generalized planning solved all evaluation tasks.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.