Skip to main content
Back

Sapienza's ContextMatters Beats Robot Planning SOTA by 52% on Blocked Tasks

ContextMatters fuses LLMs with classical PDDL planning to let robots adapt their goals when the environment makes the original task impossible, achieving a +52% success rate over prior art.

Pro

Paper, Full Access
  • ContextMatters is a new robot planning framework that adapts goals when the environment makes the original task impossible, instead of simply failing.
  • It combines LLM commonsense reasoning with formal PDDL planning via two operators: situational shifting (fix the domain model) and goal relaxation (weaken the goal).
  • Achieves 91.73% success rate with grounding checks vs. 39.28% for prior SOTA (DELTA), a +52.45% improvement.
  • Validated on a real TIAGo robot doing a food-serving task where goal shifting replaced an unavailable snack with a contextually appropriate cola can.
  • Introduces a new 141-task benchmark across 10 environments, including tasks designed to be intrinsically impossible as stated.
  • Code, dataset, and supplementary materials are publicly available.

When a robot is asked to "set the table with two forks" and the drawer is blocked, a classical planner simply gives up. An LLM-only planner hallucinates a sequence that assumes the drawer is open. Neither approach asks the obvious follow-up question: what can we actually do here? A new framework from Sapienza University of Rome called ContextMatters is built around exactly that question, and the results are hard to ignore.

The planning gap that nobody solved

Task planning for embodied robots sits at an uncomfortable intersection. Classical planning (e.g., PDDL) offers structure and guarantees, but in practice it fails under noisy perception and incorrect predicate grounding. PDDL -- the Planning Domain Definition Language -- is a formal way to describe what a robot can do, what the world looks like, and what goal it needs to reach. The problem is that real environments are messy: objects are missing, blocked, or misidentified by sensors. When any precondition fails, PDDL returns no plan at all.

LLM-based planners leverage commonsense reasoning, yet frequently propose actions that are unfeasible or unsafe. They'll confidently tell the robot to open a drawer that the scene graph shows is blocked. This often results in heavily hard-coded behaviors that struggle to adapt, even with scenarios where goals can be achieved through relaxed planning. The field has been stuck between two failure modes: rigid correctness and flexible hallucination.

Bidimensional relaxation: shifting and loosening at the same time

ContextMatters fuses LLMs and classical planning to perform hierarchical goal relaxation: the LLM helps ground symbols to the scene and, when the target is unreachable, it proposes functionally equivalent goals that progressively relax constraints, adapting the goal to the context of the agent's environment. The key insight is to treat planning failure not as a dead end, but as a signal to explore nearby goals.

Hierarchical goal relaxation diagram showing 3D scene graph, goal relaxation hierarchy, and final executable robot plan

The framework introduces two operators that work together:

  • Situational Shift (domain adaptation): The LLM re-examines the 3D Scene Graph -- a structured graph where nodes are objects with attributes and edges are spatial/semantic relationships -- and rewrites the planning domain to better match what's actually in the scene. This fixes grounding mismatches without touching the goal itself.
  • Goal Relaxation: If domain adaptation still can't produce a valid plan, the LLM proposes a semantically weaker version of the original goal. "Set the table with two forks" might relax to "set the table with two pieces of cutlery", then to "set the table with available utensils".

These two operators form a 2D search space the paper calls a relaxation graph. The system traverses it by first trying to fix the domain representation (horizontal moves), and only loosening the goal (vertical moves) when domain fixes are exhausted. The result is the most conservative adaptation that still produces an executable plan.

How it works, step by step

Architecture diagram showing domain generation, problem generation, symbolic planner, validator, and plan grounding check components

