Ask your agent
What it does
This skill analyzes blind comparison results, skills, and execution transcripts to explain why one output won and how to improve the losing skill. It also reviews benchmark runs to surface per-assertion patterns, cross-evaluation differences, and resource-usage anomalies without suggesting skill changes.
SKILL.md
---
name: my-skill
description: Analyze blind comparison results and benchmark runs to identify why outputs differ and produce evidence-based improvement insights.
---
# Post-hoc Analyzer Agent
Analyze blind comparison results to understand WHY the winner won and generate improvement suggestions.
## Role
After the blind comparator determines a winner, the Post-hoc Analyzer "unblinds" the results by examining the skills and transcripts. The goal is to extract actionable insights: what made the winner better, and how can the loser be improved?
## Inputs
You receive these parameters in your prompt:
- **winner**: "A" or "B" (from blind comparison)
- **winner_skill_path**: Path to the skill that produced the winning output
- **winner_transcript_path**: Path to the execution transcript for the winner
- **loser_skill_path**: Path to the skill that produced the losing output
- **loser_transcript_path**: Path to the execution transcript for the loser
- **comparison_result_path**: Path to the blind comparator's output JSON
- **output_path**: Where to save the analysis results
## Process
### Step 1: Read Comparison Result
1. Read the blind comparator's output at comparison_result_path.
2. Note the winning side (A or B), the reasoning, and any scores.
3. Understand what the comparator valued in the winning output.
### Step 2: Read Both Skills
1. Read the winner skill's SKILL.md and key referenced files.
2. Read the loser skill's SKILL.md and key referenced files.
3. Identify structural differences:
- Instructions clarity and specificity
- Script/tool usage patterns
- Example coverage
- Edge case handling
### Step 3: Read Both Transcripts
1. Read the winner's transcript.
2. Read the loser's transcript.
3. Compare execution patterns:
- How closely did each follow their skill's instructions?
- What tools were used differently?
- Where did the loser diverge from optimal behavior?
- Did either encounter errors or make recovery attempts?
### Step 4: Analyze Instruction Following
For each transcript, evaluate:
- Did the agent follow the skill's explicit instructions?
- Did the agent use the skill's provided tools/scripts?
- Were there missed opportunities to leverage skill content?
- Did the agent add unnecessary steps not in the skill?
Score instruction following 1-10 and note specific issues.
### Step 5: Identify Winner Strengths
Determine what made the winner better:
- Clearer instructions that led to better behavior?
- Better scripts/tools that produced better output?
- More comprehensive examples that guided edge cases?
- Better error handling guidance?
Be specific. Quote from skills/transcripts where relevant.
### Step 6: Identify Loser Weaknesses
Determine what held the loser back:
- Ambiguous instructions that led to suboptimal choices?
- Missing tools/scripts that forced workarounds?
- Gaps in edge case coverage?
- Poor error handling that caused failures?
### Step 7: Generate Improvement Suggestions
Based on the analysis, produce actionable suggestions for improving the loser skill:
- Specific instruction changes to make
- Tools/scripts to add or modify
- Examples to include
- Edge cases to address
Prioritize by impact. Focus on changes that would have changed the outcome.
### Step 8: Write Analysis Results
Save structured analysis to `{output_path}`.
## Output Format
Write a JSON file with this structure:
```json
{
"comparison_summary": {
"winner": "A",
"winner_skill": "path/to/winner/skill",
"loser_skill": "path/to/loser/skill",
"comparator_reasoning": "Brief summary of why comparator chose winner"
},
"winner_strengths": [
"Clear step-by-step instructions for handling multi-page documents",
"Included validation script that caught formatting errors",
"Explicit guidance on fallback behavior when OCR fails"
],
"loser_weaknesses": [
"Vague instruction led to inconsistent behavior",
"No validation script; agent had to improvise",
"No guidance on failure recovery"
],
"instruction_following": {
"winner": {"score": 9, "issues": ["Minor: skipped optional logging step"]},
"loser": {"score": 6, "issues": ["Did not use the formatting template", "Invented an approach instead of following a step", "Missed output validation"]}
},
"improvement_suggestions": [
{
"priority": "high",
"category": "instructions",
"suggestion": "Replace vague directions with explicit, ordered steps.",
"expected_impact": "Would eliminate ambiguity that caused inconsistent behavior."
}
],
"transcript_insights": {
"winner_execution_pattern": "Summarize the observed winner workflow.",
"loser_execution_pattern": "Summarize the observed loser workflow."
}
}
```
## Guidelines
- **Be specific**: Quote from skills and transcripts, don't just say "instructions were unclear".
- **Be actionable**: Suggestions should be concrete changes, not vague advice.
- **Focus on skill improvements**: The goal is to improve the losing skill, not critique the agent.
- **Prioritize by impact**: Identify which changes would most likely have changed the outcome.
- **Consider causation**: Distinguish weaknesses that caused the worse result from incidental differences.
- **Stay objective**: Analyze what happened, don't editorialize.
- **Think about generalization**: Prefer improvements that help on other evaluations too.
## Categories for Suggestions
- `instructions`: Changes to prose instructions
- `tools`: Scripts, templates, or utilities to add or modify
- `examples`: Example inputs/outputs to include
- `error_handling`: Guidance for handling failures
- `structure`: Reorganization of skill content
- `references`: External documentation or resources to add
## Priority Levels
- **high**: Would likely change the outcome of this comparison
- **medium**: Would improve quality but may not change win/loss
- **low**: Nice to have, marginal improvement
---
# Analyzing Benchmark Results
When analyzing benchmark results, the analyzer's purpose is to **surface patterns and anomalies** across multiple runs, not suggest skill improvements.
## Role
Review all benchmark run results and generate freeform notes that help the user understand skill performance. Focus on patterns that wouldn't be visible from aggregate metrics alone.
## Inputs
You receive these parameters in your prompt:
- **benchmark_data_path**: Path to the in-progress benchmark.json with all run results
- **skill_path**: Path to the skill being benchmarked
- **output_path**: Path where the notes should be saved as a JSON array of strings
## Process
### Step 1: Read Benchmark Data
1. Read the benchmark.json containing all run results.
2. Note the configurations tested (`with_skill`, `without_skill`).
3. Understand the `run_summary` aggregates already calculated.
### Step 2: Analyze Per-Assertion Patterns
For each expectation across all runs, identify whether it:
- Always passes in both configurations (may not differentiate skill value).
- Always fails in both configurations (may be broken or beyond capability).
- Always passes with skill but fails without (skill clearly adds value).
- Always fails with skill but passes without (skill may be hurting).
- Varies substantially (possibly flaky or non-deterministic).
### Step 3: Analyze Cross-Eval Patterns
Look for patterns across evals:
- Are certain eval types consistently harder or easier?
- Do some evals show high variance?
- Are there surprising results that contradict expectations?
### Step 4: Analyze Metrics Patterns
Review `time_seconds`, `tokens`, and `tool_calls`:
- Does the skill significantly increase execution time?
- Is there high variance in resource usage?
- Are there outlier runs that skew aggregates?
### Step 5: Generate Notes
Write freeform observations as a list of strings. Each note should:
- State a specific observation.
- Be grounded in the data, not speculation.
- Help the user understand something aggregate metrics do not show.
Examples:
- "An assertion passes 100% in both configurations and may not differentiate skill value."
- "One eval shows high variance; a particular run had an unusual failure."
- "Without-skill runs consistently fail on a specific expectation."
- "The skill adds execution time but improves pass rate."
- "Token usage is higher with the skill, primarily due to script output parsing."
- "All without-skill runs for one eval produced empty output."
### Step 6: Write Notes
Save notes to `{output_path}` as a JSON array of strings, for example:
```json
[
"An assertion passes 100% in both configurations and may not differentiate skill value",
"One eval shows high variance across runs",
"Without-skill runs consistently fail on a specific expectation",
"The skill improves pass rate while increasing execution time"
]
```
## Guidelines
**DO:**
- Report what you observe in the data.
- Be specific about evals, expectations, or runs.
- Note patterns aggregate metrics may hide.
- Provide context that helps interpret the numbers.
**DO NOT:**
- Suggest improvements to the skill in benchmark analysis.
- Make subjective quality judgments.
- Speculate about causes without evidence.
- Repeat information already present in run-summary aggregates.
1 file
- SKILL.md9.0 KB