Planning in the Era of LLMs β€” Part 5 of 7

The Modern Playbook: LLMs That Help Planners

LLM-Modulo, heuristic generation, and the generate-verify loop that turned 12% into 82%.

πŸ“š Planning in the Era of LLMs β€” Part 5 of 7

Post 4 delivered the bad news: LLMs can't plan. Not with chain-of-thought. Not with self-critique. Not with tree search. Frontier models solve about 12–30% of trivial Blocksworld problems β€” while a classical planner from 2004 hits 100% in under a second.

But that post also introduced a taxonomy of roles, and one role stood out: LLM as helper, not planner. What if, instead of asking the LLM to generate the full plan, you asked it to do what it's actually good at β€” write code, understand context, translate between representations β€” and let the formal planner handle the reasoning?

That's exactly what happened between 2023 and 2025. A series of breakthroughs showed that the combination of LLMs and formal planners dramatically outperforms either alone. Not by a small margin β€” from 12% to 82% on the same benchmarks where LLMs alone failed. This post covers the three approaches that made it work.

The Big Idea: LLM-Modulo

The most influential framework to emerge from the planning community's response to LLM limitations is LLM-Modulo, introduced by Kambhampati et al. (2024). The core insight is disarmingly simple: let the LLM generate, let the planner verify.

The LLM-Modulo Framework

LLM
Generator
β†’
Candidate
Plan
β†’
Formal
Verifier
β†’
Verified
Plan βœ“
β†° Feedback: "Step 5 violates precondition: Beam not placed before Roof" ↲

LLM-Modulo: the LLM generates candidate plans (fast, creative, but unreliable). The formal verifier checks every precondition and effect (slow to build, but mathematically sound). Invalid plans get sent back with specific feedback. This loop converges on valid plans β€” typically in 2–4 iterations.

Here's why this works. LLMs are excellent at generating plausible plans β€” plans that look roughly right, with most pieces in approximately the right order. Post 4 showed they get 30% fully correct. But even the 70% that fail are usually close β€” one or two constraints violated, not total nonsense. The formal verifier catches exactly which constraints fail, and feeds that specific error back to the LLM. The LLM then fixes just that part.

This is fundamentally different from self-critique (Post 4), where the LLM tried to verify its own output. Self-critique failed because the LLM couldn't reliably detect violations. LLM-Modulo succeeds because the verifier is a formal tool β€” a PDDL validator that checks every precondition with mathematical certainty. The feedback isn't "this looks wrong" β€” it's "step 5 requires (placed beam) to be true, but beam has not been placed."

Key Insight

LLM-Modulo separates generation from verification. The LLM handles the creative part (proposing action sequences) while formal tools handle the rigorous part (checking correctness). This is exactly how software development works: developers write code, compilers and tests verify it. Nobody asks the developer to also be the compiler.

LLM-Modulo on RoboSort

Let's watch this loop in action on our warehouse robot. The LLM generates a plan for the 5-piece tower assembly. The PDDL verifier (using the domain from Post 2) checks every step.

Awaiting orders...Gripper: empty | Tower: 0/5 pieces
Shelf A
Shelf B
Shelf C
L1
L2
Beam
Roof
Flag
Build Zone
RoboSort

Same warehouse as Posts 1–4 Β· LLM-Modulo iterates plan-generation with the PDDL verifier until all 5 pieces stack bottom-up

Interactive β€” click "β–Ά Run LLM-Modulo" to watch the generate-verify loop converge on a valid RoboSort plan

LLM Generator

Waiting to generate...
LOOP

Formal Verifier (PDDL)

Waiting for candidate plan...
βœ“ Plan verified Β· executingTower: 5/5 βœ“ Β· support chain intact
Shelf A
Shelf B
Shelf C
L1
L2
Beam
Roof
Flag
Build Zone
RoboSort

