[Paper Review] Errors are Useful Prompts: Instruction Guided Task Programming with Verifier-Assisted Iterative Prompting
CLAIRify uses verifier-assisted iterative prompting to generate syntactically valid domain-specific task plans from natural language, outperforming baselines and enabling real robot execution.
Generating low-level robot task plans from high-level natural language instructions remains a challenging problem. Although large language models have shown promising results in generating plans, the accuracy of the output remains unverified. Furthermore, the lack of domain-specific language data poses a limitation on the applicability of these models. In this paper, we propose CLAIRIFY, a novel approach that combines automatic iterative prompting with program verification to ensure programs written in data-scarce domain-specific language are syntactically valid and incorporate environment constraints. Our approach provides effective guidance to the language model on generating structured-like task plans by incorporating any errors as feedback, while the verifier ensures the syntactic accuracy of the generated plans. We demonstrate the effectiveness of CLAIRIFY in planning chemistry experiments by achieving state-of-the-art results. We also show that the generated plans can be executed on a real robot by integrating them with a task and motion planner.
Motivation & Objective
- Address lack of task-plan verification for LLM-generated plans in domain-specific languages (DSLs).
- Mitigate data scarcity for DSLs by leveraging in-context learning with language descriptions of the target DSL.
- Ensure syntactic validity and environment-constraint compliance of generated plans.
- Demonstrate execution of generated plans via integration with a task and motion planner (TAMP).
- Show superior performance over prior XDL generation methods on chemistry datasets.
Proposed method
- Provide a description of the target DSL to an LLM in zero-shot prompts.
- Iteratively generate structured-language-like outputs and verify them with a rule-based verifier.
- Feed syntax/constraint errors back into the LLM to修orrect in subsequent iterations.
- Incorporate environment constraints into the prompt and verifier to prune infeasible plans.
- Translate verified DSL plans to low-level actions using a TAMP framework for robot execution.
- Demonstrate results on chemistry description language (XDL) and real robot experiments.

Experimental results
Research questions
- RQ1Can automated iterative prompting improve zero-shot generation of DSL task plans?
- RQ2Does verifier-guided iteration yield syntactically correct and executable DSL programs more effectively than baselines?
- RQ3Can generated DSL plans be executed by a real robot when integrated with a TAMP framework?
- RQ4How does incorporating environment constraints affect plan validity and feasibility?
Key findings
- CLAIRify achieved 105/108 successful XDL plan generations on Chem-RnD vs 92/108 for SynthReader.
- CLAIRify achieved 40/40 successful XDL plan generations on Chem-EDU vs 0/40 for SynthReader.
- Experts preferred CLAIRify plans over SynthReader 75/108 times on Chem-RnD (vs 13/108 for SynthReader).
- Verifier interactions per experiment averaged 2.58 in Chem-RnD and 1.15 in Chem-EDU, indicating effective feedback loops.
- CLAIRify plans could be executed by a robot when integrated with a TAMP framework in real-world experiments (color-change and lemonade tasks).
- Error analyses show CLAIRify reduces missing actions relative to baseline but introduces other action and parameter errors that can be mitigated with richer domain knowledge.

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.