chapter seven
7 Reflection and evaluation: How your agent audits and learns from itself
This chapter covers
- Using feedback to improve an agent's current work and future behavior
- Refining a current artifact with the Generator-Critic pattern
- Recovering a failed task within a bounded Self-Heal Loop
- Admitting reusable capabilities through the Skill Package pattern
- Recalling validated lessons through the Experience Replay pattern
- Choosing evidence that can reveal the failure under investigation
"An unexamined life is not worth living."
— Socrates, in Plato’s Apology 38a
An engineer building evaluation environments told me about an agent that added another safeguard whenever a new build failed. The safeguard addressed that failure, so the system kept it. The next failure led to another safeguard and another local check.
After about two months, the agent had accumulated dozens of constraints. The environments were more stable, but a build that had once taken about five minutes now took thirty minutes and sometimes close to an hour. Some safeguards overlapped while others worked against one another, even though each repair had made sense when it was added. Together, they had become a burden.