liveBook · Manning

Self-reflection

As explained in Prompt Engineering in Practice

A prompt strategy in which a model examines or critiques its own reasoning or output.

Self-reflection is a follow-up prompt that asks a model to critique its own output immediately after generating it. The critique can expose gaps and assumptions; paired with refinement, it forms an evaluation-then-improvement workflow. Use it when quality matters enough to justify another step, such as for complex analysis, strategic recommendations, or high-stakes outputs. Skip it for simple factual queries or urgent work. section 4.6

A practical workflow is to:

  • Generate the initial answer, then ask the model to identify what it did well and what it may have overlooked. section 4.6.1
  • Use the critique to refine the original output while preserving its strengths. section 4.8.1
  • Choose self-reflection for internal critique; use inversion when you want gaps exposed through external challenge. section 4.6.1

Improving API documentation

Given minimal POST /orders documentation, ask: “What important elements might be missing that would help a developer use this endpoint correctly?” The critique identifies omissions such as the request schema, authentication, status codes, and error responses. A refinement prompt can then add the missing details, including a request structure and response codes. section 4.8.1

How Prompt Engineering in Practice covers it

How deep it goes
Explains an evaluate-then-improve workflow with prompt examples, but provides no formal scoring rubric.
Examples
Uses a six-week engineer onboarding plan and sparse POST /orders documentation to surface omissions.
What you can do after
Applies a follow-up critique prompt, then refines the original output using the identified gaps.
How it connects
Pairs with refinement and contrasts with inversion, which finds gaps through external challenge.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Prompt Engineering in Practice. The section links point to the parts of the book it draws on.