← All patterns

Retry Loop

Let the AI try, check if it worked, and try again if it did not.

low cost low risk

01 Retry pass fail: retry Start Model generate draft check output? checking rule Done

When to use it

  • A small task with a clear yes/no check.
  • A task where the AI can tell if the answer worked.
  • A task that should stop after a few tries.

When not to use it

  • A long task with many parts.
  • A task where trying the same idea again will not help.

How it works

Try once  then  Check the result  then  Try a different fix if it failed  then  Stop when it works or after a limit

Things to watch

  • Do not let it try forever.
  • Make each new try different from the last one.

How to start

  • Write what counts as success.
  • Choose how the AI will check the result.
  • Set a maximum number of tries.
  • If it fails twice the same way, change the approach.
Not sure this is the right loop?

Describe your task and get a plain-English recommendation.

Try “Should I Loop?”