< All Topics
Print

What is Reflexion Prompting?

Reflexion Prompting is one of the well-known prompting techniques used to interact with artificial intelligence models.

  • Prompt Type: Self-Improving
  • Definition: The AI reviews its own answer, identifies errors, and improves it in the next attempt.
  • Typical Use Case: Improving outputs like code, writing, or answers after initial errors.
  • Advantages: Enhances quality through self-correction; reduces errors over time.
  • Disadvantages: Requires multiple iterations; may not catch all errors.
  • Implementation Tips: Ask the AI to “review and revise” its output explicitly to trigger self-correction.
  • Skill Level Required: Intermediate – Needs ability to recognize when self-correction is necessary and how to prompt for it.

Examples:

  1. “After writing a summary that’s too short, the model critiques it and adds more details.”
  2. “After generating incorrect code, analyze the error and rewrite it correctly.”
  3. “After answering a math problem wrong, review the steps and provide a corrected solution.”