Lion Cipher Lab

Add a Reflexion self-critique loop to a triage agent: let it reflect on its own failed run and retry, then measure what it recovers and what it wrecks

Why it matters

A Reflexion loop is the most seductive upgrade you can bolt onto an agent: let it look at its own failed run, write down what it thinks went wrong, and try again. Shinn and colleagues showed it lifts real agents on real benchmarks, and every team that reads the paper wants it in their triage pipeline by Friday. The trouble is that a self-critique loop is a two-edged instrument and almost nobody measures the second edge. When an agent reflects and retries, it does two things at once: it rescues some tasks it had wrong, and it talks itself out of some it had right. If you only count the rescues…

What you'll learn

Steps in this lab

  1. The words first: agent, tool, triage, single-shot, pass@1, Reflexion, episodic memory, self-check, recovered, flipped - and the fact that the agent here is a stub
  2. Open a terminal and make a scratch folder (all three operating systems)
  3. The corpus: 240 alerts whose correct verdict you already know
  4. The agent, its one tool, and its self-check - watch it recover one alert and wreck another
  5. Stage 1 - the baseline: single-shot triage, and where it fails
  6. Stage 2 - add the Reflexion loop, and measure both edges
  7. Stage 3 - the honest negative and the number that decides whether to run the loop at all
  8. The rule: when a reflection loop is worth its cost, and when NOT to let an agent argue with itself

Open the full interactive lab →