Introduction
Teaching a robot to cook involves more than just physical manipulation; it requires bridging the gap between underspecified natural language and precise logical execution. Cooking recipes are notoriously difficult for standard sequential planners because they rely on common sense and complex temporal constraints—such as performing one action until a condition is met or ensuring a prerequisite is satisfied.
Cook2LTL addresses these challenges by translating messy, natural language recipes into Linear Temporal Logic (LTL) formulae. By combining the reasoning capabilities of Large Language Models (LLMs) with a formal logic framework and an efficient caching system, the pipeline enables robots to follow complex instructions with high reliability.
System Architecture
The Cook2LTL pipeline consists of four integrated stages designed to move from raw text to executable robot logic.
1. Semantic Parsing
The system first employs a fine-tuned Named Entity Recognizer (NER) to segment recipe steps into salient categories: Verb, What?, Where?, How?, Temperature, and Time. This structured parsing identifies the core intent of each instruction step.
2. Action Reduction and the Action Library
A major hurdle in robotic planning is the "grounding gap" between high-level verbs (e.g., "boil") and the low-level primitive actions a robot can perform (e.g., pick_up(pot)). Cook2LTL uses an LLM (GPT-3.5-turbo) to decompose these high-level tasks into sequences of robot-executable primitives.
To minimize hallucinations and ensure consistency, the authors use a "pythonic" few-shot prompting style. The LLM is instructed to define tasks as functions using a constrained set of admissible actions. To optimize performance, the system implements an Action Library that caches these decompositions. Future requests for the same high-level action use the cached version, avoiding redundant and costly API calls.
3. LTL Translation
The final stage maps the resulting actions into LTL formulae. Unlike simple sequential lists, LTL allows the robot to understand temporal operators like "Finally" ($\mathcal{F}$) and "Until" ($\mathcal{U}$). This ensures the robot maintains the correct sequence and satisfies the recipe's specific conditions, such as "whisking until thick."
Key Results and Performance
The system was evaluated using a subset of the Recipe1M+ dataset and validated within the AI2-THOR 3D simulation environment.
Efficiency Gains
The introduction of the Action Library proved highly effective. Compared to a baseline that queries the LLM for every action, Cook2LTL achieved:
- 59% reduction in latency
- 42% reduction in total cost
- 51% reduction in API calls
Executability and Success
The system achieved a 94% executability rate, meaning the vast majority of generated plans were valid for the robot's environment. In simulation, the robot successfully executed multi-step tasks like "microwave the potato" and "refrigerate the apple," demonstrating that the LTL formulae effectively translate to successful robotic behavior.
Conclusion
Cook2LTL demonstrates that LLMs can be effectively used as "policy generators" to populate a local library of robot actions. By grounding these actions in formal Linear Temporal Logic, the system provides a robust and efficient path for robots to navigate the complexities of the kitchen. Future work will focus on incorporating real-time environment feedback to allow for dynamic error correction during execution.
Summary updated