adb-mysql
Free阿里云 AnalyticDB (ADB) for MySQL 只读数据分析。 多维分析(计数/聚合/时间序列)、交叉验证、Schema 文档生成、多 Profile。
The English summary is being prepared. Showing the original description.
LLM Agent engineering: pattern selection (12-mode matrix), data simulation, convergence iteration. Covers intent routing, function calling, ReAct, MCP, prompt chaining, guardrails, evaluation.
The English summary is being prepared. Showing the original description.
See how to installReview the instructions the agent will receive before you install.
三支柱: 设计范式 · 数据模拟 · 收敛迭代 目标: 在任意场景下产出业界一流的 Agent 系统
触发后按序执行以下五个阶段。每个阶段有明确的输入/输出契约。
提取最小决策上下文:
| 维度 | 问题 | 默认假设 |
|---|---|---|
| 业务目标 | 转化率/自助率/效率/合规? | 自助率 |
| 用户通道 | H5/App/Native/API? | H5 |
| 延迟预算 | P95 上限? | 2s |
| 风险容忍 | 是否允许 LLM 自由发挥? | 保守 |
| 工具边界 | 可用 API/数据? | 需明确 |
| 评估基线 | 现有指标/数据? | 无 |
关键输入缺失时声明假设并标注。
从 12 模式矩阵中选择模式栈(非单一标签),产出:
加载对应模式参考:
references/paradigms/pattern-matrix.mdreferences/paradigms/decision-tree.mdreferences/patterns/{nn}-{name}.md产出五份合同(可交付给工程团队):
横切面参考按需加载:
references/paradigms/context-engineering.mdreferences/paradigms/prompt-patterns.mdreferences/paradigms/memory-architecture.mdreferences/paradigms/tool-design.mdreferences/paradigms/safety-guardrails.mdreferences/paradigms/observability.mdreferences/paradigms/performance-benchmarking.md产出评估计划 + 数据生成策略:
评估计划
性能评估计划(详见 performance-benchmarking.md)
数据模拟生成(Pillar II — 详见 §3)
评估参考:
references/eval-loop.mdreferences/simulation/data-generation.md产出迭代优化策略(Pillar III — 详见 §4):
收敛参考:
references/convergence/iteration-protocol.md| # | Pattern | Latency | Predictability | Best For | Reference |
|---|---|---|---|---|---|
| ① | CREX Rule Router | 50-500ms | ★★★★★ | FAQ, query, navigation | patterns/01-crex-rule-router.md |
| ② | Slot Filling | 100-800ms | ★★★★☆ | ordering, booking, forms | patterns/02-slot-filling.md |
| ③ | Function Calling | 500-2s | ★★★★☆ | stable API tool use | patterns/03-function-calling.md |
| ④ | Workflow Agent | 1-5s | ★★★★☆ | deterministic multi-step | patterns/04-workflow-agent.md |
| ⑤ | ReAct | 3-15s | ★★☆☆☆ | exploration/reasoning | patterns/05-react-agent.md |
| ⑥ | Router-Expert | 500ms-3s | ★★★☆☆ | multi-domain systems | patterns/06-router-expert.md |
| ⑦ | MCP Tool Protocol | varies | ★★★★☆ | scalable tool ecosystems | patterns/07-mcp-tool-protocol.md |
| ⑧ | Handoff/Delegation | varies | ★★★☆☆ | agent-to-agent/human | patterns/08-handoff-delegation.md |
| ⑨ | Prompt Chaining | 1-5s | ★★★★★ | sequential decomposition | patterns/09-prompt-chaining.md |
| ⑩ | Parallelizing | 500ms-3s | ★★★★☆ | concurrent sub-tasks | patterns/10-parallelizing.md |
| ⑪ | Orchestrator-Worker | 2-10s | ★★★☆☆ | dynamic task delegation | patterns/11-orchestrator-worker.md |
| ⑫ | Evaluator-Optimizer | 5-30s | ★★★★☆ | iterative refinement | patterns/12-evaluator-optimizer.md |
目的: 通过 LLM API 批量调用自动生成高质量评估数据集
当 Agent 设计完成但缺少评估数据时,主动触发数据模拟生成。
┌─────────────────────────────────────────────────────────────┐
│ 数据模拟生成 Pipeline │
│ │
│ Agent 设计合同 (Phase C) │
│ │ │
│ ▼ │
│ [生成 Task Specs] ← 按维度拆分: │
│ │ │
│ ├── T1: happy_path (正常路径, 60%) │
│ ├── T2: edge_case (边界情况, 20%) │
│ ├── T3: adversarial (对抗测试, 10%) │
│ ├── T4: multi_turn (多轮对话, 10%) │
│ └── T5: i18n_variant (语言变体, 可选) │
│ │ │
│ ▼ │
│ [Agent 自主并行调 LLM API] → 分维度批量生成 │
│ │ │
│ ▼ │
│ [汇总] → [去重] → [质量检查 LLM-as-Judge] → 数据集 │
└─────────────────────────────────────────────────────────────┘
每个数据生成任务的 Task Spec 格式:
## T{N} · {dimension} 数据生成
- **Engine**: codex 或 claude
- **范围**: 生成 {count} 条评估用例
- **输入**:
- Agent 意图注册表 (IntentSchema)
- SkillResponse 协议定义
- 场景上下文描述
- **交付物**: `eval/generated/{dimension}.json`
- **格式**: EvalCase[] (见 eval-loop.md §评估数据集)
- **质量要求**:
- [ ] 每条用例有唯一 id
- [ ] input 真实自然(含口语化/错别字/方言变体)
- [ ] expected 字段完整(intent + params + responseType)
- [ ] 无重复/高度相似用例
- [ ] adversarial 类必须包含注入攻击变体
- **依赖**: 无
- **预估**: S (< 30min)
生成后使用强模型进行质量检查:
interface DataQualityCheck {
uniqueness: number; // 去重后保留比例 ≥ 90%
naturalness: number; // LLM 评分 ≥ 4.0/5.0
completeness: number; // 字段完整率 100%
diversity: number; // 意图覆盖率 ≥ 95%
adversarialRigor: number; // 对抗强度 ≥ 3.5/5.0
}
Agent 自主执行数据生成(技能内自洽,不依赖外部技能):
Promise.all 并发调多个 LLM API 请求,按维度分组生成// Agent 自主执行数据生成的伪代码
const dimensions = ['happy_path', 'edge_case', 'adversarial', 'multi_turn'];
const results = await Promise.all(
dimensions.map(dim => generateEvalData(dim, intentSchema, agentContext))
);
const merged = deduplicateAndValidate(results.flat());
await writeFile('eval/dataset.json', JSON.stringify(merged, null, 2));
目的: 通过多版本并行测试 + LLM-as-Judge 评估实现 Prompt/架构的自动择优收敛
当存在以下情况时触发:
┌─────────────────────────────────────────────────────────────┐
│ 收敛迭代 Pipeline │
│ │
│ 候选版本集合 (V1, V2, V3, ...) │
│ │ │
│ ▼ │
│ [生成 Task Specs] ← 每个版本一个测试任务: │
│ │ │
│ ├── T1: V1 → 跑全量 eval 数据集 → 输出评分 │
│ ├── T2: V2 → 跑全量 eval 数据集 → 输出评分 │
│ └── T3: V3 → 跑全量 eval 数据集 → 输出评分 │
│ │ │
│ ▼ │
│ [Agent 自主并行运行各版本测试] → 收集评分 │
│ │ │
│ ▼ │
│ [收集评分结果] │
│ │ │
│ ▼ │
│ [LLM-as-Judge 跨版本比较] │
│ │ │
│ ├── 明确胜出 → 选择最优 → 更新 baseline │
│ ├── 差异不显著 → 选择成本/延迟更优的 │
│ └── 全部不达标 → 诊断 → 生成新候选 → 下一轮 │
│ │ │
│ ▼ │
│ [收敛判定] → 最优版本 + 分析报告 │
└─────────────────────────────────────────────────────────────┘
## T{N} · V{M} 收敛测试
- **Engine**: codex 或 claude(推荐使用高智能模型做评估)
- **范围**: 对版本 V{M} 运行完整评估数据集
- **输入**:
- V{M} 的 System Prompt / 配置
- Agent 完整代码(或可运行的分支/commit)
- 评估数据集 `eval/dataset.json`
- **交付物**: `convergence/results/v{M}-scores.json`
- **评估执行**:
- Layer 1: 确定性断言(意图准确率等)
- Layer 2: LLM-as-Judge 多维评分
- Layer 3: 端到端多轮对话评估(如适用)
- **验收**:
- [ ] 所有 eval case 有评分结果
- [ ] 输出格式符合 ConvergenceResult schema
- [ ] 包含分维度明细 + 总分
- **依赖**: 评估数据集存在
- **预估**: M (30-60min)
interface ConvergenceDecision {
// 评分维度与权重
dimensions: {
intentAccuracy: { weight: 0.30, threshold: 0.95 };
paramExtraction: { weight: 0.15, threshold: 0.90 };
responseQuality: { weight: 0.25, threshold: 4.0 };
safety: { weight: 0.15, threshold: 4.5 };
latency: { weight: 0.15, threshold: 2000 };
};
// 收敛条件
convergenceCriteria: {
minVersions: 2; // 至少 2 个版本参与比较
significanceThreshold: 0.05; // 版本间差异 > 5% 才认为显著
maxIterations: 5; // 最多迭代 5 轮
regressionBuffer: 0.02; // 允许 2% 的指标波动
};
}
你是 Agent 系统评估专家。现在有 {N} 个版本的测试结果,请进行跨版本比较。
## 版本评分
{{#each versions}}
### V{{this.id}}
- 意图准确率: {{this.intentAccuracy}}
- 参数提取率: {{this.paramExtraction}}
- 回复质量均分: {{this.responseQuality}}
- 安全性均分: {{this.safety}}
- P95 延迟: {{this.latency}}ms
- 总分: {{this.overall}}
{{/each}}
## 评判标准
1. 加权总分最高的版本为初步推荐
2. 如果总分差异 < 5%,推荐延迟/成本更低的版本
3. 安全性得分低于 4.5 的版本一票否决
4. 意图准确率低于 95% 的版本一票否决
## 输出格式(仅 JSON)
{
"winner": "V{id}",
"confidence": 0.92,
"reasoning": "V2 在意图准确率和回复质量上显著优于其他版本...",
"improvements": ["V2 的退款意图识别仍有 3% 误分类,建议增加训练样例"],
"shouldContinue": false,
"nextAction": "deploy" | "iterate" | "manual_review"
}
每次响应生成必须包含以下段落:
缺少任何段落 → 响应不完整。
场景明确时加载对应蓝图:
| 场景 | 参考文件 |
|---|---|
| 电商购物 | references/scenarios/ecommerce-shopping.md |
| 餐饮点餐 | references/scenarios/food-ordering.md |
| 客户服务 | references/scenarios/customer-service.md |
| 内容生成 | references/scenarios/content-generation.md |
| 编程助手 | references/scenarios/coding-assistant.md |
| 知识问答 | references/scenarios/knowledge-qa.md |
横切面参考:
| 主题 | 参考文件 |
|---|---|
| 意图模式 | references/intent-patterns.md |
| 评估闭环 | references/eval-loop.md |
| 反馈协议 | references/feedback-protocol.md |
| 实现模板 | references/skill-templates.md |
| 上下文工程 | references/paradigms/context-engineering.md |
| 提示词模式 | references/paradigms/prompt-patterns.md |
| 记忆架构 | references/paradigms/memory-architecture.md |
| 工具设计 | references/paradigms/tool-design.md |
| 安全护栏 | references/paradigms/safety-guardrails.md |
| 可观测性 | references/paradigms/observability.md |
| 性能评估 | references/paradigms/performance-benchmarking.md |
| 数据模拟 | references/simulation/data-generation.md |
| 收敛迭代 | references/convergence/iteration-protocol.md |
保持上下文精简:
交付前检查:
不通过 → 修订后再返回。
No reviews yet. Tell others what you thought.
No login needed. Share how it worked for you, ask a question, or note where it did not run.
No comments yet. Be the first to write one.
阿里云 AnalyticDB (ADB) for MySQL 只读数据分析。 多维分析(计数/聚合/时间序列)、交叉验证、Schema 文档生成、多 Profile。
The English summary is being prepared. Showing the original description.
Multi-agent brainstorming: async opinion collision with expert personas. Mixed Codex/Claude Code engine. Use when multiple AI agents need to collaboratively discuss, debate, and converge on solutions through structured dialog. Triggers: brainstorm, multi-perspective discussion, opinion collision, expert debate, war room, collective intelligence, 头脑风暴, 多视角讨论, 集思广益.
The English summary is being prepared. Showing the original description.
Frontend design blueprints with craftsmanship scoring, self-critique loops, and engineering handoff. Aesthetic intelligence against AI homogeneity. Use for: UI/UX design specs, design system creation, visual direction exploration, component design review, design-to-engineering handoff.
The English summary is being prepared. Showing the original description.
Multi-agent SWE team built on the Workshop model. Full-stack vertical workers, meeting room with @mention notification, private pipes, shared task board. Git worktree isolation, Leader-driven coordination. Mixed Codex/Claude Code engine. Use when a task needs engineering depth beyond a single agent. NOT for simple task parallelism (use agent-task-orchestration) or design discussions (use agent-brainstorm).
The English summary is being prepared. Showing the original description.
Task decomposition and multi-agent orchestration with retry, checkpoint recovery, and real-time monitoring. Mixed Codex/Claude Code engine. Parallel/sequential execution.
The English summary is being prepared. Showing the original description.
针对 cnb.cool 的云原生构建(CNB Build):生成/修改 .cnb.yml 流水线、触发规则、 构建环境、runner 资源、缓存、环境变量、手动触发与调试。 在接入、迁移、优化或排查 CNB 构建配置时使用。
The English summary is being prepared. Showing the original description.