Skip to main content
Automatically improve your recipes using AI judge feedback.
The optimizer runs your recipe, evaluates the output, and applies improvements iteratively.

Quick Start

praisonai recipe optimize my-recipe

How It Works

1

Run

Executes the recipe and captures output
2

Judge

AI evaluates task achievement, output quality, and instruction following
3

Improve

Proposes specific YAML changes based on feedback
4

Apply

Updates agents.yaml with improvements
5

Repeat

Continues until score threshold or max iterations

Options

OptionDescriptionDefault
--iterationsMaximum optimization iterations3
--thresholdScore threshold to stop (1-10)8.0
--input, -iInput data for recipe runsNone

Examples

Optimize with defaults:
praisonai recipe optimize my-recipe

What Gets Improved

The AI judge evaluates and improves:
Did the agent accomplish what it was asked to do?
Does the output match expected format and contain useful information?
Did the agent follow specific instructions, format, and constraints?
How well did the agent handle errors and edge cases?

Score Interpretation

ScoreQualityAction
9-10ExcellentReady for production
7-8GoodMinor improvements possible
5-6FairNeeds optimization
1-4PoorSignificant issues
Start with default threshold (8.0) and increase to 9.0 for production-critical recipes.

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"

Next Steps