Workshop 2: Prompt Engineering LeRobot

Turning Human Intent into Machine Action

What We'll Cover

Why Prompting?

Our robot uses a model called SmolVLA. It combines:

  • Vision: What the robot sees from its cameras.
  • Language: Your text instruction (the prompt).
  • Action: The robot's movement.

Your prompt provides the critical context for which action to choose.

Meet SmolVLA

Source: huggingface.co/blog/smolvla

  • A compact (450M), open-source VLA model.
  • Trained on community-shared datasets.
  • Designed for efficiency on consumer hardware.
  • Uses an asynchronous inference stack for faster, more responsive actions.

The Three Keys to a Good Prompt

1. Be Specific

Name the target object precisely.
Instead of "the block", use "the small red lego block".

2. Be Clear

Use simple, direct language. Avoid ambiguity.
Instead of "deal with it", use "pick it up".

3. Be Actionable

Use verbs that describe physical movements.
Good verbs: "push", "pick up", "place", "move to", "slide".

Example 1: Object Specificity

Task: Move a red cube into a blue bowl. A yellow ring is also on the table.

Bad Prompt

"put the block in the bowl"

Which block? Which bowl? The robot might get confused.

Good Prompt

"pick up the red cube and place it inside the blue bowl"

Unambiguous, specific, and uses clear action verbs.

Example 2: Action & Goal Clarity

Task: Move a can to the right side of the workspace.

Bad Prompt

"move the can"

Move it where? How? This lacks a clear goal state.

Good Prompt

"push the soda can to the right side of the table"

Specifies the action ("push") and a clear destination.

Advanced: Chain-of-Thought

For complex, multi-step tasks, giving a sequence of simpler instructions can improve performance.

Task: Pick up a block, and then wave.

Chained Prompts:

  1. `"pick up the green block"` (Wait for completion)
  2. `"wave your gripper from left to right"` (Execute second instruction)

Live Demo Time!

We will now control a robot in real-time to see how different prompts affect its behavior.

Let's Practice Writing Prompts

Task Description: "A toy car is on its side. Put it back on its wheels."

Discuss: What would be a good prompt? A bad one?

Example Good Prompt:
"flip the blue toy car upright so it rests on its wheels"

How This Applies to the Hackathon

Q&A

Any questions about prompt engineering?