Free SKILL.md scraped from GitHub. Clone the repo or copy the file directly into your Claude Code skills directory.
npx versuz@latest install hiyenwong-ai-collection-collection-skills-evolutionary-prompt-learninggit clone https://github.com/hiyenwong/ai_collection.gitcp ai_collection/SKILL.MD ~/.claude/skills/hiyenwong-ai-collection-collection-skills-evolutionary-prompt-learning/SKILL.md--- name: evolutionary-prompt-learning description: '进化式系统提示学习技能,联合改进模型上下文和权重。声明性知识在提示,程序性知识在权重。触发词:提示进化、系统提示优化、E-SPL。' --- # Evolutionary Prompt Learning - 进化式提示学习 基于 arXiv:2602.14697 (E-SPL) 的系统提示进化技能。 ## 激活关键词 - 提示进化 - 系统提示优化 - E-SPL - 提示学习 - 声明性知识 - 程序性知识 ## 核心理念 **声明性知识在提示,程序性知识在权重。** 传统方法: - 自我反思更新上下文 - 强化学习更新权重 - 两者独立进行 E-SPL 方法: - 联合进化系统提示和模型权重 - 并行采样多系统提示 - 通过变异和交叉进化提示 - 基于相对性能评分选择 ## 性能提升 | 指标 | 基线 | E-SPL | 提升 | |------|------|-------|------| | RL 成功率 | 38.8% | 45.1% | +6.3% | | 反思性进化 | 40.0% | 45.1% | +5.1% | ## 知识分类 ### 声明性知识(放在提示中) - 事实信息 - 用户偏好 - 环境规则 - 任务约束 - 静态配置 **示例:** ``` 系统提示(声明性): - 用户名:Hi Yen - 时区:Asia/Shanghai - 角色:Aerial,成熟绅士 - 语言:中文 ``` ### 程序性知识(放在权重/技能中) - 如何做某事 - 执行步骤 - 决策流程 - 行动模式 - 技能方法 **示例:** ``` 技能文件(程序性): - 如何创建技能 - 如何查询知识库 - 如何委托 agent - 如何进行 ICE 回顾 ``` ## 进化操作 ### 1. 变异(Mutation) ``` 原始提示: "你是 Aerial,一个成熟绅士。" 变异后: "你是 Aerial,一个成熟绅士。保持简洁,提供价值。" ``` 变异类型: - 添加新指令 - 修改约束条件 - 调整优先级 - 增加示例 ### 2. 交叉(Crossover) ``` 提示 A: "保持简洁。主动汇报重要事项。" 提示 B: "有意见时要表达。通过能力赢得信任。" 交叉后: "保持简洁。有意见时要表达。主动汇报重要事项。通过能力赢得信任。" ``` ### 3. 选择(Selection) 基于相对性能评分: - 任务成功率 - 用户满意度 - 效率指标 - 迁移能力 ## 工作流程 ### 1. 分析当前知识 ``` 知识类型检查: - 这是事实还是方法? - 会经常变化吗? - 需要快速更新吗? 分类决策: - 事实/偏好/规则 → 声明性 → 放入 MEMORY.md - 方法/步骤/流程 → 程序性 → 放入 SKILL.md ``` ### 2. 进化迭代 ``` 迭代步骤: 1. 采样多个提示变体 2. 并行执行任务 3. 评估相对性能 4. 选择最优变体 5. 应用变异和交叉 6. 重复迭代 ``` ### 3. 验证改进 ``` 验证指标: - 任务成功率是否提升? - 泛化能力是否增强? - 用户反馈是否改善? ``` ## 使用场景 ### 场景 1:优化 MEMORY.md ``` 当前 MEMORY.md(声明性知识): - 用户偏好 - 约定规则 - 项目状态 进化方向: - 添加新的用户偏好 - 调整汇报时机 - 更新项目进度 验证: - 用户满意度是否提升? - 汇报是否更及时? ``` ### 场景 2:优化技能文件 ``` 当前技能(程序性知识): - 任务执行步骤 - 决策流程 - 工具使用方法 进化方向: - 简化步骤 - 添加新工具 - 改进决策逻辑 验证: - 执行效率是否提升? - 成功率是否提高? ``` ## 与其他技能的关系 - **meta-cognitive-reflection**:反思驱动变异和交叉 - **ice-review**:任务后回顾提供选择依据 - **self-verification**:验证改进效果 ## 立即应用 当你想要改进时: 1. **分类知识**:这是声明性还是程序性? 2. **设计变体**:如何改进这个知识? 3. **并行测试**:比较多个变体 4. **选择最优**:哪个效果最好? 5. **持续迭代**:继续优化 --- **来源论文:** arXiv:2602.14697 - Evolutionary System Prompt Learning **效用评分:** 0.95 **创建日期:** 2026-03-14 ## Activation Keywords - evolutionary-prompt-learning - evolutionary-prompt-learning 技能 - evolutionary-prompt-learning skill ## Tools Used - `read` - Read documentation and references - `web_search` - Search for related information - `web_fetch` - Fetch paper or documentation ## Instructions for Agents Follow these steps when applying this skill: ### Step 1: 分类知识 ### Step 2: 设计变体 ### Step 3: 并行测试 ### Step 4: 选择最优 ### Step 5: 持续迭代 ## Examples ### Example 1: Basic Application **User:** I need to apply Evolutionary Prompt Learning - 进化式提示学习 to my analysis. **Agent:** I'll help you apply evolutionary-prompt-learning. First, let me understand your specific use case... **Context:** Apply the methodology ### Example 2: Advanced Scenario **User:** Complex analysis scenario **Agent:** Based on the methodology, I'll guide you through the advanced application... ### Example 2: Advanced Application **User:** What are the key considerations for evolutionary-prompt-learning? **Agent:** Let me search for the latest research and best practices...