Templates / AI agent patterns / ai-evaluator-optimizer
AI Evaluator–Optimizer
One model call writes, a second grades the result against the brief and explains what to fix, and the feedback goes into the next attempt. The loop ends when the grade reaches 8 of 10; a FEEL counter caps it at three attempts, after which a human editor takes over, so a hard brief cannot burn tokens forever.
Scenarios · 2
- The first draft scores 9 and is delivered generate → evaluate → good-enough → deliver → delivered
- Three low scores hand the text to a human editor evaluate → next-attempt → evaluate → next-attempt → evaluate → human-editor → delivered
Job types · 2
-
io.camunda.agenticai:aiagent:1Generate, Evaluate -
pim-description-updateDeliver text
Files · 2
- ai-evaluator-optimizer.bpmn Process model
- ai-evaluator-optimizer.bpmn.tests.json Test scenarios (runScenario format)
Every scenario passes on @bpmnkit/engine's runScenario in the
package's tests. casen template use ai-evaluator-optimizer [dir] writes the files above
into your project — see the templates guide for running
the scenarios and deploying.