Lesson 4 / 25

Reflection and Self-Checking

Have the agent check its work against criteria, preferring checks that code can run.

Check before you answer

Reflection adds a step where the agent reviews its draft or result before finishing: does the answer address the question, do the numbers add up, did the tool really succeed? The strongest checks are executable (run the tests, validate the JSON, re-query the record). A model critiquing itself helps for style and completeness but can repeat its own mistakes.

Give the critic different information

A reviewer that sees the same context as the writer shares its blind spots. Give the check something new: the original requirements, a checklist, or the real tool output.

Quick check: Which self-check is most reliable?

  • Asking "are you sure?"
  • Running the tests and reading the result
  • Re-reading the same answer
  • Making the answer longer
Answer

Running the tests and reading the result — Executable checks give objective evidence instead of another opinion.