What is an AI loop?
An AI loop is a setup in which an AI agent repeats a cycle of work, check and improve until the result passes a test you defined.
Key takeaways
- A loop needs a clear score or test, so the agent knows when it is done.
- The agent checks its own work each round, so quality rises with no extra effort from you.
- A stop rule, such as a maximum number of rounds, keeps the loop from running forever.
How it works
You give the agent a goal, a way to measure the result and a stop rule. The agent produces a version, measures it, finds the weakest part and fixes it. It repeats the cycle until the score is high enough or the stop rule applies. Then it reports what it did.
Example
You ask an agent to improve a landing page until ten test readers, played by the model, can each state the offer in one sentence. The agent rewrites, tests and repeats, and it stops after the test passes or after eight rounds.
Why it matters
One prompt gives one draft. A loop gives a draft that already went through several rounds of review. It is the simplest way to get better work from the same model.
Common mistake
A loop improves only what its test measures. If the test is weak, the agent gets a high score on weak work. Write the test with care.
Guides that use this term
Related terms
See all terms in the AI Encyclopedia, the numbers on the AI statistics pages, or build a prompt with the prompt builder.