Tradução Automatizada de PDDL para planejamento em HTN baseada em Grandes Modelos de Linguagem

Isadora Schwaab, André G. Pereira2025

TL;DR

This paper explores using Large Language Models (LLMs) to bridge the gap between classical and hierarchical planning. By automating the translation of PDDL (classical) to HDDL (hierarchical) formats, the authors demonstrate that LLMs can effectively act as "planning assistants," achieving up to a 100% success rate in generating solvable hierarchical models when provided with the right prompting strategy.

What Problem Does This Paper Address?

In the field of Artificial Intelligence, Automated Planning is the process of finding a sequence of actions to reach a goal. There are two main flavors:

  1. Classical Planning (PDDL): Uses generic search algorithms. It’s flexible but can be computationally expensive because it explores a massive state space without specific guidance.
  2. Hierarchical Task Network (HTN) Planning (HDDL): Uses domain-specific knowledge to decompose complex tasks into smaller ones. It is much faster and more powerful but requires experts to manually define "task networks"—a tedious and error-prone process.

The authors tackle the "knowledge bottleneck": how can we take a standard classical planning problem and automatically generate the hierarchical structure needed for HTN planning? They propose using the intuitive, pattern-matching capabilities of LLMs to perform this translation.

Methods

The researchers developed a Python-based tool that automates a three-step pipeline:

  1. Prompt Generation: The tool takes a PDDL problem and domain definition and wraps them into a prompt for an LLM.
  2. LLM Translation: The model (specifically Google's Gemini 1.5 Flash and Flash-Lite—noted as 2.5 in the text) is asked to produce the corresponding HDDL representation, including a coherent initial task network.
  3. Validation: The generated HDDL is fed into the PANDA system (a state-of-the-art HTN planner). This step is crucial because it verifies if the LLM's output is not just "syntactically correct" but actually leads to a valid, solvable plan.

The study specifically experimented with six prompt variations, ranging from "zero-shot" (no examples) to "few-shot" (providing syntax examples or full translation examples) and varying the complexity of the request (full translation vs. just filling in the task network).

Datasets

The evaluation used 6 distinct planning domains adapted from the International Planning Competition (IPC) benchmarks:

  • Barman-BDI
  • Blocksworld-GTOHP
  • Depots
  • Logistics-Learned-ECAI-16
  • Rover-GTOHP
  • Satellite-GTOHP

Each domain consisted of 10 problems, and each test was repeated across 3 iterations to account for LLM variance, totaling roughly 30 executions per prompt/model combination.

Key Insights and Ideas

  • The "Example" Catalyst: For the smaller model (Flash-Lite), examples weren't just helpful—they were mandatory. Without examples, its success rate was 0% across all domains. However, with full translation examples, it reached 100% success in the Barman domain.
  • Intuition over Reasoning: The authors highlight that LLMs don't "solve" the planning problem through logical reasoning but through an intuitive grasp of the structure. This makes them excellent at suggesting task networks that "look right," which the formal planner then verifies.
  • Case Sensitivity Trap: A subtle but important finding was the conflict between PDDL (case-insensitive) and HDDL (case-sensitive). The authors had to explicitly instruct the LLMs to maintain case consistency to avoid parsing errors in the PANDA system.
  • Task Network vs. Full Translation: Interestingly, providing a partial translation and asking the LLM to only fill in the task network was often more effective than asking for a full translation from scratch, as it reduced the "surface area" for potential syntax errors.

Key Results

The results varied significantly by model and prompt:

  • Gemini 1.5 Flash: Showed robust performance, achieving a 100% success rate in the Barman domain and over 90% in Logistics and Rover domains using the most comprehensive prompts.
  • Gemini 1.5 Flash-Lite: While weaker overall, it proved that with high-quality "few-shot" examples (Prompt 5 and 6), it could match or even exceed the larger model in specific domains like Barman.
  • Domain Difficulty: The "Depots" domain proved the most challenging for both models (peaking at ~36% success), likely due to the complex ordering constraints required in its task networks.

Limitations and Future Work

The authors identify a few areas for improvement:

  • Ordering Constraints: The models struggled with domains like "Depots" where the sequence of tasks is highly sensitive. Future work could involve more sophisticated prompting techniques to handle temporal or causal ordering.
  • Model Hallucinations: While the PANDA system catches errors, the LLM still occasionally produces invalid syntax or references non-existent predicates.
  • Scaling: The current study uses relatively small benchmark problems. Testing how LLMs handle massive, real-world industrial planning domains remains an open question.

In conclusion, the paper proves that LLMs are a viable path toward automating the "dark art" of HTN domain modeling, potentially making high-performance hierarchical planning accessible to non-experts.

Summary updated

Abstract

Este trabalho investiga o uso de Grandes Modelos de Linguagem (LLMs) para traduzir problemas de planejamento clássico em PDDL para representações hierárquicas em HDDL. Desenvolvemos uma ferramenta para automatizar o envio de requisições, processar as respostas e avaliar a taxa de problemas solucionáveis. Os experimentos envolveram variações de prompts com diferentes níveis de exemplificação e complexidade. Os resultados demonstram que os modelos avaliados podem atuar de forma eficaz como auxiliares de planejamento, alcançando taxas de até 100% de problemas resolvidos em determinados cenários, o que evidencia o potencial da abordagem proposta.
BibTeX
@misc{schwaab2025traducao,
  author = {Isadora Schwaab and André G. Pereira},
  title = {{Tradução Automatizada de PDDL para planejamento em HTN baseada em Grandes Modelos de Linguagem}},
  year = {2025},
  doi = {10.5753/eramiars.2025.16785},
}
Figure