Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Skill Evolution Pipeline: From Intuition to Empirical Optimization

This document defines the operational framework for evolving agent skills using a textual optimization loop. Instead of manual prompt engineering, we treat the skill document as a “trainable state” that is optimized against empirical evidence.

1. The Evolution Lifecycle

The transition from a human-authored seed prompt to a production-grade optimized skill follows a five-stage cycle.

  1. Seed Phase (Intuition) The skill is authored by a human expert based on desired behavior and project conventions. This is the SKILL.md (Seed).

  2. Observation Phase (Failure Capture) The skill is deployed in a staging environment. Failures are logged, and “blind spots” (cases where the agent deviates from the golden path) are identified.

  3. Synthesis Phase (Golden Set) A curated dataset is created consisting of:

    • train/: Examples used by the optimizer to generate candidates.

    • val/: The “Validation Gate” used to accept or reject edits.

    • test/: The final benchmark for performance verification.

  4. Optimization Phase (Empirical Loop) Using the SkillOpt framework, a strong “Optimizer” model iterates on the seed prompt, applying textual edits that strictly improve the validation score.

  5. Deployment Phase (Integration) The resulting best_skill.md is reviewed, versioned, and promoted to the active skills directory.

2. Technical Implementation with SkillOpt

2.1 Data Split Architecture

The effectiveness of the evolution depends on the quality of the items.json files.

Dataset Schema:

2.2 Optimizer Configuration

The optimization is governed by a YAML configuration. Key levers include:

3. Integration with the AI Stack

This pipeline transforms how we manage the five-layer architecture:

4. Governance and Maintenance

4.1 When to Re-Optimize?

A skill should enter the evolution pipeline again if:

  1. Model Drift: The target model is updated (e.g., Qwen 2.5 →\rightarrow 3.0).

  2. Regression: New failures are detected in production.

  3. Scope Expansion: New requirements are added to the skill’s responsibility.

4.2 Verification Protocol

Before a best_skill.md is merged, it must pass the Regression Test:

5. Quick-Start Command Reference

All optimization commands must be executed from the SkillOpt tool directory: ai_agents/research/ai_skills_plugins/SkillOpt

# Navigate to the tool directory
cd ai_agents/research/ai_skills_plugins/SkillOpt

Run Optimization:

python scripts/train.py --config configs/skill_name/default.yaml --split_dir data/skill_name_split

Verify Performance:

python scripts/eval_only.py --config configs/skill_name/default.yaml --skill ckpt/skill_name/best_skill.md