The pipeline runs as two nested loops:

  1. Domain generation: An LLM reads the 3D Scene Graph and the natural language goal, then generates a PDDL domain file describing object types, predicates, and action schemas.
  2. Problem generation and refinement: The LLM generates a PDDL problem instance. If the planner fails, a symbolic validator (VAL) produces natural language feedback about what went wrong. The LLM then reasons about the failure in a chain-of-thought step before rewriting the problem. This inner loop repeats until a plan is found or a limit is hit.
  3. Grounding check: A successful plan is virtually executed against the 3D Scene Graph using PDDLGym to verify that every object referenced in the plan actually exists in the scene. Plans that hallucinate objects are rejected and their errors fed back into the loop.
  4. Goal shift and relaxation: If the inner loop fails, the outer loop fires. The LLM first proposes alternative objects that could serve the same function (goal shifting), then optionally weakens the goal's constraints (goal relaxation). The whole process restarts with the new goal.

The grounding check is a particularly important detail. Prior work like DELTA -- the previous state-of-the-art -- falls short when domain environments are incompletely modeled or impractical to align directly with plan executions. ContextMatters closes this loop by making hallucination detection a first-class citizen of the planning cycle.

Benchmarks and what they show

The team built a new dataset of 141 tasks across 10 multi-room environments from the Gibson dataset, spanning six task types: House Cleaning, PC Assembly, Dining Table Setup, Home Office Setup, Laundry, and a General pick-and-place benchmark. This is nearly 10x the scale of DELTA's evaluation (15 tasks in 4 environments). Crucially, a subset of tasks are designed to be intrinsically impossible as stated -- key objects are removed and semantically related substitutes are planted instead, forcing the system to actually relax.

All experiments used GPT-4o with temperature 0. The results against four baselines:

MethodSR % (Planning + Grounding)SR % (Planning only)Avg. Plan Length
ContextMatters w/ Relaxation (ours)91.7399.0217.61
ContextMatters w/o Relaxation66.9488.1515.72
DELTA (prior SOTA)39.2865.7623.52
LLMAsPlanner--71.221.6
SayPlan--46.019.6

Experimental results show a +52.45% Success Rate improvement over state-of-the-art LLMs+PDDL baselines. The per-task breakdown shows perfect 100% success on House Cleaning, PC Assembly, and Dining Table Setup, with 93.55% on the General benchmark and 83.33% on Laundry -- the hardest domain due to complex object state modeling.

It runs on a real robot

The team validated the execution of ContextMatters in a real-world scenario by deploying it on a TIAGo robot. The robot was given the task "Bring 4 kid snacks to table_2". Only three snacks were available in the environment, so goal shifting replaced one snack with a cola can -- the LLM correctly reasoned that wine bottles would be inappropriate for children -- and the robot successfully moved all four items. The 3D Scene Graph was built in real time from RGB-D images using semantic segmentation, making the full pipeline perception-to-execution.

Where it still struggles

The framework has real limitations worth knowing:

  • Inherently impossible goals: The paper acknowledges inherent limitations, particularly regarding unfeasible task identification where LLMs may attempt exhaustive solvation -- burning through iterations on goals that can never be satisfied.
  • Planning time: The iterative refinement loop adds latency. Complex tasks like Dining Table Setup average 53 seconds of planning time and 89 seconds of LLM inference. This is not a real-time system.
  • GPT-4o dependency: All experiments use a proprietary model. Performance with smaller or open-weight models is untested.
  • Static scene assumption: The 3D Scene Graph is built once before planning. Dynamic changes during execution (an object being moved mid-task) are not handled.

The real breakthrough

The deeper contribution here is conceptual. Previous hybrid LLM+PDDL systems treated the goal as sacred and the environment as the only variable to fix. ContextMatters formalizes goal mutation as a first-class planning operation with a mathematically defined relaxation preorder -- a partial ordering over goals from most specific to most general. Goal relaxation provides a hierarchical mechanism to reduce constraints, ensuring functionally equivalent but more contextually feasible goals. This turns "no plan exists" from a terminal failure into a navigable search problem.

For teams building robot task planners, home automation agents, or any embodied AI system that needs to operate in environments it doesn't fully control, code, dataset, and supplementary materials are available to the community at the project page. The dataset of 141 relaxation-prone tasks is itself a contribution -- there's been no standard benchmark for testing graceful goal degradation until now.