Intermediate Technique

Reflection Prompting

Have AI critique and improve its own outputs through self-examination

What is Reflection Prompting?

Reflection prompting asks the AI to review, evaluate, and improve its own outputs. Instead of accepting the first response, you prompt the model to step back and critically analyze its work against specific criteria.

This technique leverages the AI's ability to recognize quality issues and apply self-correction, often producing higher-quality final outputs.

When to Use It

Best For:

  • • High-stakes outputs
  • • Complex reasoning tasks
  • • Creative content
  • • Code and technical writing

Not Ideal For:

  • • Simple factual answers
  • • When speed is critical
  • • One-off trivial queries
  • • When first response is sufficient

Examples

Example 1: Code Review
Initial Prompt
Write a function to validate email addresses
Reflection Prompt
Review your function for edge cases. Check for: - Invalid formats that pass - Valid formats that fail - Performance issues Then provide an improved version.
Improved Output
def validate_email(email: str) -> bool: if not email or '@' not in email: return False local, domain = email.rsplit('@', 1) # Added: local length check, domain validation if len(local) > 64 or not domain: return False # Added: regex for proper format import re return bool(re.match(r'^[\w.-]+@[\w.-]+\.\w+$', email))
Example 2: Writing Refinement
Initial Prompt
Write a product description for a coffee maker
Reflection Prompt
Evaluate your product description against: - Emotional appeal - Specific features mentioned - Call to action strength - Differentiation from competitors Rewrite with improvements.
Improved Output
"Wake up to the aroma of freshly brewed perfection..." [More evocative opening added]

Features: 12-cup capacity, programmable timer, thermal carafe [specifics included]

CTA: "Transform your mornings..." [stronger]

Best Practices

  • 01
    Provide clear evaluation criteria

    Tell the AI exactly what aspects to reflect on

  • 02
    Ask for specific improvements

    Don't just ask "is this good?" - ask "how can this be better?"

  • 03
    Iterate if needed

    Multiple reflection rounds can further improve quality

  • 04
    Combine with other techniques

    Works well with CoT, few-shot, and role-playing

Reflection vs Self-Correction

While self-correction fixes errors after they're identified, reflection prompting proactively analyzes quality before finalizing output. Think of it as peer review - you're asking the AI to be its own critic and editor.