[ ABORT TO HUD ]
SEQ. 1
SEQ. 2
SEQ. 3
SEQ. 4
SEQ. 5

Reflection & Self-Correction

🔄 The Agentic Control Loop⏱ 10 min⭐ 70 BASE XP⌨ HANDS-ON LAB

The Inner Critic

Agents that act without checking their work make catastrophic mistakes. Adding a Reflection step improves reliability by 30-40%.

A Self-Correcting Loop looks like this:

  1. Agent writes code.
  2. System runs code (it fails with an error).
  3. Agent reads the error and reflects: "Why did it fail? Ah, I used the wrong import."
  4. Agent writes corrected code.
🎯 Pro Tip: You can use a separate LLM (an "Evaluator" or "Judge" agent) to critique the main agent's work. Peer review works for AI too!
⌨ HANDS-ON LABExecute Agent Self-Correction with Critic Feedback
⭐ +150 XP

Run a two-turn Reflection loop where a critic evaluator identifies logical inconsistencies in generated SQL and triggers an automated repair.

1Simulate reflection critic evaluation and code repair.
lab-sandbox — simulated environment
INFINITY LAB SANDBOX v2.6 — simulated shell
Type the command for the current objective. Helpers: "hint", "solution", "clear".
$
OBJECTIVE 1 / 1 — type "hint" if stuck
SYNAPSE VERIFICATION
QUERY 1 // 1
What is the primary benefit of adding a Reflection step to an agent?
It speeds up execution
It significantly improves reliability by allowing the agent to self-correct errors
It reduces token costs
It allows the agent to generate images