Activity 12: Prompt Engineering with Dash Robots
Learning Clear Instructions through Block Coding and Robotics.
Description
Students will learn the fundamentals of prompt engineering through hands-on coding with Dash robots and Blockly. Prompt engineering involves creating well-structured instructions that effectively guide systems (like AI or robots) to produce desired outcomes. Students will practice giving both vague and specific instructions to their Dash robots using block coding, observing how the clarity and precision of their “prompts” (code blocks) directly affect the robot’s behavior. By comparing vague instructions (like “move”) with specific ones (like “move forward 30 cm at speed 50%”), students will understand why clear, detailed prompts are essential in technology and AI interactions.
Time Required
- Estimated Time: 1 Hour
Materials required
- Dash robots (1 per pair or small group)
- iPads/tablets with Blockly app installed
- Open space for robot movement
Steps to Conduct the Activity
Set-Up (5 minutes)
- Divide students into pairs or small groups of 3
- Distribute one Dash robot and one iPad/tablet per group
- Have students open the Blockly app and connect to their robot
- Designate a clear area for robot movement
Part 1: Understanding Vague vs. Specific Instructions (15 minutes)
Teacher demonstrates:
- Show a VAGUE block code example on screen:
- Single “Move” block with no parameters
- Ask: “What will the robot do? How far? How fast?”
- Show a SPECIFIC block code example:
- “Move forward 30 cm at 50% speed”
- Ask: “Now what will happen? Is this clearer?”
- Explain: Just like giving instructions to AI, giving instructions to robots requires clarity and detail!
Part 2: Vague Instructions Challenge (15 minutes)
Students work in roles within their group:
- Role 1 - Coder: One student creates a short program (3-5 blocks) with intentionally vague or minimal instructions
- Examples:
- “Move” without direction or distance
- “Turn” without specifying degrees
- “Make sound” without choosing which sound
- Examples:
- Role 2 - Predictor: Another student predicts what the robot will do without seeing the code details
- Role 3 - Observer: The group runs the program and observes: “What happened? Was it predictable? What was unclear?”
- Discuss together: Why did the vague instructions cause confusion or unexpected results?
- Rotate roles and repeat so each student experiences being the coder
Part 3: Specific Instructions Challenge (20 minutes)
Students take turns creating specific code:
- Teacher assigns a simple task: “Make Dash draw a square path on the floor”
- Role 1 - Lead Coder: One student creates SPECIFIC block code with:
- Exact distances (e.g., “Move forward 40 cm”)
- Exact angles (e.g., “Turn right 90 degrees”)
- Speeds and durations
- Role 2 - Code Reviewer: Another student checks the code before running - “Is everything specific? What might go wrong?”
- Role 3 - Tester: Student runs the program and measures success
- Group discussion: Did the robot complete the square? What needs adjustment?
- Groups refine their programs together, then rotate roles and try a new shape (triangle, rectangle, or letter)
Part 4: Prompt Writing Challenge (5 minutes)
Groups practice giving verbal “prompts”:
- Role 1 - Prompt Writer: One student creates a verbal task description without using their hands or pointing (e.g., “Make Dash drive in a triangle” or “Make Dash spin twice and beep”)
- Role 2 - Coder: Another student tries to code the task using ONLY the verbal description
- Role 3 - Evaluator: Third student judges if the prompt was clear enough - what details were missing?
- Group reflection: Compare the final robot behavior to what the prompt writer intended. How could the prompt be more specific?
- Teacher selects 2-3 groups to share their best “specific prompt” examples with the class
Discussion & Reflection (5 minutes)
After the activity has been completed, gather the class for a quick debrief. Ask:
- What happened when your instructions were vague? (Robot didn’t do what you expected, results varied)
- How did adding specific details help? (Robot followed instructions exactly)
- What’s the connection between coding Dash and talking to AI like ChatGPT? (Both need clear, specific instructions/prompts)
- Can you think of times in real life when vague instructions cause problems? (Asking for help, following recipes, giving directions)
- What details did you need to include to make your instructions specific? (Numbers, directions, speeds, order of actions)
Key Takeaway: Just like robots, AI systems work best with clear, detailed prompts. Being specific helps technology understand exactly what you want!
Wrap-Up
As advancements in AI technology continue to grow, prompt engineering has emerged as a critical skill, with increasing demand in the job market. Today’s activity demonstrated that whether you’re coding a robot or prompting an AI, the principle is the same: specificity and clarity lead to better results.
By experiencing firsthand how vague block code produces unpredictable robot behavior while specific code produces consistent results, students develop an intuitive understanding of prompt engineering. This hands-on approach connects abstract AI concepts to tangible robot actions, making the importance of detailed instructions immediately visible and memorable.
These skills translate directly to using AI tools: a vague prompt like “tell me about animals” produces generic results, while a specific prompt like “list 5 endangered ocean animals and explain why each is endangered” produces focused, useful information. The computational thinking students practice today—breaking down tasks, specifying parameters, and iterating on instructions—prepares them for future careers in technology, AI development, and beyond.
Learning Outcomes
By the end of this activity, students should be able to:
- Distinguish between vague and specific instructions through hands-on robot coding
- Create detailed, specific block code sequences that produce predictable robot behavior
- Understand that clarity in instructions (prompts) leads to better outcomes in both robotics and AI
- Apply prompt engineering concepts by testing and refining their code based on robot performance
- Explain why specific prompts are more effective than vague ones in technology interactions