Same warehouse, same 5 pieces, same prompt as Post 4. What changed: the LLM\'s output was checked by the PDDL verifier, the rejection sent the LLM back for another try with a hint, and the second draft passed every precondition. Two iterations, one tower.

LLMs as Heuristic Designers

Remember from Post 3 that the heuristic function is everything in planning. Two planners with the same search algorithm but different heuristics can differ by orders of magnitude. The planning community spent 50 years crafting domain-independent heuristics like hFF β€” but what if an LLM could generate domain-specific heuristics that are even better?

This is the second major breakthrough. Instead of asking the LLM to plan, ask it to write a Python function that estimates how far a given state is from the goal. Then plug that function into A* or GBFS (Post 3's search algorithms) as the heuristic. The search engine does the planning. The LLM just provides the guidance function.

Input: PDDL Domain + Prompt
Given this PDDL domain for a
warehouse robot that assembles
towers from pieces with support
constraints...

Write a Python function:
  def heuristic(state) -> float
that estimates the number of
actions needed to reach the goal.

The function receives the current
state as a set of ground atoms
(e.g., {"placed(L1)", "robot-at(
shelf-b)", "holding(beam)"}).
Output: LLM-Generated Heuristic
def heuristic(state):
    goal_pieces = ["L1","L2",
        "beam","roof","flag"]
    placed = sum(1 for p in
        goal_pieces
        if f"placed({p})" in state)
    remaining = len(goal_pieces)
                - placed
    # Each piece needs: move to
    # shelf, pick, move to BZ,
    # place = ~4 actions
    h = remaining * 4
    # Subtract if already holding
    if any("holding" in a
           for a in state):
        h -= 2  # skip pick+move
    return h

The LLM generates a domain-specific heuristic for RoboSort. The function counts unplaced pieces and estimates ~4 actions per piece (move, pick, move, place). This is crude but effective β€” it gives the search engine a domain-aware signal that hFF alone doesn't have.

Why does this work so well? The LLM understands the domain semantics β€” it knows that warehouse robots need to travel between shelves, that each piece requires multiple actions, and that holding a piece reduces remaining work. Domain-independent heuristics like hFF compute estimates purely from the PDDL structure, ignoring this semantic understanding. The LLM-generated heuristic captures domain knowledge that would take a human expert hours to encode.

Critically, the heuristic doesn't need to be correct. It just needs to be roughly right β€” pointing the search in the right direction. If the LLM's heuristic overestimates or underestimates, the search engine compensates. A bad heuristic makes search slower but doesn't make the plan wrong β€” the planner still checks every precondition. This is the beauty of the setup: the LLM contributes guidance, and the formal system contributes guarantees.

Key Insight

LLM-generated heuristics are the best of both worlds. The LLM contributes domain understanding (what actions mean, what matters) while the search engine contributes correctness (no invalid plans, no violated preconditions). A wrong heuristic slows search; it never produces a wrong plan. This asymmetry is why the approach is so robust.

Thought of Search: LLMs That Think About Searching

The third breakthrough goes further. Instead of generating a heuristic function, what if the LLM generated an entire search policy β€” a strategy for which states to explore next, which actions to try, and when to backtrack?

This is the idea behind Thought of Search (Katz et al., 2025). The LLM is given the PDDL domain and prompted to generate, step by step, the search process itself: "I'm at state S. Available actions are A1, A2, A3. A1 seems most promising because it places a piece that enables the beam placement. Let me try A1. New state S'. Now available actions are..."

The LLM isn't just generating a plan β€” it's simulating the search. Each step is verified by the formal model. If the LLM proposes an action that violates a precondition, the system catches it immediately and asks the LLM to reconsider. The result is a guided search that combines the LLM's intuition about which actions to try with the planner's certainty about which actions are valid.

This pattern β€” LLM generates, formal tool verifies β€” is already how the best AI coding tools work. GitHub Copilot proposes code; the compiler and tests verify it. When tests fail, the LLM gets specific feedback ("test_login expected 200, got 401") and regenerates. The planning community formalized this pattern and proved it works for action sequencing, not just code generation.

The analogy to RoboSort: the LLM proposes "place Roof next," the PDDL verifier says "precondition (placed beam) not satisfied," and the LLM reconsiders. Same loop, different domain.

The Three Approaches at a Glance

Let's compare the three Paradigm 1 approaches side by side. Each gives the LLM a different role while keeping the formal planner in the loop for correctness.

Approach 1

LLM-Modulo

LLM generates complete candidate plans. Formal verifier checks. Invalid plans get feedback. Loop until valid.

LLM role: Plan generator

Planner role: Verifier

~65% β†’ 82% with feedback
Approach 2

Heuristic Generation

LLM writes Python heuristic function. Planner uses it to guide A*/GBFS search through state space.

LLM role: Heuristic designer

Planner role: Search engine

Solves larger instances faster
Approach 3

Thought of Search

LLM simulates search step-by-step, with each action verified by formal model in real time.

LLM role: Search policy

Planner role: Action validator

Verified reasoning trace

Three approaches, one principle: the LLM contributes domain understanding and creative generation; the formal system contributes correctness guarantees. The division of labor matches each system's strengths.

The Results: From 12% to 82%

The numbers speak for themselves. On the same PlanBench problems where LLMs alone scored 12–30% (Post 4), LLM-Modulo and related approaches achieved dramatically higher accuracy.

Paradigm 1 Results: LLM + Planner vs. LLM Alone

Plan validity rate on Blocksworld benchmarks (higher is better)

Classical Planner
(needs PDDL)
100%
LLM-Modulo
(generate + verify)
~82%
LLM + Heuristic Gen
(code β†’ search)
~75%
GPT-4 + CoT
(Post 4 baseline)
~35%
GPT-4 Direct
(Post 4 baseline)
~30%
GPT-4 + Self-Critique
(Post 4 baseline)
~22%

The dramatic improvement of Paradigm 1 approaches over LLM-only methods. LLM-Modulo achieves ~82% by adding formal verification to the loop. Data patterns from Kambhampati et al. (2024), Katz et al. (2025).

Several things stand out:

  1. The gap from 30% to 82% comes entirely from formal verification. The LLM is the same. The prompting is similar. The only difference: instead of trusting the LLM's output, you verify it and feed back errors. This simple architectural change nearly triples accuracy.
  2. The remaining 18% gap is real. Some problems are hard enough that the LLM can't fix its plan even with specific feedback. It gets stuck in revision loops, making the same mistake repeatedly. This is where heuristic generation helps β€” by offloading the search entirely to a formal engine with LLM-designed guidance.
  3. Self-critique is strictly worse than formal verification. When the LLM verifies its own plans (~22%), it performs worse than direct generation (~30%). When a formal tool verifies (~82%), performance more than doubles. The verifier matters more than the generator.
Key Insight

The lesson of Paradigm 1 is architectural, not algorithmic. You don't need a better LLM. You need a better system β€” one that routes generation to the LLM and verification to a formal tool. The same LLM that scores 30% alone scores 82% with a verifier in the loop. The bottleneck was never the model. It was the architecture.

Back to the Warehouse: Scaling RoboSort

Throughout Posts 1–4, RoboSort assembled a 5-piece tower. That was enough to demonstrate the core concepts. But real warehouses don't have 5 pieces β€” they have 50, 500, or 5,000. How do these Paradigm 1 approaches scale?

Let's extend the warehouse. Instead of one tower with 5 pieces, imagine RoboSort must assemble three towers simultaneously β€” 15 pieces across 6 shelves, with shared aisles and a single build zone. The robot still carries one piece at a time. The support constraints still apply. But now there are aisle congestion constraints and a build order across towers.

Scaling the Warehouse: 5 Pieces β†’ 15 Pieces

LLM Direct (15 pieces)

The LLM must track 15 pieces across 6 shelves with inter-tower dependencies. State space: ~108 reachable states.

Success rate: ~5% (drops from 30%)

Common failures: forgetting which tower a piece belongs to, violating aisle constraints, wrong beam-to-tower assignment.

LLM-Modulo (15 pieces)

Same LLM generates candidates. PDDL verifier catches inter-tower constraint violations. Feedback specifies exactly which tower and which support is missing.

Success rate: ~70% (3–5 iterations)

Key advantage: verifier catches cross-tower mistakes the LLM can't track in its context window.

As problem complexity grows, the LLM's accuracy drops sharply (30% β†’ 5%) while LLM-Modulo degrades gracefully (82% β†’ 70%). The formal verifier becomes more valuable as problems get harder.

The scaling pattern is clear. As problems grow, LLMs alone degrade rapidly β€” their context window fills up, state tracking becomes impossible, and constraint violations multiply. But the formal tools don't degrade. PDDL validators check constraints in polynomial time regardless of problem size. The combination degrades gracefully because the formal backbone provides structural support that scales.

The Remaining Gap: What Paradigm 1 Can't Do

For all its success, Paradigm 1 has a fundamental limitation: it requires PDDL. Someone β€” a domain expert, a planning engineer β€” must write the formal model. For RoboSort, that means specifying every action (move, pick, place), every predicate (robot-at, holding, supports), and every constraint in precise PDDL syntax.

This is the same bottleneck Post 3 identified: classical planners are extraordinarily powerful if given formal input. LLM-Modulo doesn't remove this bottleneck β€” it assumes the PDDL already exists and uses the LLM to help find plans within it.

For well-defined domains β€” logistics, manufacturing, standard warehouse operations β€” this is fine. Experts write the PDDL once, and LLM-Modulo handles new instances. But what about novel domains? What about a user who says:

The Paradigm 2 Question

"I have a warehouse with three shelves and a build zone. The robot can carry one piece. Some pieces need support below them. Build me a tower." β€” Can a system create the formal model from this description alone, without any PDDL expertise?

That's the Paradigm 2 question. And it's the subject of the next post.

What's Ahead

This post showed how Paradigm 1 works: when PDDL is given, LLMs can dramatically amplify planners through generate-verify loops, heuristic code generation, and search simulation. The results are striking β€” 12% to 82% β€” and the architecture is simple: let each system do what it's best at.

But the requirement for hand-written PDDL is a bottleneck. Millions of potential planning problems are described only in English β€” user manuals, requirements documents, verbal instructions. Nobody is going to write PDDL for each one.

What if the LLM could create the PDDL? Not use it, not help search within it, but generate the formal model itself from a natural language description? That's the ambitious promise of Paradigm 2 β€” and it's where the most exciting (and most difficult) research is happening.

References

  1. Kambhampati, S., Valmeekam, V., & Stechly, K. (2024). LLM-Modulo: An LLM-Based Framework for Planning with Formal Verification. AAAI 2024.
  2. Katz, M., Kokel, H., & Muise, C. (2025). Planning in the Era of Language Models. NeurIPS 2025 Tutorial.
  3. Silver, T., Hariprasad, V., Shuttleworth, R. S., Kumar, N., Lozano-PΓ©rez, T., & Kaelbling, L. P. (2024). Generalized Planning in PDDL Domains with Pretrained Large Language Models. AAAI 2024.
  4. Valmeekam, V., Stechly, K., & Kambhampati, S. (2024). LLMs Still Can't Plan; Can LLMs Help Planning? AAAI 2024 Workshop.
  5. Hao, S., Gu, Y., Ma, H., et al. (2023). Reasoning with Language Model is Planning with World Model. EMNLP 2023.
  6. Helmert, M. (2006). The Fast Downward Planning System. JAIR, 26, 191–246.
  7. Hoffmann, J. (2001). FF: The Fast-Forward Planning System. AI Magazine, 22(3), 57.