Code Models are Zero-shot Precondition Reasoners
Not on the map. Why?
Abstract (arXiv)
One of the fundamental skills required for an agent acting in an environment to complete tasks is the ability to understand what actions are plausible at any given point. This work explores a novel use of code representations to reason about action preconditions for sequential decision making tasks. Code representations offer the flexibility to model procedural activities and associated constraints as well as the ability to execute and verify constraint satisfaction. Leveraging code representations, we extract action preconditions from demonstration trajectories in a zero-shot manner using pre-trained code models. Given these extracted preconditions, we propose a precondition-aware action sampling strategy that ensures actions predicted by a policy are consistent with preconditions. We demonstrate that the proposed approach enhances the performance of few-shot policy learning approaches across task-oriented dialog and embodied textworld benchmarks.
Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Builds on 21 of its 26 references that are in the map. First posted on arXiv 16 Nov 2023.
Builds on
21 of 26 references.
References · 21
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
- 2022Do As I Can, Not As I Say: Grounding Language in Robotic Affordancescited by 2,302
- 2022Code as Policies: Language Model Programs for Embodied Controlcited by 1,172
- 2020ALFWorld: Aligning Text and Embodied Environments for Interactive Learningcited by 1,143
- 2022Inner Monologue: Embodied Reasoning through Planning with Language Modelscited by 1,057
- 2022Language Models as Zero-Shot Planners: Extracting Actionable Knowledge for Embodied Agentscited by 1,029
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
- 2022PAL: Program-aided Language Modelscited by 635
- 2022ProgPrompt: Generating Situated Robot Task Plans using Large Language Modelscited by 598
- 2023LLM+P: Empowering Large Language Models with Optimal Planning Proficiencycited by 496
- 2019Towards Scalable Multi-domain Conversational Agents: The Schema-Guided Dialogue Datasetcited by 426
9 more
- 2022Language Models of Code are Few-Shot Commonsense Learnerscited by 160
- 2022Mind's Eye: Grounded Language Model Reasoning through Simulationcited by 83
- 2018Hierarchical Reinforcement Learning for Zero-shot Generalization with Subtask Dependenciescited by 43
- 2021Language Models are Few-Shot Butlerscited by 27
- 2020Meta Reinforcement Learning with Autonomous Inference of Subtask Dependenciescited by 25
- 2023Causal Reasoning of Entities and Events in Procedural Textscited by 23
- 2022Few-shot Subgoal Planning with Language Modelscited by 22
- 2023Multimodal Subtask Graph Generation from Instructional Videoscited by 13
- 2023Unsupervised Task Graph Generation from Instructional Video Transcriptscited by 6
Built on by
Citing papers per year: 2024: 2; 2025: 0; 2026: 1.
3 papers.
- 2024On the Prospects of Incorporating Large Language Models (LLMs) in Automated Planning and Scheduling (APS)cited by 40
- 2024Towards Learning Foundation Models for Heuristic Functions to Solve Pathfinding Problemscited by 4
- 2026ADAPT: Benchmarking Commonsense Planning under Unspecified Affordance Constraintscited by 0
- 2026ADAPT: Benchmarking Commonsense Planning under Unspecified Affordance Constraints16 Apr 2026
- 2024Towards Learning Foundation Models for Heuristic Functions to Solve Pathfinding Problems1 Jun 2024
- 2024On the Prospects of Incorporating Large Language Models (LLMs) in Automated Planning and Scheduling (APS)4 Jan 2024