Prolog Planners from LLMs: A Surprisingly Effective Approach

2025-04-02

This paper explores using Large Language Models (LLMs) to generate Prolog planners, leveraging Prolog's combinatorial search capabilities. The authors argue that LLMs are better suited for translating natural language into Prolog than for planning directly. Their approach involves prompting an LLM to translate problem descriptions into Prolog code, which is then used by a Prolog engine to perform the planning. A detailed prompting guide is provided, focusing on generating state facts, action predicates, and check predicates. This approach bypasses limitations of LLMs in direct planning while utilizing Prolog's strengths in logical reasoning and combinatorial search. The method is shown to be effective on various toy planning problems.

Development Automated Planning