Prompt Engineering Tutorial 0/120 lessons ~6 min read Lesson 106

    Prompt Exercises

    Practice cements theory.

    Course progress0%
    Focus
    6 guided sections
    Practice signal
    Examples included
    Career prep
    Foundation builder

    Introduction

    Practice cements theory. The exercises below repeat across interviews and real jobs — do all of them, save your answers.

    Beginner analogy: Like piano scales — boring alone, transformative together.

    Understanding the topic

    Core concepts to understand:

    • Write a zero-shot prompt to classify movie reviews as positive/negative.
    • Convert it to few-shot with 3 examples — compare accuracy.
    • Add CoT and measure delta.
    • Add JSON output + validation.
    • Add refusal rule for empty input.

    Syntax reference

    Visual workflow / architecture:

    bash
    Exercise loop: Write → Test → Measure → Improve

    Real-world use

    These are the exact exercises new prompt engineers do during onboarding at top AI startups.

    Best practices

    • Do every exercise yourself, not just read.
    • Save your prompt + result for review.
    • Repeat after Phase 4 — you'll see what changed.

    Hands-on exercise

    Interview preparation — practice these questions:

    • Q1. Walk through your zero-shot vs few-shot results.
    • Q2. How does CoT affect this task?
    • Q3. JSON validation strategy?
    • Q4. Refusal rule design?
    Ready to mark this lesson complete?Track your journey across the entire course.