Abstract
Recently, Large Language Models (LLMs) have achieved remarkable success using in-context learning (ICL) in the language domain. However, leveraging the ICL capabilities within LLMs to directly predict robot actions remains largely unexplored. In this paper, we introduce RoboPrompt, a framework that enables off-the-shelf text-only LLMs to directly predict robot actions through ICL without training. Our approach first heuristically identifies keyframes that capture important moments from an episode. Next, we extract end-effector actions from these keyframes as well as the estimated initial object poses, and both are converted into textual descriptions. Finally, we construct a structured template to form ICL demonstrations from these textual descriptions and a task instruction. This enables an LLM to directly predict robot actions at test time. Through extensive experiments and analysis, RoboPrompt shows stronger performance over zero-shot and ICL baselines in simulated and real-world settings.
1. Introduction
Traditional robot learning often requires massive datasets and expensive fine-tuning to map visual inputs to continuous motor controls. While Large Language Models (LLMs) have shown incredible reasoning skills, they are fundamentally text-based. Bridging the gap between "text-only" reasoning and "continuous-space" robotic action usually involves using the LLM as a high-level planner that calls pre-defined scripts.
The challenge addressed here is: Can an LLM directly predict low-level robot actions (6-DoF poses and gripper states) just by looking at a few text-based examples? To do this, RoboPrompt addresses the issues of high-dimensional data noise, the "tokenization" of continuous physical coordinates, and the limited context window of LLMs.
2. The RoboPrompt Framework
RoboPrompt utilizes a three-step pipeline to translate robotic episodes into a language the LLM understands:
2.1 Identify Keyframes
Instead of feeding the LLM every frame of a video, which is noisy and redundant, RoboPrompt heuristically identifies "critical moments." These are frames where the robot's joint velocity is near zero or the gripper changes state (opening/closing). This compresses an episode from 200+ frames down to just 5–15, making it suitable for the LLM's context window.
2.2 Estimate Poses and Extract Actions
The system uses off-the-shelf vision models (like FoundationPose and GroundingDINO) to detect objects and estimate their 6-DoF poses. Crucially, it discretizes these continuous coordinates into text tokens (e.g., 100 bins for translation, 72 bins for rotation). LLMs struggle with floating-point numbers but excel at patterns in discrete tokens.
2.3 Create ICL Prompt
These discretized poses and actions are formatted into a structured text template. The prompt includes a few "demonstrations" (Input: Object Poses + Instruction -> Output: Sequence of Actions) followed by the current test observation. The LLM then predicts the next sequence of actions autoregressively.
3. Experimental Evaluation
The framework was evaluated on two main fronts:
- RLBench: A standard simulation environment where the authors tested 16 different tasks (e.g., "close jar," "sweep to dustpan," "meat off grill").
- Real-World Robot: Experiments conducted on a Franka Emika Panda robot arm across 6 tasks, including "stack cube," "unplug cable," and "close laptop."
3.1 Key Results
- Simulation (RLBench): RoboPrompt achieved an average success rate of 51.8%, significantly outperforming other ICL/Zero-shot baselines like VoxPoser (21.0%) and KAT (21.0%).
- Real-World: On the Franka Panda robot, RoboPrompt achieved a 90% success rate on simpler tasks like "stack cube" and "push button." Even on complex tasks like "unplug cable," it maintained a 50% success rate with only 10 examples.
- Competitive with Supervised Learning: While it didn't beat state-of-the-art supervised models trained on hundreds of episodes, it performed remarkably close to them without ever seeing a single gradient update.
4. Discussion and Key Insights
- Keyframes as "Visual Verbs": By focusing only on moments of interaction or direction changes, the prompt remains compact and high-signal, preventing the LLM from getting "lost" in the noise of a long trajectory.
- Emergent Composition: RoboPrompt could perform a "push multiple buttons" task in a specific order, even when the ICL demonstrations only showed the robot pushing single buttons. The LLM successfully composed these individual skills to follow a complex new instruction.
- Scaling with Examples: Robotic performance improved as the number of ICL examples increased, suggesting that LLMs apply the same pattern-matching logic to physics as they do to grammar.
5. Conclusion and Future Work
While RoboPrompt demonstrates the power of ICL for robotics, it has limitations. The current system is primarily open-loop, making it fragile if an object moves mid-task. Additionally, relying on API calls to massive LLMs introduces latency, and the geometric simplification of objects as single poses struggles with fine-grained shapes. Future directions include exploring closed-loop planning and incorporating more detailed shape information into text descriptions to handle more dexterous manipulations.
Summary updated