Client
Agent
Generator
Evaluator
Iteration Control
When to Use
Use evaluator-optimizer when output quality can be measurably improved through iteration and when you have clear evaluation criteria. It’s ideal for creative tasks like content generation, code optimization, or any scenario where first attempts can be systematically improved. Avoid when the cost of multiple iterations outweighs quality gains or when evaluation criteria are subjective and inconsistent.Implementation
This example demonstrates iterative social media post creation where a generator creates content and an evaluator provides feedback until the post meets quality standards or maximum iterations are reached.Agent Code
Generator Tool: Content Creation and Improvement
Generator Tool: Content Creation and Improvement
Evaluator Tool: Quality Assessment and Feedback
Evaluator Tool: Quality Assessment and Feedback