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

    Reflection Prompting

    Reflection asks the model to evaluate its own first answer and improve it.

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

    Introduction

    Reflection asks the model to evaluate its own first answer and improve it. It's a one-prompt critic that catches obvious errors before they ship.

    Beginner analogy: Like re-reading your own essay before submitting. Self-edit catches half the bugs.

    Understanding the topic

    Core concepts to understand:

    • Two-turn pattern: answer → critique → revise.
    • Often run in a single prompt with sections.
    • Catches hallucinations, format breaks, missed constraints.
    • Adds latency & cost — use on critical paths.

    Syntax reference

    Visual workflow / architecture:

    bash
    Step 1: Generate answer.
    Step 2: Critique answer for:
    - factual errors
    - missed constraints
    - poor format
    Step 3: Rewrite, fixing all critiques.
    Output: final revised answer only.

    Real-world use

    Coding assistants use reflection to retry compilation errors before showing code to the user.

    Best practices

    • Limit to 1 reflection round — diminishing returns after that.
    • Reflect against a checklist, not free-form.
    • Hide reflection from end users.

    Hands-on exercise

    Interview preparation — practice these questions:

    • Q1. What is reflection prompting?
    • Q2. When does it backfire?
    • Q3. How many rounds of reflection?
    • Q4. Reflection vs human review?
    Ready to mark this lesson complete?Track your journey across the entire course.