Pattern 3 of 10

Give the model a way to check itself

The default loop is: the model generates, you find the bug, you re-prompt, repeat. The upgrade is giving the model a way to check its own work before it reaches you.

Give the model a test or checklist so it catches its own mistakes first.

Self-verification means handing the model an explicit way to judge its own output: a checklist, a set of success criteria, test cases to satisfy, or an instruction to review against the requirements before answering.

Why it works

Every round of "no, I meant this" costs time and tokens. If the model can verify against clear criteria first, many of those rounds disappear. The key is that the criteria must be concrete and checkable, not "make it good."

How to do it

State the success criteria in the prompt, then ask the model to check its draft against them before giving the final answer.

No way to verify

"Write a function to validate emails."

With criteria to check

"Write a function to validate emails. It must: reject addresses without an @, handle empty input, and include three test cases that prove it works. Before answering, confirm each requirement is met."

Example you can copy

Built-in self-check
Task: write a function that converts a date string to ISO format.

Requirements (check each before answering):
1. Handles "DD/MM/YYYY" and "MM-DD-YYYY".
2. Returns null for invalid input instead of throwing.
3. Includes 3 test cases covering valid, invalid, and empty input.

Before giving the final code, list each requirement and confirm it is satisfied. If any is not, fix it first.

When it helps

  • Code, data, and anything with objective pass/fail criteria
  • Tasks where you keep re-prompting to fix the same kinds of gaps
  • Output that must meet a fixed checklist or format

When to skip it

  • Purely subjective creative work with no checkable criteria
  • Very short tasks where a self-check adds more text than value

Common mistakes

  • Asking for "good" output without giving concrete criteria to check against
  • Forgetting to let the model fix what its own check found
  • Confusing visible self-review with a real test (run the test where you can)

Frequently asked

How do I stop AI from making the same mistakes repeatedly?

Give it concrete success criteria in the prompt and ask it to verify its draft against each one before answering, then fix anything that fails. Vague requests for "good" output cannot be self-checked.