[Paper Review] CAPE: Corrective Actions from Precondition Errors using Large Language Models
CAPE is a re-prompting framework that uses precondition error feedback to guide large language models (LLMs) in generating corrective actions for failed actions during task planning. By injecting failure context via templated prompts, CAPE improves plan executability and correctness, achieving 49.63% plan correctness in VirtualHome and 76.49% improvement over SayCan on a Boston Dynamics Spot robot.
Extracting commonsense knowledge from a large language model (LLM) offers a path to designing intelligent robots. Existing approaches that leverage LLMs for planning are unable to recover when an action fails and often resort to retrying failed actions, without resolving the error's underlying cause. We propose a novel approach (CAPE) that attempts to propose corrective actions to resolve precondition errors during planning. CAPE improves the quality of generated plans by leveraging few-shot reasoning from action preconditions. Our approach enables embodied agents to execute more tasks than baseline methods while ensuring semantic correctness and minimizing re-prompting. In VirtualHome, CAPE generates executable plans while improving a human-annotated plan correctness metric from 28.89% to 49.63% over SayCan. Our improvements transfer to a Boston Dynamics Spot robot initialized with a set of skills (specified in language) and associated preconditions, where CAPE improves the correctness metric of the executed task plans by 76.49% compared to SayCan. Our approach enables the robot to follow natural language commands and robustly recover from failures, which baseline approaches largely cannot resolve or address inefficiently.
Motivation & Objective
- Address the lack of failure recovery in LLM-based planning, where agents often retry failed actions without resolving root causes.
- Enable embodied agents to autonomously correct precondition violations during task execution using LLMs.
- Reduce reliance on exhaustive skill search by focusing corrective reasoning on specific precondition errors.
- Improve plan executability and semantic correctness in both simulated and real-world robotic environments.
- Minimize re-prompting and computational cost compared to baseline methods like SayCan, especially in large skill repertoire settings.
Proposed method
- Introduce a re-prompting strategy called CAPE that uses templated prompts to inject precondition error information into LLMs when action execution fails.
- Leverage few-shot in-context learning with semantically similar demonstration tasks to guide the LLM in generating corrective actions.
- Use a two-stage pipeline: first, a Planning LLM generates a free-form action sequence; second, a Translation LLM maps these to executable actions from the agent’s skill repertoire.
- Inject feedback from failed actions—specifically, the violated precondition—into the prompt to guide the LLM toward corrective actions.
- Support both small and large skill repertoires by adapting the re-prompting method based on available domain knowledge and feedback granularity.
- Optimize for efficiency by avoiding full skill space iteration, reducing time complexity from O(|s|^n) (SayCan) to O(n).
Experimental results
Research questions
- RQ1Can LLMs generate semantically correct corrective actions when given precondition error feedback during planning?
- RQ2How does injecting precondition error information improve plan executability and correctness compared to baseline LLM planning methods?
- RQ3To what extent does CAPE reduce the need for re-prompting and computational overhead in large skill repertoire settings?
- RQ4Can CAPE generalize across both simulated environments and real-world robotic systems with minimal domain-specific tuning?
- RQ5Does CAPE outperform oracle-based methods like SayCan in correctness and efficiency despite not having access to full affordance models?
Key findings
- CAPE improved the human-annotated plan correctness metric from 28.89% to 49.63% in the VirtualHome simulation environment compared to SayCan.
- On a Boston Dynamics Spot robot, CAPE achieved a 76.49% absolute improvement in plan correctness over SayCan, despite SayCan operating in an oracle setting.
- CAPE achieved 100% executability in robot demonstrations when using explicit cause and few-shot prompting, outperforming all baselines.
- The method reduced time complexity from O(|s|^n) (SayCan) to O(n), significantly improving scalability in environments with large skill repertoires.
- CAPE generated more semantically correct plans with fewer precondition errors, even when the LLM had no access to visual feedback or full affordance models.
- Inter-annotator agreement for correctness was moderate (Fleiss’ Kappa), except for the re-sampling baseline, where annotators unanimously rejected the plans as non-executable.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.