Automated Repair of Totally-Ordered Hierarchical Task Network Domains via Context-Free Grammars with Large Language Model Support
Daniel Lutalo, Pascal Bercher
Abstract
Repairing flawed domain models remains a critical challenge in AI planning, with few effective techniques available. We propose a novel approach for repairing totally ordered hierarchical task network (TO-HTN) models with missing actions, guided by a plan that must be valid for the repaired model. This problem has only one previously documented approach, which relies on complex re-encoding that's solved via TO-HTN planning. In contrast, our approach translates the repair task into a context-free grammar repair problem and leverages a large language model (LLM) to identify and insert relevant actions directly, simplifying the repair process. We evaluate our approach on established benchmarks and demonstrate substantially improved results over the prior approach, achieving nearly three times the number of instances solved, and nearly solving all instances of domains in which the previous approach solved zero. Importantly, we mask all natural language hints, such as action names, forcing the LLM to simulate reasoning and planning, and mitigating the risk of data leakage from its training corpus.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 777f1320-a31d-4a70-8942-1f93f23ff2a1Builds on6
- Leveraging Pre-trained Large Language Models to Construct and Utilize World Models for Model-based Task PlanningLin Guan, Karthik Valmeekam, Sarath Sreedharan, Subbarao KambhampatiNeurIPS 2023 · 347 citations
- On Succinct Groundings of HTN Planning ProblemsGregor Behnke, Daniel Höller, Alexander Schmid, Pascal Bercher et al.AAAI 2020 · 34 citations
- Can LLMs Fix Issues with Reasoning Models? Towards More Likely Models for AI PlanningTurgay Caglar, Sirine Belhaj, Tathagata Chakraborti, Michael Katz et al.AAAI 2024 · 11 citations
- Was Fixing This Really That Hard? On the Complexity of Correcting HTN DomainsSongtuan Lin, Pascal BercherAAAI 2023 · 10 citations
- Refining HTN Methods via Task Insertion with PreferencesZhanhao Xiao, Hai Wan, Hankz Hankui Zhuo, Andreas Herzig et al.AAAI 2020 · 9 citations
Related papers
- Classical Planning with LLM-Generated Heuristics: Challenging the State of the Art with Python CodeAugusto B. Corrêa, André Grahl Pereira, Jendrik SeippNeurIPS 2025 · 27 citations
- HYSYNTH: Context-Free LLM Approximation for Guiding Program SynthesisShraddha Barke, Emmanuel Anaya Gonzalez, Saketh Ram Kasibatla, Taylor Berg-Kirkpatrick et al.NeurIPS 2024 · 34 citations
- Automated Program Repair in the Era of Large Pre-trained Language ModelsChunqiu Steven Xia, Yuxiang Wei, Lingming ZhangICSE 2023 · 321 citations
- On the Limit of Language Models as Planning FormalizersCassie Huang, Li ZhangACL 2025
- ThinkRepair: Self-Directed Automated Program RepairXin Yin, Chao Ni, Shaohua Wang, Zhenhao Li et al.ISSTA 2024 · 37 citations
