LearnAI home

The Idea ยท Lesson 1

What a Loop Means in AI

Try, look at the result, adjust, try again. The pattern behind almost every AI tool that does real work.

Nobody writes the good version first

Think about the last thing you wrote that you were genuinely pleased with. A proposal, a difficult message, a set of slides. You did not produce it in one motion, start to finish, correct on the first attempt. You wrote something rough. You read it back and winced at the second paragraph. You cut it, moved a section, checked a number, read it again, and stopped when it was good enough to send.

That is four moves repeated: try, check, adjust, repeat. It is so ordinary that we barely notice we are doing it. It is also, almost exactly, what a modern AI tool is doing when you watch it think, retry, and work through steps on screen.

In plain English

Loop:
A cycle the AI runs more than once: it does something, looks at what happened, changes its approach, and goes again.
Pass:
One trip round the loop. One attempt plus one look at the result.
Single-shot answer:
One attempt, handed straight to you, with nothing in between that checked it.
Agent:
An AI set up to run this loop by itself, taking actions towards a goal rather than just replying to you.
Stopping condition:
The rule that decides when the loop has done enough and should hand the work over.

One pass versus many

When you ask a chatbot to name the capital of Portugal, you get a single pass. The question goes in, an answer comes out, and nothing in between examined that answer. For a question like that, one pass is plenty.

Now ask the same tool to go through a file of last quarter's expenses, flag anything that looks miscategorised, and write you a summary. One pass cannot do that honestly. It would have to open the file, and it cannot know what is in the file until it looks. It would have to notice that some rows are formatted differently, which it cannot know until it hits them. Something has to happen, then be looked at, then change what happens next.

So the tool loops. It takes an action, reads the result, decides what that result means for the plan, and takes another action. Everything you see labelled as thinking, or as steps, is this cycle made visible.

What one pass looks like

YOU: What is the capital of Portugal? AI: Lisbon.

Done. One attempt. Nothing was checked, and nothing needed to be.

What a loop looks like

YOU: Go through this expense file and flag anything miscategorised.

PASS 1 Action: open the file Result: hundreds of rows, and one column has mixed date formats Adjust: tidy the dates before anything else

PASS 2 Action: tidy the dates Result: a handful of rows fail, they contain notes not dates Adjust: set those aside and continue with the rest

PASS 3 Action: compare each row's category against its description Result: fourteen look wrong Adjust: re-read those fourteen before reporting them

PASS 4 Action: re-read the fourteen Result: eleven genuinely wrong, three were fine Adjust: nothing left to adjust

STOP Report the eleven, plus the rows it could not read.

Notice what pass 1 bought. Nothing that appeared in pass 2 could have been planned in advance, because nobody knew the dates were inconsistent until the file was open. That is the whole point. A loop lets the work respond to what it finds.

The moment the loop stops

A loop needs a way to end. Sometimes it is a finish line: the task is done, the checks pass, the document meets the brief. Sometimes it is a limit: enough attempts, enough time, enough money. Sometimes it is a question back to you.

Human loops end the same three ways. You stop editing the proposal when it is good enough, or when it is due, or when you send it to a colleague and ask what they think. An AI loop has all three of those exits available, and if you do not choose one, something else will choose for you.

Next time an assistant shows you its steps, read them as a loop rather than as a progress bar. Each step is an attempt plus a reaction to what that attempt produced. Read together, they tell you how the tool understood your request.

The pattern in four lines
  1. TRY do the next thing
  2. CHECK look at what actually happened
  3. ADJUST change the plan based on what you saw
  4. REPEAT until finished, out of budget, or stuck

The unglamorous truth is that a lot of what looks like AI cleverness is this cycle running faster than you can watch. Less a genius, more a very persistent colleague with no ego about draft three.

Checkpoint

A loop is try, check, adjust, repeat. A single answer is one pass with no checking step. Loops exist because some work cannot be planned in advance, only discovered as you go.

Quick Quiz

๐Ÿ“ Quiz

Question 1 of 4

What are the four moves that make up a loop?

Found this useful? Pass it on.