Summary
The Evaluator-Optimizer pattern implements an iterative improvement loop where a generator LLM creates solutions, an evaluator LLM assesses them against specific criteria, and then the generator refines the solution based on feedback. This cycle continues until the solution meets the desired quality threshold or reaches a maximum number of iterations.
How it works
- Generate: Producer model creates initial solution
- Evaluate: Critic model scores against criteria
- Feedback Loop: If insufficient quality, return feedback to generator
- Refine: Generator produces improved version
- Terminate: Stop when threshold met or max iterations reached
Evaluation dimensions
- Accuracy: Factual correctness, mathematical precision
- Style: Tone consistency, voice adherence
- Completeness: Coverage of required elements
- Safety: No harmful content, bias detection
Use cases
- Content creation where quality and adherence to specific criteria are important
- Problem-solving tasks that benefit from iterative refinement and critical feedback
- Creative writing with specific style, tone, or structural requirements
- Code generation that needs to meet specific performance or style guidelines
- Educational content that requires accurate information and appropriate difficulty levels