Skip to content
aiqbenchAI & Quantum Intelligence
NewsInsightsBenchmarksSkillsAsk AILearnAbout
...Loading your session
NewsInsightsBenchmarksSkillsAsk AILearnAbout
  1. Future Jobs
  2. ›
  3. Agentic AI Engineer
  4. ›
  5. Lesson 3 of 8

Planning, Reasoning & Reflection Loops

Advanced¶ Read · 3 min⚑ Mission · 25 min◆ Quiz · 3 questions

You'll be able to:

You can describe the main agent loop patterns (ReAct, plan-and-execute, reflexion) and explain when each earns its complexity and when a simple one-shot call is sufficient.

A team adds a reflection step to their agent: after producing an answer, it critiques its own work and tries again. Token cost triples. Accuracy moves by less than a percentage point, comfortably inside the noise. The pattern was not wrong — it was applied where it could not possibly help, because the agent had nothing to reflect against except its own opinion.

The three loop patterns

ReAct interleaves reasoning and action one step at a time: think, act, observe, repeat. It handles tasks where the path is unknown until you start walking it, and it pays for that flexibility with a model call per step.

Plan-and-execute produces a full plan first, then carries it out. Planning happens once, so it is cheaper and far more inspectable — you can show a human the plan before anything executes. It is brittle exactly where reality diverges from the plan.

Reflexion (Shinn et al., 2023) adds a reflection pass: the agent receives a feedback signal — usually external, such as a test failure or an environment reward, though the paper also allows internally simulated feedback — writes a verbal reflection on it, and retries with that reflection in context.

Reflection needs a signal from outside the model

This is the part teams get wrong, and it is worth stating plainly: self-critique with no external ground truth mostly produces confident rewording. The model that generated the answer is being asked to find its own errors using the same knowledge that produced them, and fluency reliably survives the process while correctness does not.

Reflection becomes genuinely powerful the moment there is an external signal to reflect on — a failing test, a compiler error, a validator's rejection, a tool result that contradicts the assumption. Code generation is the canonical success case precisely because tests provide exactly this. Before adding a reflection loop, the question to answer is not "should it check its work" but "check it against what."

Complexity has to be earned

A surprising share of tasks are handled correctly by a single well-constructed call with good context. Every loop pattern adds latency, cost, nondeterminism, and new ways to fail. The honest sequence is to start with one call, measure, and adopt a loop only where the measurement demands it.

Failure modes

Reflection without ground truth — critique passes that rephrase rather than repair. Signal: quality flat across reflection iterations while cost scales linearly with them.

Plan brittleness — an early step fails or returns something unexpected, the plan is never revalidated, and execution proceeds. Signal: later steps referencing outputs that were never produced.

Overthinking — extended reasoning applied to trivially simple requests. Signal: token cost per task with almost no correlation to task difficulty.

Objective drift — across a long loop the original instruction loses influence and the agent optimises for the most recent subgoal. Signal: a well-executed answer to a question nobody asked.

Explaining this to stakeholders

On the two main patterns: ReAct is exploring a city on foot, looking around at each corner. Plan-and-execute is drawing the route before leaving. If the map is accurate, planning wins easily. If there are roadworks, the walker gets there and the planner walks into a fence.

On reflection: asking someone to check their own work catches typos, not misconceptions — they will re-derive the same wrong answer with more confidence. Checking against a test, a rule, or a second source is what actually finds errors.

On why the simple version ships first: every loop we add is a thing that can spin, cost money, and be hard to explain afterwards. We add them when the numbers say the simple version is not enough.

Check Yourself

Loading the questions…

Module Mission

20–30 min

For a 'research a topic and produce a summary' task, sketch both a single-call and a multi-step reflexion loop that checks against an external signal (e.g. each claim verified against its cited source). Name the specific failure mode the second one buys you protection against.

Loading your work…

Curated Materials

1.2h

The deep work happens here — the lesson is your briefing.

  • Reflexion: Language Agents with Verbal Reinforcement LearningPaper· 25 min
  • Chain-of-Thought Prompting Elicits Reasoning in LLMsPaper· 20 min
  • LangGraph: Building Agent WorkflowsDocs· 25 min

Live on aiqbench

This lesson's subject on the rest of the site, today.

In the news, last 30 days

  • OpenAI AI Agents Bypass Security Restrictions and Access Government Systems Without PermissionCybersecurity News · Nov 26
  • We let AI agents break the rules on Black Friday. One stole a TV and another called the policeFortune · Nov 26
  • How workable is the “human-in-the-loop” concept in agentic AI?IDC · Nov 26
More news on this subject →

Go further

  • Benchmark report cardsWhat each benchmark measures and where it falls short.
  • Ask AI about this lessonOpens Ask AI with a question about this lesson, answered from the news archive with sources.
  • Agent skills for this workReady-made skills for AI coding agents, checked and rated.
← Previous lesson2. Tool Use & Function CallingNext lesson →4. Memory — Short-Term Context & Long-Term State
aiqbench
AI & Quantum Intelligence© aiqbench. All rights reserved.

Feeds:RSS·JSON Feed

LanguageEnglish·Românăbeta
NewsAI & TechQuantumInsights
ExploreBenchmarksLearn
CompanyAboutTrustLegal noticeTerms of ServicePrivacy PolicyCopyright noticesData erasureReport content

The aiqbench take, the insights, the daily digest and Ask answers are written by AI models from the sources shown, without editorial review before publication. They may contain errors — check the source. How the model is used →

  • News
  • Insights
  • Ask AI
  • Benchmarks
  • Account