Skip to main content
The Recipe Cycle Testing workflow helps you iteratively improve your AI agent recipes.

Quick Start

1

Create a Recipe

2

Run with Trace

3

Judge the Output

4

Apply Fixes

5

Repeat

Run cycles 2-5 until score reaches target threshold.

Common Errors & Fixes

Error: Tool 'tavily_search' result was truncatedCause: Large search results exceed context windowFix:
  • Use --chunked flag when judging
  • Reduce max_results in tool calls
  • Add instructions to summarize results
Error: Task Achievement: 5.0/10Cause: Agent output doesn’t match expected formatFix:
  • Add clearer expected_output in steps
  • Include specific format requirements in action
  • Add verification instructions to backstory
Error: Hallucination: 3.0/10Cause: Agent generates unverified informationFix:
  • Add instruction to cite sources
  • Use include_answer: true in tavily_search
  • Add verification step in backstory
Error: Recipe Goal: Not specifiedCause: No goal field in agents.yamlFix: Add a clear, measurable goal:

Tool-Specific Fixes

Issue: Results truncated or incomplete

Cycle Results Example

Cycle 1 achieved 7.5/10 with improved truncation detection. Subsequent cycles may vary based on LLM responses and tool result sizes.
If scores plateau, manual intervention is needed. Review the backstory and action prompts directly.

Best Practices

Start Simple

Use 1 agent for simple tasks. Add agents only when needed.

Be Specific

Use concrete values in actions, not variables.

Set Goals

Always include a measurable goal field.

Verify Output

Add verification instructions to agent backstory.

CLI Reference