NeurIPS 2026Coming to NeurIPS in Sydney?Explore papers, orals & directions

Can LLMs plan paths with extra hints from solvers?

Erik Wu, Sayan MitraarXiv 2024

TL;DR

This paper investigates how to improve Large Language Models' (LLMs) ability to solve classical robotic path planning problems by providing them with hints generated by external solvers. While these hints significantly boost performance on moderately difficult tasks, LLMs still struggle with highly complex planning scenarios.

What Problem Does This Paper Address?

Path planning, a fundamental problem in robotics, involves finding a collision-free path for an agent from a start to a goal position in an environment with obstacles. While LLMs have shown promise in various reasoning tasks, their effectiveness in long-term planning and complex problem-solving, like path planning, has been found to be limited and fragile. Previous attempts using techniques like Chain-of-Thought prompting have shown only marginal improvements, especially as problem complexity increases. This paper aims to bridge this gap by exploring how solver-generated feedback can enhance LLM performance in this domain.

Methods

The core of this research is a closed-loop prompting framework. This framework iteratively feeds an LLM with hints generated by an external Satisfiability Modulo Theory (SMT) solver. The process works as follows:

  1. Initial Prompt: The LLM receives a description of the path planning problem, including the start, goal, and obstacle configurations, along with a few examples (few-shot prompting).
  2. LLM Generates Candidate Path: The LLM proposes a path.
  3. Solver Feedback: An SMT solver analyzes the LLM's proposed path. If it's incorrect, the solver generates one or more of the following hints:
  4. Collision Hints: Pinpoint segments of the path that intersect with obstacles.
  5. Free-Space Hints: Suggest potentially useful obstacle-free waypoints to guide the LLM towards alternative routes.
  6. Correct-Prefix Hints: Provide the longest valid prefix of the LLM's proposed path, encouraging it to build upon correct segments.
  7. Image Hints: Offer a visual rendering of the planning problem and the LLM's last suggested path.
  8. Iterative Refinement: The LLM receives the hints and generates a new candidate path, repeating the cycle until a solution is found or a maximum number of iterations is reached.

The researchers also explored fine-tuning LLMs on a dataset of path planning problems and their solutions.

Datasets

The paper uses two main sets of path planning problems for evaluation:

  • Handcrafted Problems: A set of 10 problems sourced from existing literature on planning and control synthesis, varying in difficulty.
  • Random Problems: A newly generated benchmark of 100 problems. These are created by dividing the workspace into a grid and randomly selecting tiles for obstacles, allowing for control over difficulty by varying the number, location, and overlap of obstacles.

Key Insights and Ideas

  • Solver Hints are Crucial: LLMs, on their own, are largely ineffective at solving path planning problems beyond the simplest cases. External solver feedback is essential for improvement.
  • Collision Hints are a Strong Baseline: Even basic collision hints significantly improve LLM performance on moderate problems, making them a good starting point for more complex hinting strategies.
  • Hard Problems Remain a Challenge: Despite sophisticated hints, LLMs still struggle with the most difficult path planning instances, suggesting limitations in their long-term reasoning and planning capabilities.
  • Image Hints Don't Help (Surprisingly): Contrary to expectations, visual hints did not improve LLM performance and, in some cases, even degraded it. This is surprising given LLMs' demonstrated image comprehension abilities in other contexts.
  • Fine-tuning Boosts Performance: Fine-tuning LLMs on path planning data leads to more consistent and efficient solutions, particularly improving optimality.
  • LLM Planning Tendencies Differ: The study observed distinct planning styles among LLMs, with Gemini and Claude tending towards orthogonal paths, while GPT-4o was more prone to diagonal movements.

Key Results

  • Moderate Problems Solved: With collision hints, LLMs achieved high success rates on easy and moderately difficult problems. For instance, Claude 3.5 Sonnet consistently achieved a 90% success rate with collision hints.
  • Hard Problems Struggle: For the hardest problems (e.g., Maze, Scots), LLMs rarely succeeded, even with comprehensive hints. Claude solved Scots only once in 10 attempts.
  • Random Problem Performance: Claude achieved over 90% success on random problems with up to three obstacles but dropped to 25% with four or more.
  • Combined Hints Improve: Combining collision, free space, and correct prefix hints generally led to better performance across most handcrafted problems, with correct prefix hints being particularly useful for refining solutions.
  • Fine-tuning Impact: Fine-tuned GPT-4o showed improved performance, especially on the Diagonal Wall problem, and generated generally shorter paths.

Limitations and Future Work

  • Dynamic Constraints: The current framework does not account for path dynamic feasibility (e.g., turning radius constraints), which is a significant limitation for real-world robotic applications. The authors note that LLMs struggle even without these constraints, but future work should incorporate them.
  • Agent Geometry: Similar to dynamic constraints, the geometry of the agent itself is not considered.
  • Real-World Data Integration: The authors conjecture that attaching planning problems to real-world data (e.g., using place names instead of abstract descriptions) could improve LLM performance. Future work could explore connecting planning problems with geographical data and realistic maps.
  • Exploring Other Hinting Strategies: The paper suggests exploring additional prompting and fine-tuning strategies, such as breaking down reasoning steps, identifying symmetries, and building in linear constraint checks.

Summary updated

Abstract

Large Language Models (LLMs) have shown remarkable capabilities in natural language processing, mathematical problem solving, and tasks related to program synthesis. However, their effectiveness in long-term planning and higher-order reasoning has been noted to be limited and fragile. This paper explores an approach for enhancing LLM performance in solving a classical robotic planning task by integrating solver-generated feedback. We explore four different strategies for providing feedback, including visual feedback, we utilize fine-tuning, and we evaluate the performance of three different LLMs across a 10 standard and 100 more randomly generated planning problems. Our results suggest that the solver-generated feedback improves the LLM's ability to solve the moderately difficult problems, but the harder problems still remain out of reach. The study provides detailed analysis of the effects of the different hinting strategies and the different planning tendencies of the evaluated LLMs.
BibTeX
@misc{wu2024can,
  author = {Erik Wu and Sayan Mitra},
  title = {{Can LLMs plan paths with extra hints from solvers?}},
  year = {2024},
  eprint = {2410.05045},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.05045},
}
Figure