← 返回
未分类 中文

Meta Skill Optimizer

Self-improving AI skill optimizer that learns from feedback, auto-tunes prompts, optimizes tool usage patterns, and evolves based on success/failure analysis...
自我提升的 AI 技能优化器,通过反馈学习、自动调优提示词、优化工具使用模式,并根据成功/失败分析持续演进。
jason-aka-chen jason-aka-chen 来源
未分类 clawhub v1.0.0 1 版本 99706.7 Key: 无需
★ 0
Stars
📥 340
下载
💾 1
安装
1
版本
#latest

概述

Meta Skill Optimizer

Self-improving AI capability that enables continuous skill enhancement.

Features

1. Feedback Learning

  • Success Analysis: Learn from successful executions
  • Failure Analysis: Understand and prevent failures
  • Pattern Recognition: Identify recurring patterns
  • Preference Learning: Adapt to user preferences

2. Prompt Optimization

  • Auto-Tuning: Optimize prompts based on outcomes
  • Chain-of-Thought: Improve reasoning chains
  • Example Selection: Dynamic few-shot example selection
  • Style Adaptation: Match user communication style

3. Tool Usage Optimization

  • Tool Selection: Choose best tools for tasks
  • Parameter Tuning: Optimize tool parameters
  • Workflow Patterns: Discover effective workflows
  • Error Recovery: Learn from tool errors

4. Self-Diagnosis

  • Capability Assessment: Know what it can/can't do
  • Knowledge Gaps: Identify missing knowledge
  • Confidence Calibration: Accurate confidence levels
  • Limitation Awareness: Know when to ask for help

5. Continuous Evolution

  • Version Tracking: Track skill improvements
  • A/B Testing: Compare approach effectiveness
  • Best Practices: Extract and codify learnings
  • Knowledge Base: Build searchable knowledge

Installation

pip install numpy scipy json

Usage

Initialize Optimizer

from meta_optimizer import SkillOptimizer

optimizer = SkillOptimizer(
    skill_name="data_analysis",
    learning_rate=0.1
)

Record Execution Result

# Record successful execution
optimizer.record_success(
    task="analyze sales data",
    approach="used pandas groupby",
    context={"data_size": "10MB", "complexity": "high"},
    outcome={"success": True, "quality": "high"}
)

# Record failure
optimizer.record_failure(
    task="predict stock price",
    approach="used linear regression",
    error="insufficient features",
    lesson="need more technical indicators"
)

Get Optimized Approach

# Get best approach for task
best_approach = optimizer.get_best_approach(
    task_type="data_analysis",
    context={"data_size": "1GB"}
)

print(best_approach)
# {'method': 'chunked_processing', 'tools': ['pandas', 'dask']}

Optimize Prompt

# Optimize prompt based on results
optimized_prompt = optimizer.optimize_prompt(
    original_prompt="Analyze this data",
    outcome="too vague",
    feedback="be more specific about analysis type"
)

print(optimized_prompt)
# "Analyze this time-series data using trend detection and seasonality analysis"

API Reference

Feedback Learning

MethodDescription
---------------------
record_success(...)Record successful execution
record_failure(...)Record failed execution
get_insights()Get learned insights

Prompt Optimization

MethodDescription
---------------------
optimize_prompt(...)Optimize prompt based on feedback
generate_examples(...)Generate few-shot examples
adapt_style(...)Adapt to user style

Tool Optimization

MethodDescription
---------------------
suggest_tools(...)Suggest best tools
optimize_params(...)Optimize tool parameters
discover_workflow(...)Discover effective workflows

Self-Diagnosis

MethodDescription
---------------------
assess_capability(...)Assess capability for task
identify_gaps()Identify knowledge gaps
calibrate_confidence()Calibrate confidence levels

Evolution

MethodDescription
---------------------
track_improvement()Track improvement over time
export_knowledge()Export learned knowledge
merge_experiences()Merge from other optimizers

How It Works

1. Feedback Loop

Task → Execution → Result → Feedback → Learning → Improvement

2. Pattern Discovery

Multiple Executions → Pattern Mining → Best Practices → Codification

3. Continuous Learning

New Task → Similar Past Tasks → Learned Lessons → Optimized Approach

Use Cases

  • Prompt Engineering: Continuously improve prompts
  • Tool Selection: Better tool recommendations
  • Error Prevention: Learn from past mistakes
  • User Adaptation: Match user preferences
  • Capability Growth: Expand what AI can do

Knowledge Base

The optimizer builds a knowledge base:

{
  "patterns": {
    "data_analysis": {
      "small_data": "pandas sufficient",
      "large_data": "use dask or chunking",
      "time_series": "check stationarity first"
    }
  },
  "prompts": {
    "effective": ["specific", "contextual", "actionable"],
    "ineffective": ["vague", "ambiguous", "overly broad"]
  },
  "tools": {
    "coding": ["cursor", "claude-code"],
    "research": ["tavily", "browser"]
  }
}

Integration

With OpenClaw

# Auto-record all executions
@hookimpl
def after_execution(result, context):
    optimizer.record_execution(context, result)

With Skills

# Optimize skill behavior
skill = MySkill()
optimized_skill = optimizer.optimize_skill(skill)

Best Practices

  1. Record Everything: More data = better learning
  2. Categorize Failures: Understand failure types
  3. Update Regularly: Keep knowledge current
  4. Merge Insights: Combine learnings from multiple sources

Future Capabilities

  • Cross-skill learning
  • Automatic skill creation
  • Self-debugging
  • Automated testing

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 06:17 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Auto Data Analyzer

jason-aka-chen
自动化数据分析工具——输入CSV/Excel数据,自动生成综合分析报告,包含数据清洗、统计描述等功能。
★ 0 📥 790

Tencent Docs

jason-aka-chen
提供全面的腾讯文档操作,包括创建、读取、编辑多种文档类型,以及管理知识库空间和节点。
★ 0 📥 737
professional

Quant Risk Dashboard

jason-aka-chen
专业量化交易风险管理仪表盘,实时VaR/CVaR计算、压力测试、仓位限额、敞口监控、回撤分析
★ 0 📥 1,422