Recipe Optimize
Improve existing recipes with AI-powered feedback
Automatically improve your recipes using AI judge feedback.
Quick Start
praisonai recipe optimize my-recipeHow It Works
- Run
Executes the recipe and captures output
- Judge
AI evaluates task achievement, output quality, and instruction following
- Improve
Proposes specific YAML changes based on feedback
- Apply
Updates agents.yaml with improvements
- Repeat
Continues until score threshold or max iterations
Options
| Option | Description | Default |
|---|---|---|
--iterations | Maximum optimization iterations | 3 |
--threshold | Score threshold to stop (1-10) | 8.0 |
--input, -i | Input data for recipe runs | None |
Examples
Basic
Optimize with defaults:
praisonai recipe optimize my-recipeTargeted
Focus on specific improvements:
praisonai recipe optimize my-recipe "improve error handling"High Quality
More iterations, higher threshold:
praisonai recipe optimize my-recipe --iterations 5 --threshold 9.0With Input
Test with specific input:
praisonai recipe optimize my-recipe --input '{"query": "test"}'What Gets Improved
The AI judge evaluates and improves:
Task Achievement
Did the agent accomplish what it was asked to do?
Output Quality
Does the output match expected format and contain useful information?
Instruction Following
Did the agent follow specific instructions, format, and constraints?
Error Handling
How well did the agent handle errors and edge cases?
Score Interpretation
| Score | Quality | Action |
|---|---|---|
| 9-10 | Excellent | Ready for production |
| 7-8 | Good | Minor improvements possible |
| 5-6 | Fair | Needs optimization |
| 1-4 | Poor | Significant issues |
Workflow
# 1. Create initial recipe
praisonai recipe create "Research AI trends"
# 2. Test run
praisonai recipe run research-ai-trends
# 3. Optimize based on results
praisonai recipe optimize research-ai-trends
# 4. Target specific issues
praisonai recipe optimize research-ai-trends "add better source citations"