Online Learning of HTN Methods for integrated LLM-HTN Planning
Yuesheng Xu, Hector Munoz-Avila
TL;DR
This work tackles the cost and latency of relying on LLMs for HTN task decompositions by introducing online learning of HTN methods within the ChatHTN planner. It leverages annotated tasks, verifier checks, and goal-regression to lift learned decompositions into generalized methods that apply across states, preserving soundness. Empirical results in Logistics Transportation and Search and Rescue show the approach reduces ChatGPT calls while solving at least as many problems as the baseline, with some cases improving performance. The method advances scalable, LLM-assisted planning by trading off occasional learning overhead for significant reductions in costly LLM queries and faster plan generation.
Abstract
We present online learning of Hierarchical Task Network (HTN) methods in the context of integrated HTN planning and LLM-based chatbots. Methods indicate when and how to decompose tasks into subtasks. Our method learner is built on top of the ChatHTN planner. ChatHTN queries ChatGPT to generate a decomposition of a task into primitive tasks when no applicable method for the task is available. In this work, we extend ChatHTN. Namely, when ChatGPT generates a task decomposition, ChatHTN learns from it, akin to memoization. However, unlike memoization, it learns a generalized method that applies not only to the specific instance encountered, but to other instances of the same task. We conduct experiments on two domains and demonstrate that our online learning procedure reduces the number of calls to ChatGPT while solving at least as many problems, and in some cases, even more.
